load_tem_prophead Subroutine

public subroutine load_tem_prophead(me, myPart, comm, conf, root)

Load the property header from the mesh file.

Arguments

Type IntentOptional Attributes Name
type(tem_prophead_type), intent(out) :: me(:)

Property to load

integer, intent(in) :: myPart

The process within comm, calling the routine

integer, intent(in) :: comm

MPI Communicator within which the mesh is loaded.

type(flu_State) :: conf

Lua state containing the mesh description.

integer, intent(in), optional :: root

The root process doing the IO, defaults to 0.


Calls

proc~~load_tem_prophead~~CallsGraph proc~load_tem_prophead load_tem_prophead aot_get_val aot_get_val proc~load_tem_prophead->aot_get_val aot_table_close aot_table_close proc~load_tem_prophead->aot_table_close aot_table_open aot_table_open proc~load_tem_prophead->aot_table_open mpi_bcast mpi_bcast proc~load_tem_prophead->mpi_bcast

Called by

proc~~load_tem_prophead~~CalledByGraph proc~load_tem_prophead load_tem_prophead proc~load_tem_global load_tem_global proc~load_tem_global->proc~load_tem_prophead proc~load_tem load_tem proc~load_tem->proc~load_tem_global proc~tem_global_mesh_read tem_global_mesh_read proc~tem_global_mesh_read->proc~load_tem_global proc~tem_restart_readheader tem_restart_readHeader proc~tem_restart_readheader->proc~load_tem proc~tem_load_restart tem_load_restart proc~tem_load_restart->proc~tem_restart_readheader

Source Code

  subroutine load_tem_prophead(me, myPart, comm, conf, root)
    ! -------------------------------------------------------------------- !
    !> Property to load
    type(tem_prophead_type), intent(out) :: me(:)

    !> The process within comm, calling the routine
    integer, intent(in) :: myPart

    !> MPI Communicator within which the mesh is loaded.
    integer, intent(in) :: comm

    !> Lua state containing the mesh description.
    type( flu_State ) :: conf

    !> The root process doing the IO, defaults to 0.
    integer, optional, intent(in) :: root
    ! -------------------------------------------------------------------- !
    integer :: locroot, iprop, sub_handle
    integer :: iError
    integer :: thandle ! handle of property table
    ! -------------------------------------------------------------------- !

    if (present(root)) then
      locroot = root
    else
      locroot = 0
    end if

    if (myPart == locroot) then
      !open properties table
      call aot_table_open( L       = conf,      &
        &                  thandle = thandle,   &
        &                  key     = 'property' )
      do iprop = 1, size(me)
        call aot_table_open( L       = conf,       &
          &                  parent  = thandle,    &
          &                  thandle = sub_handle, &
          &                  pos     = iprop       )
        call aot_get_val( L       = conf,            &
          &               thandle = sub_handle,      &
          &               key     = 'label',         &
          &               val     = me(iprop)%label, &
          &               ErrCode = iError           )
        call aot_get_val( L       = conf,             &
          &               thandle = sub_handle,       &
          &               key     = 'bitpos',         &
          &               val     = me(iprop)%bitpos, &
          &               ErrCode = iError            )
        call aot_get_val( L       = conf,             &
          &               thandle = sub_handle,       &
          &               key     = 'nElems',         &
          &               val     = me(iprop)%nElems, &
          &               ErrCode = iError            )
        call aot_table_close( L = conf, thandle = sub_handle )
      end do
      call aot_table_close( L = conf, thandle = thandle )
    end if

    do iprop = 1, size(me)
      call MPI_Bcast( me(iprop)%nElems, 1, MPI_INTEGER8, locroot, comm, iError)
      call MPI_Bcast( me(iprop)%bitpos, 1, MPI_INTEGER, locroot, comm, iError)
      call MPI_Bcast( me(iprop)%label, 64, MPI_CHARACTER, locroot, comm, iError)
    end do

  end subroutine load_tem_prophead