hvs_ascii_write_header Subroutine

public subroutine hvs_ascii_write_header(out_format, basename, varSys, varpos, globProc, outProc, solver, geometry, timeControl, nDofs, glob_nElems, useGetPoint, glob_nPoints)

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

Arguments

Type IntentOptional 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


Calls

proc~~hvs_ascii_write_header~~CallsGraph proc~hvs_ascii_write_header hvs_ascii_write_header aot_out_close aot_out_close proc~hvs_ascii_write_header->aot_out_close aot_out_open aot_out_open proc~hvs_ascii_write_header->aot_out_open aot_out_val aot_out_val proc~hvs_ascii_write_header->aot_out_val interface~tem_shape_out tem_shape_out proc~hvs_ascii_write_header->interface~tem_shape_out interface~tem_varsys_out tem_varSys_out proc~hvs_ascii_write_header->interface~tem_varsys_out proc~tem_solvertag tem_solverTag proc~hvs_ascii_write_header->proc~tem_solvertag proc~tem_timecontrol_out tem_timeControl_out proc~hvs_ascii_write_header->proc~tem_timecontrol_out proc~tem_shape_out_scal tem_shape_out_scal interface~tem_shape_out->proc~tem_shape_out_scal proc~tem_shape_out_vec tem_shape_out_vec interface~tem_shape_out->proc~tem_shape_out_vec proc~tem_varsys_out_single tem_varSys_out_single interface~tem_varsys_out->proc~tem_varsys_out_single proc~tem_varsys_out_vector tem_varSys_out_vector interface~tem_varsys_out->proc~tem_varsys_out_vector proc~tem_timecontrol_out->aot_out_val aot_out_close_table aot_out_close_table proc~tem_timecontrol_out->aot_out_close_table aot_out_open_table aot_out_open_table proc~tem_timecontrol_out->aot_out_open_table proc~tem_time_out tem_time_out proc~tem_timecontrol_out->proc~tem_time_out proc~tem_shape_out_scal->aot_out_val proc~tem_shape_out_scal->aot_out_close_table proc~tem_shape_out_scal->aot_out_open_table interface~tem_canonicalnd_out tem_canonicalND_out proc~tem_shape_out_scal->interface~tem_canonicalnd_out interface~tem_cylinder_out tem_cylinder_out proc~tem_shape_out_scal->interface~tem_cylinder_out interface~tem_ellipsoid_out tem_ellipsoid_out proc~tem_shape_out_scal->interface~tem_ellipsoid_out interface~tem_sphere_out tem_sphere_out proc~tem_shape_out_scal->interface~tem_sphere_out interface~tem_stlhead_out tem_stlHead_out proc~tem_shape_out_scal->interface~tem_stlhead_out interface~tem_triangle_out tem_triangle_out proc~tem_shape_out_scal->interface~tem_triangle_out proc~tem_shape_bclabel_out tem_shape_bcLabel_out proc~tem_shape_out_scal->proc~tem_shape_bclabel_out proc~tem_shape_level_out tem_shape_level_out proc~tem_shape_out_scal->proc~tem_shape_level_out proc~tem_shape_proplabel_out tem_shape_propLabel_out proc~tem_shape_out_scal->proc~tem_shape_proplabel_out proc~tem_shape_out_vec->aot_out_close_table proc~tem_shape_out_vec->aot_out_open_table proc~tem_shape_out_vec->proc~tem_shape_out_scal proc~tem_time_out->aot_out_val proc~tem_time_out->aot_out_close_table proc~tem_time_out->aot_out_open_table proc~tem_varsys_out_single->aot_out_val proc~tem_varsys_out_single->aot_out_close_table proc~tem_varsys_out_single->aot_out_open_table proc~tem_varsys_out_vector->aot_out_close_table proc~tem_varsys_out_vector->aot_out_open_table proc~tem_varsys_out_vector->proc~tem_varsys_out_single

Called by

proc~~hvs_ascii_write_header~~CalledByGraph proc~hvs_ascii_write_header hvs_ascii_write_header proc~hvs_ascii_init hvs_ascii_init proc~hvs_ascii_init->proc~hvs_ascii_write_header proc~hvs_asciispatial_init hvs_asciiSpatial_init proc~hvs_asciispatial_init->proc~hvs_ascii_write_header proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~hvs_ascii_init proc~hvs_output_init->proc~hvs_asciispatial_init proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init

Source Code

  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