load_tem_BC_logicalHeader Subroutine

private subroutine load_tem_BC_logicalHeader(nBCtypes, propname, basename, flag_per_BC, myPart, comm)

load bc realarray data from disk

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nBCtypes

Number of boundary condition types

character(len=*), intent(in) :: propname

Name of the property to load

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

logical, intent(out) :: flag_per_BC(nBCtypes)

The flags to set for each boundary condition type

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use


Calls

proc~~load_tem_bc_logicalheader~~CallsGraph proc~load_tem_bc_logicalheader load_tem_BC_logicalHeader proc~open_config_file open_config_file proc~load_tem_bc_logicalheader->proc~open_config_file mpi_bcast mpi_bcast proc~load_tem_bc_logicalheader->mpi_bcast proc~aot_table_open aot_table_open proc~load_tem_bc_logicalheader->proc~aot_table_open proc~aot_table_close aot_table_close proc~load_tem_bc_logicalheader->proc~aot_table_close proc~aot_get_val~2 aot_get_val proc~load_tem_bc_logicalheader->proc~aot_get_val~2 proc~close_config close_config proc~load_tem_bc_logicalheader->proc~close_config

Called by

proc~~load_tem_bc_logicalheader~~CalledByGraph proc~load_tem_bc_logicalheader load_tem_BC_logicalHeader proc~load_tem_bc_qval load_tem_BC_qVal proc~load_tem_bc_qval->proc~load_tem_bc_logicalheader proc~load_tem_bc_normal load_tem_BC_normal proc~load_tem_bc_normal->proc~load_tem_bc_logicalheader

Contents


Source Code

  subroutine load_tem_BC_logicalHeader( nBCtypes, propname, basename, &
    &                                   flag_per_BC, myPart, comm     )
    ! ---------------------------------------------------------------------------
    !> Number of boundary condition types
    integer, intent(in)                   :: nBCtypes
    !> Name of the property to load
    character(len=*), intent(in)          :: propname
    !> Name of the file, the data is stored in, will be appended with
    !! ".lua" for the header information and ".lsb" or ".msb" for the
    !! binary data.
    character(len=*), intent(in)          :: basename
    !> The flags to set for each boundary condition type
    logical, intent(out)                  :: flag_per_BC(nBCtypes)
    !> Partition to load
    integer, intent(in)                   :: myPart
    !> Communicator to use
    integer, intent(in)                   :: comm
    ! ---------------------------------------------------------------------------
    type( flu_State ) :: conf ! lua flu state to read lua file
    integer :: i
    integer :: iError
    integer, parameter :: root = 0
    character(len=256) :: headerfile
    integer :: thandle
    ! ---------------------------------------------------------------------------

    ! set header file name
    headerfile = trim(basename)//'.lua'

    if (myPart == root) then
      ! Now read whether each boundary has q value
      call open_config_file(L = conf, filename = headerfile)
      call aot_table_open(L = conf, thandle = thandle, key = propName)
      do i=1,nBCtypes
        call aot_get_val( L       = conf,           &
          &               thandle = thandle,        &
          &               pos     = i,              &
          &               val     = flag_per_BC(i), &
          &               ErrCode = iError          )
      end do
      call aot_table_close( L = conf, thandle = thandle )
      call close_config( conf )
    end if

    call MPI_Bcast(flag_per_BC, nBCtypes, MPI_LOGICAL, root, comm, iError)
  end subroutine load_tem_BC_logicalHeader