Load the property header from the mesh file.
Type | Intent | Optional | 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. |
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