Allows the output of the single convergence to lua out.
The data is written into the file, the lunit is connected to. It is formatted as a Lua table.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_convergence_type), | intent(in) | :: | me | convergence to write into the lua file |
||
type(aot_out_type), | intent(inout) | :: | conf | aotus type handling the output to the file in lua format |
||
integer, | intent(in), | optional | :: | level | to dump variable with key or without key |
subroutine tem_convergence_out_single(me, conf, level)
! -------------------------------------------------------------------- !
!> convergence to write into the lua file
type(tem_convergence_type), intent(in) :: me
!> aotus type handling the output to the file in lua format
type(aot_out_type), intent(inout) :: conf
!> to dump variable with key or without key
integer, optional, intent(in) :: level
! -------------------------------------------------------------------- !
integer :: level_loc, iVar
! -------------------------------------------------------------------- !
if (present(level)) then
level_loc = level
else
level_loc = 0
end if
if( level_loc == 0) then
call aot_out_open_table( put_conf = conf, tname = 'convergence' )
else
call aot_out_open_table( put_conf = conf )
end if
! write variable names
call aot_out_open_table( put_conf = conf, tname = 'variable' )
do iVar = 1, me%header%nRequestedVars
call aot_out_val( put_conf = conf, &
& val = trim(me%header%varName(iVar)) )
end do
call aot_out_close_table( put_conf = conf )
! convergence norm
call aot_out_val( put_conf = conf, &
& val = me%header%norm, &
& vname = 'norm' )
call aot_out_val( put_conf = conf, &
& val = me%header%nLastVals, &
& vname = 'nvals' )
call aot_out_val( put_conf = conf, &
& val = me%header%absoluteError, &
& vname = 'absolute' )
! write reductions
call tem_reduction_spatial_out( me%redSpatial, conf )
! write conditions
call tem_condition_out( me%header%cond, conf )
! write timeControl info
call tem_timeControl_out( me%header%timeControl, conf )
! write shapes
call tem_shape_out( me%header%geometry, conf )
call aot_out_close_table( put_conf = conf )
end subroutine tem_convergence_out_single