write mesh information into lua file.
This routine is specially need for write restart to write mesh info for predefined mesh such that read restart will generate predefined mesh
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_global_type), | intent(in) | :: | me |
Structure to store header in |
||
type(aot_out_type), | intent(inout) | :: | conf |
aotus lua state to write output |
subroutine tem_mesh_out( me, conf )
! -------------------------------------------------------------------- !
!> Structure to store header in
type(tem_global_type), intent(in) :: me
!> aotus lua state to write output
type(aot_out_type), intent(inout) :: conf
! -------------------------------------------------------------------- !
real(kind=rk) :: lineLength
! -------------------------------------------------------------------- !
select case(trim(me%predefined))
case('cube','slice','line')
call aot_out_open_table(conf, 'mesh')
call aot_out_val( put_conf = conf, &
& val = trim(me%predefined), &
& vname = 'predefined' )
call aot_out_val( put_conf = conf, &
& val = me%Origin, &
& vname = 'origin' )
if (me%nElems < 2**me%maxlevel) then
lineLength = me%BoundingCubeLength*0.5_rk**me%maxLevel*me%nElems
call aot_out_val( put_conf = conf, &
& val = lineLength, &
& vname = 'length' )
call aot_out_val( put_conf = conf, &
& val = me%nElems, &
& vname = 'element_count' )
else
call aot_out_val( put_conf = conf, &
& val = me%BoundingCubeLength, &
& vname = 'length' )
call aot_out_val( put_conf = conf, &
& val = me%maxLevel, &
& vname = 'refinementLevel' )
end if
call aot_out_close_table(conf)
case('line_bounded')
lineLength = me%BoundingCubeLength*0.5_rk**me%maxLevel*me%nElems
call aot_out_open_table(conf, 'mesh')
call aot_out_val( put_conf = conf, &
& val = trim(me%predefined), &
& vname = 'predefined' )
call aot_out_val( put_conf = conf, &
& val = me%Origin, &
& vname = 'origin' )
call aot_out_val( put_conf = conf, &
& val = lineLength, &
& vname = 'length' )
call aot_out_val( put_conf = conf, &
& val = me%nElems, &
& vname = 'element_count' )
call aot_out_close_table(conf)
case('single')
call aot_out_open_table(conf, 'mesh')
call aot_out_val( put_conf = conf, &
& val = trim(me%predefined), &
& vname = 'predefined' )
call aot_out_val( put_conf = conf, &
& val = me%Origin, &
& vname = 'origin' )
call aot_out_val( put_conf = conf, &
& val = me%BoundingCubeLength, &
& vname = 'length' )
call aot_out_close_table(conf)
case default
call aot_out_val( put_conf = conf, &
& val = trim(me%dirName), &
& vname = 'mesh' )
end select
end subroutine tem_mesh_out