: Add description
Type | Intent | Optional | 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 |
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