Returns the node associated with the given bcid. If the bcid is not found, a null pointer is returned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BoundaryConditionList), | intent(in) | :: | list | |||
| integer, | intent(in) | :: | bcid |
function GetBCForID(list,bcid) result(node)
!! Returns the node associated with the given bcid.
!! If the bcid is not found, a null pointer is returned.
class(BoundaryConditionList),intent(in) :: list
integer,intent(in) :: bcid
type(BoundaryCondition),pointer :: node
node => list%head
do while(associated(node))
if(node%bcid == bcid) then
return
endif
node => node%next
enddo
! If we reach this point, the bcid was not found
node => null()
endfunction GetBCForID