Populate the elements and sides arrays for a registered boundary condition. Called after scanning the mesh to determine which faces belong to each bcid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BoundaryConditionList), | intent(inout) | :: | list | |||
| integer, | intent(in) | :: | bcid | |||
| integer, | intent(in) | :: | nBoundaries | |||
| integer, | intent(in) | :: | elements(1:nBoundaries) | |||
| integer, | intent(in) | :: | sides(1:nBoundaries) |
subroutine PopulateBoundaries(list,bcid,nBoundaries,elements,sides)
!! Populate the elements and sides arrays for a registered boundary condition.
!! Called after scanning the mesh to determine which faces belong to each bcid.
class(BoundaryConditionList),intent(inout) :: list
integer,intent(in) :: bcid
integer,intent(in) :: nBoundaries
integer,intent(in) :: elements(1:nBoundaries)
integer,intent(in) :: sides(1:nBoundaries)
! Local
type(BoundaryCondition),pointer :: bc
bc => list%GetBCForID(bcid)
if(.not. associated(bc)) then
return
endif
bc%nBoundaries = nBoundaries
if(allocated(bc%elements)) deallocate(bc%elements)
if(allocated(bc%sides)) deallocate(bc%sides)
allocate(bc%elements(1:nBoundaries))
allocate(bc%sides(1:nBoundaries))
bc%elements = elements
bc%sides = sides
endsubroutine PopulateBoundaries