tem_global_mesh_read Subroutine

public subroutine tem_global_mesh_read(me, conf, myPart, nParts, comm)

Todo

Add description

Arguments

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

Structure to store header in

type(flu_State) :: conf

lua flu state to read mesh from

integer, intent(in) :: myPart

The process local part (= MPI Rank in comm)

integer, intent(in) :: nParts

Number of partitions, the mesh is partitioned into (= Number of MPI processes in comm).

integer, intent(in) :: comm

MPI Communicator to use


Calls

proc~~tem_global_mesh_read~~CallsGraph proc~tem_global_mesh_read tem_global_mesh_read aot_get_val aot_get_val proc~tem_global_mesh_read->aot_get_val aot_table_open aot_table_open proc~tem_global_mesh_read->aot_table_open proc~load_tem_global load_tem_global proc~tem_global_mesh_read->proc~load_tem_global proc~tem_global_mesh_internal tem_global_mesh_internal proc~tem_global_mesh_read->proc~tem_global_mesh_internal proc~load_tem_global->aot_get_val proc~load_tem_global->aot_table_open aot_table_close aot_table_close proc~load_tem_global->aot_table_close close_config close_config proc~load_tem_global->close_config mpi_bcast mpi_bcast proc~load_tem_global->mpi_bcast open_config_file open_config_file proc~load_tem_global->open_config_file proc~load_tem_prophead load_tem_prophead proc~load_tem_global->proc~load_tem_prophead proc~tem_global_mesh_internal->aot_get_val proc~gen_treelm_cube_global gen_treelm_cube_global proc~tem_global_mesh_internal->proc~gen_treelm_cube_global proc~gen_treelm_line_global gen_treelm_line_global proc~tem_global_mesh_internal->proc~gen_treelm_line_global proc~gen_treelm_single_global gen_treelm_single_global proc~tem_global_mesh_internal->proc~gen_treelm_single_global proc~gen_treelm_slice_global gen_treelm_slice_global proc~tem_global_mesh_internal->proc~gen_treelm_slice_global proc~tem_abort tem_abort proc~tem_global_mesh_internal->proc~tem_abort proc~gen_treelm_cube_global->aot_get_val proc~gen_treelm_line_global->aot_get_val proc~gen_treelm_line_global->proc~tem_abort proc~gen_treelm_single_global->aot_get_val proc~gen_treelm_slice_global->aot_get_val proc~load_tem_prophead->aot_get_val proc~load_tem_prophead->aot_table_open proc~load_tem_prophead->aot_table_close proc~load_tem_prophead->mpi_bcast mpi_abort mpi_abort proc~tem_abort->mpi_abort

Source Code

  subroutine tem_global_mesh_read( me, conf, myPart, nParts, comm )
    ! -------------------------------------------------------------------- !
    !> Structure to store header in
    type(tem_global_type), intent(out) :: me
    !> lua flu state to read mesh from
    type( flu_State ) :: conf
    !> The process local part (= MPI Rank in comm)
    integer, intent(in) :: myPart
    !> Number of partitions, the mesh is partitioned into (= Number of MPI
    !! processes in comm).
    integer, intent(in) :: nParts
    !> MPI Communicator to use
    integer, intent(in) :: comm
    ! -------------------------------------------------------------------- !
    character(len=pathLen) :: dirname
    integer :: commLocal
    integer :: tem_handle
    integer :: iError
    ! -------------------------------------------------------------------- !

    ! Use the incoming communicator
    commLocal = comm

    write(logUnit(1),*) 'Obtaining HEADER of the configured mesh'
    call aot_table_open(L=conf, thandle=tem_handle, key='mesh')

    if (tem_handle /= 0) then
      ! The mesh is actually given as a table, parse it and
      ! generate a mesh internally.
      write(logUnit(1),*)'  Generating HEADER for an internally defined mesh'
      call tem_global_mesh_internal( me, conf, tem_handle, myPart, nParts,     &
        &                            commLocal )
    else
      ! The mesh is not a table, try to interpret it as a string.
      call aot_get_val( L       = conf,                                        &
        &               key     = 'mesh',                                      &
        &               val     = dirname,                                     &
        &               ErrCode = iError,                                      &
        &               default = 'mesh/' )
      call load_tem_global(me, trim(dirname), myPart, nParts, commLocal)
    end if
  end subroutine tem_global_mesh_read