init_tem_bc_prop Subroutine

public subroutine init_tem_bc_prop(tree, mypart, comm, bc)

Initialize boundary conditions of a given tree.

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree
integer, intent(in) :: mypart
integer, intent(in) :: comm

Communicator to use

type(tem_BC_prop_type), intent(out) :: bc

Source Code

  subroutine init_tem_bc_prop( tree, mypart, comm, bc )
    ! ---------------------------------------------------------------------------
    type(treelmesh_type), intent(in)    :: tree
    integer, intent(in)                 :: mypart
    !> Communicator to use
    integer, intent(in) :: comm
    type(tem_bc_prop_type), intent(out) :: bc
    ! ---------------------------------------------------------------------------
    integer :: iprop
    logical :: found_bc
    ! ---------------------------------------------------------------------------

    iProp = tem_bc_prop_pos(tree)
    found_bc = iProp > 0

    if (found_bc) then
      bc%header => tree%global%Property(iprop)
      bc%property => tree%property(iprop)

      select case(trim(bc%header%label))
      case('internal 0D BC')
        call load_bc_intern_0D(tree = tree, me = bc)
      case('internal 1D BC')
        call load_bc_intern_1D(tree = tree, me = bc, xbounds=.false.)
      case('bounded internal 1D BC')
        call load_bc_intern_1D(tree = tree, me = bc, xbounds=.true.)
      case('internal 2D BC')
        call load_bc_intern_2D(tree = tree, me = bc)
      case default
        call load_tem_bc_prop(me       = bc,                               &
          &                   offset   = bc%property%Offset,               &
          &                   nElems   = bc%property%nElems,               &
          &                   basename = trim(tree%global%dirname)//'bnd', &
          &                   comm     = comm,                             &
          &                   mypart   = mypart                            )
      end select
    else
      call tem_empty_BC_prop(bc)
    end if

  end subroutine init_tem_bc_prop