tem_global_mesh_read Subroutine

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

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 proc~aot_table_open aot_table_open proc~tem_global_mesh_read->proc~aot_table_open proc~aot_get_val~2 aot_get_val proc~tem_global_mesh_read->proc~aot_get_val~2 proc~tem_global_mesh_internal tem_global_mesh_internal proc~tem_global_mesh_read->proc~tem_global_mesh_internal proc~load_tem_global load_tem_global proc~tem_global_mesh_read->proc~load_tem_global proc~tem_global_mesh_internal->proc~aot_get_val~2 proc~gen_treelm_slice_global gen_treelm_slice_global proc~tem_global_mesh_internal->proc~gen_treelm_slice_global proc~gen_treelm_single_global gen_treelm_single_global proc~tem_global_mesh_internal->proc~gen_treelm_single_global proc~gen_treelm_line_global gen_treelm_line_global proc~tem_global_mesh_internal->proc~gen_treelm_line_global proc~tem_abort tem_abort proc~tem_global_mesh_internal->proc~tem_abort proc~gen_treelm_cube_global gen_treelm_cube_global proc~tem_global_mesh_internal->proc~gen_treelm_cube_global proc~load_tem_global->proc~aot_table_open proc~load_tem_global->proc~aot_get_val~2 proc~open_config_file open_config_file proc~load_tem_global->proc~open_config_file mpi_bcast mpi_bcast proc~load_tem_global->mpi_bcast proc~load_tem_prophead load_tem_prophead proc~load_tem_global->proc~load_tem_prophead proc~aot_table_close aot_table_close proc~load_tem_global->proc~aot_table_close proc~close_config close_config proc~load_tem_global->proc~close_config proc~gen_treelm_slice_global->proc~aot_get_val~2 proc~gen_treelm_single_global->proc~aot_get_val~2 proc~load_tem_prophead->proc~aot_table_open proc~load_tem_prophead->mpi_bcast proc~load_tem_prophead->proc~aot_table_close proc~aot_get_val aot_get_val proc~load_tem_prophead->proc~aot_get_val proc~gen_treelm_line_global->proc~aot_get_val~2 proc~gen_treelm_line_global->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~gen_treelm_cube_global->proc~aot_get_val~2

Contents

Source Code


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