Write the header of the ascii output files
This writes a header with detailed information into the ascii file for the defined tracking object it writes into the unit, which was opened before in \ref tem_init_tracker
Write the header only on the root process
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | out_format |
Output format |
||
character(len=*), | intent(in) | :: | basename |
Basename for output file. tracking%prefix//tracking%label |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
solver-provided variable systems |
||
integer, | intent(in) | :: | varpos(:) |
List of variable positions that should be written in the output. |
||
type(tem_comm_env_type), | intent(in) | :: | globProc |
Global communicator type for global rank information |
||
type(tem_comm_env_type), | intent(in) | :: | outProc |
Output communicator type from tracking |
||
type(tem_solveHead_type), | intent(in) | :: | solver |
Global solver information |
||
type(tem_shape_type), | intent(in), | optional | :: | geometry(:) |
shape defined for this ascii output |
|
type(tem_timeControl_type), | intent(in), | optional | :: | timeControl |
output timeControl |
|
integer, | intent(in) | :: | nDofs |
The number of dofs for each scalar variable of the equation system |
||
integer(kind=long_k), | intent(in) | :: | glob_nElems |
Total number of elements across process on this output |
||
logical, | intent(in) | :: | useGetPoint |
if get_point is to be used to track the point |
||
integer(kind=long_k), | intent(in) | :: | glob_nPoints |
Total number of points across process on this output |
subroutine hvs_ascii_write_header( out_format, basename, varSys, varPos, &
& globProc, outProc, solver, geometry, &
& timeControl, nDofs, glob_nElems, &
& useGetPoint, glob_nPoints )
! ---------------------------------------------------------------------------
!> Output format
character(len=*), intent(in) :: out_format
!> Basename for output file. tracking%prefix//tracking%label
character(len=*), intent(in) :: basename
!> solver-provided variable systems
type(tem_varSys_type), intent(in) :: varSys
!> List of variable positions that should be written in the output.
integer, intent(in) :: varpos(:)
!> Global communicator type for global rank information
type(tem_comm_env_type ), intent(in) :: globProc
!> Output communicator type from tracking
type(tem_comm_env_type ), intent(in) :: outProc
!> Global solver information
type(tem_solveHead_type ),intent(in) :: solver
!> shape defined for this ascii output
type(tem_shape_type), optional, intent(in) :: geometry(:)
!> output timeControl
type(tem_timeControl_type), optional, intent(in) :: timeControl
!> The number of dofs for each scalar variable of the equation system
integer, intent(in) :: nDofs
!> Total number of elements across process on this output
integer(kind=long_k), intent(in) :: glob_nElems
!> if get_point is to be used to track the point
logical, intent(in) :: useGetPoint
!> Total number of points across process on this output
integer(kind=long_k), intent(in) :: glob_nPoints
! ---------------------------------------------------------------------------
character(len=pathLen) :: logName
type(aot_out_type) :: conf !< aotus lua state to write output
character(len=pathLen) :: buffer
character(len=labelLen) :: solverTag
! ---------------------------------------------------------------------------
if ( outProc%rank == 0 ) then
write(logName,'(a)') trim(basename)//'.lua'
write( buffer, '(a)' ) trim(basename)//'_p*'
solverTag = tem_solverTag( solver )
!! Write the header only on the root process
!open up the mesh header lua file to dump the stuff using aotus library
call aot_out_open( conf, logName )
! output format
call aot_out_val( put_conf = conf, &
& vname = 'format', &
& val = trim(out_format) )
call aot_out_val( put_conf = conf, &
& vname = 'solver', &
& val = trim(solverTag) )
call aot_out_val( put_conf = conf, &
& vname = 'simname', &
& val = trim(solver%simname))
call aot_out_val( put_conf = conf, &
& vname = 'basename', &
& val = trim(basename) )
call aot_out_val( put_conf = conf, &
& vname = 'glob_rank', &
& val = globProc%rank )
call aot_out_val( put_conf = conf, &
& vname = 'glob_nprocs', &
& val = globProc%comm_size )
call aot_out_val( put_conf = conf, &
& vname = 'sub_rank', &
& val = outProc%rank )
call aot_out_val( put_conf = conf, &
& vname = 'sub_nprocs', &
& val = outProc%comm_size )
call aot_out_val( put_conf = conf, &
& vname = 'resultfile', &
& val = trim(buffer) )
call aot_out_val( put_conf = conf, &
& vname = 'nDofs', &
& val = nDofs )
call aot_out_val( put_conf = conf, &
& vname = 'nElems', &
& val = glob_nElems )
if (useGetPoint) then
call aot_out_val( put_conf = conf, &
& vname = 'use_get_point', &
& val = useGetPoint )
call aot_out_val( put_conf = conf, &
& vname = 'nPoints', &
& val = glob_nPoints )
end if
! write timeControl info
if (present(timeControl)) &
& call tem_timeControl_out( timeControl, conf )
! write shapes
if (present(geometry)) call tem_shape_out( geometry, conf )
! write variable systems
call tem_varSys_out( varSys, conf, varPos )
! close aotus file
call aot_out_close( conf )
end if
end subroutine hvs_ascii_write_header