hvs_ascii_module Module

This module encapsulates the data type for ascii and asciiSpatial output format.

\author Kannan Masilamani


Uses

Used by

  • module~~hvs_ascii_module~~UsedByGraph module~hvs_ascii_module hvs_ascii_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~hvs_ascii_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~hvs_output_module program~tem_tracking_test tem_tracking_test program~tem_tracking_test->module~tem_tracking_module

Contents


Derived Types

type, public :: hvs_ascii_type

Description of the opened files for ascii output.

Components

TypeVisibilityAttributesNameInitial
integer, public :: outunit

File handle for the ascii file with the data.

character(len=pathLen), public :: basename

Basename of the VTK files to write

character(len=labelLen), public :: timestamp

Timestamp to construct the filename

logical, public :: isReduce

spatial reduction active If reduction is active, only root process of subTree dumps the data

type(tem_reduction_spatial_type), public, allocatable:: redSpatial(:)

reduction type which saves results from reduction

integer, public :: chunkSize

number of elements that fit in the buffer

integer, public :: nChunks

number of chunks per output

type, public :: hvs_asciiSpatial_type

Description of the opened files for ascii output.

Components

TypeVisibilityAttributesNameInitial
integer, public :: outunit

File handle for the ascii file with the data.

character(len=pathLen), public :: basename

Basename of the VTK files to write

character(len=labelLen), public :: timestamp

Timestamp to construct the filename

integer, public :: chunkSize

number of elements that fit in the buffer

integer, public :: nChunks

number of chunks per output


Functions

public function getHeader(varSys, varPos, nDofs, isReduce) result(buffer)

This routine write variable labels into buffer and this buffer is written into the second line of ascii result file for spatial (asciiSpatial) and transient (ascii) tracking.

Arguments

TypeIntentOptionalAttributesName
type(tem_varSys_type), intent(in) :: varSys

solver-provided variable systems

integer, intent(in) :: varPos(:)

Position of variables to dump in varSys

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

logical, intent(in) :: isReduce

is spatial Reduction active

Return Value character(len=OutLen)

buffer containing first column of the header


Subroutines

public subroutine hvs_ascii_init(ascii, varsys, varpos, basename, globProc, outProc, solver, geometry, nElems, glob_nElems, timeControl, useGetPoint, nPoints, glob_nPoints, nDofs)

Initialize ascii output format. initialize spatial reduction if reduction is active

Arguments

TypeIntentOptionalAttributesName
type(hvs_ascii_type), intent(inout) :: ascii

Ascii output file settings It must be intent inout since ascii%redSpatial are loaded in tem_load_trackingHeader

type(tem_varSys_type), intent(in) :: varsys

Description of the available variable system to get the given varnames from.

integer, intent(in) :: varpos(:)

List of variable positions that should be written in the output.

character(len=*), intent(in) :: basename

An extension to the output basename.

type(tem_comm_env_type), intent(in) :: globProc

Global communicator type for global rank information

type(tem_comm_env_type), intent(in) :: outProc

Process description to use.

type(tem_solveHead_type), intent(in) :: solver

Global solver information

type(tem_shape_type), intent(in), optional :: geometry(:)

shape defined for this ascii output

integer, intent(in) :: nElems

Number of elements to output by local process

integer(kind=long_k), intent(in) :: glob_nElems

Total number of elements across process on this output

type(tem_timeControl_type), intent(in), optional :: timeControl

output timeControl

logical, intent(in) :: useGetPoint

if get_point is to be used to track the point

integer, intent(in) :: nPoints

Number of points to output by local process

integer(kind=long_k), intent(in) :: glob_nPoints

Total number of points across process on this output

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

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

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine hvs_ascii_open(ascii, outProc, varSys, varPos, nDofs)

open the ascii transient output unit

Arguments

TypeIntentOptionalAttributesName
type(hvs_ascii_type), intent(inout) :: ascii

ascii output type

type(tem_comm_env_type), intent(in) :: outProc

Parallel environment to use for the output.

type(tem_varSys_type), intent(in) :: varSys

solver-provided variable systems

integer, intent(in) :: varPos(:)

Position of variables to dump in varSys

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

public subroutine hvs_ascii_dump_elem_data(ascii, outProc, varpos, varsys, mesh, time, subtree, nDofs)

Write single log for the right scheme into its ascii file. This routine dumps the element data

Arguments

TypeIntentOptionalAttributesName
type(hvs_ascii_type), intent(inout) :: ascii

ascii file to write data to.

type(tem_comm_env_type), intent(in) :: outProc

Parallel environment to use for the output.

integer, intent(in) :: varpos(:)

Position of the variable to write

type(tem_varSys_type), intent(in) :: varsys

Description of the available variable system to get the given varnames from.

type(treelmesh_type), intent(in) :: mesh

Mesh to write the data on.

type(tem_time_type), intent(in) :: time

Point in time to use for this data.

Can be important for space-time function evaluations.

type(tem_subTree_type), intent(in), optional :: subtree

Optional restriction of the elements to output.

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

public subroutine hvs_ascii_dump_point_data(ascii, outProc, varpos, varsys, mesh, time, subtree)

Write single log for the right scheme into its ascii file. This routine calls the get_point routine and dumps the exact point data for the point specified in the tracking table

Arguments

TypeIntentOptionalAttributesName
type(hvs_ascii_type), intent(inout) :: ascii

ascii file to write data to.

type(tem_comm_env_type), intent(in) :: outProc

Parallel environment to use for the output.

integer, intent(in) :: varpos(:)

Position of the variable to write

type(tem_varSys_type), intent(in) :: varsys

Description of the available variable system to get the given varnames from.

type(treelmesh_type), intent(in) :: mesh

Mesh to write the data on.

type(tem_time_type), intent(in) :: time

Point in time to use for this data.

Can be important for space-time function evaluations.

type(tem_subTree_type), intent(in), optional :: subtree

Optional restriction of the points to output. Contains array of points passed in the config to output.

public subroutine hvs_asciiSpatial_init(asciiSpatial, varsys, varpos, basename, globProc, outProc, solver, geometry, nDofs, nElems, glob_nElems, useGetPoint, nPoints, glob_nPoints, timeControl)

Initialize asciiSpatial output format. initialize reduction if reduction is active

Arguments

TypeIntentOptionalAttributesName
type(hvs_asciiSpatial_type), intent(inout) :: asciiSpatial

AsciiSpatial output file settings

type(tem_varSys_type), intent(in) :: varsys

Description of the available variable system to get the given varnames from.

integer, intent(in) :: varpos(:)

List of variable positions that should be written in the output.

character(len=*), intent(in) :: basename

An extension to the output basename.

type(tem_comm_env_type), intent(in) :: globProc

Global communicator type for global rank information

type(tem_comm_env_type), intent(in) :: outProc

Process description to use.

type(tem_solveHead_type), intent(in) :: solver

Global solver information

type(tem_shape_type), intent(in), optional :: geometry(:)

shape defined for this ascii output

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

integer, intent(in) :: nElems

Number of elements to output by local process

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, intent(in) :: nPoints

Number of points to output by local process

integer(kind=long_k), intent(in) :: glob_nPoints

Total number of points across process on this output

type(tem_timeControl_type), intent(in), optional :: timeControl

output timeControl

public subroutine hvs_asciiSpatial_open(asciiSpatial, outProc, time, varSys, varPos, nDofs)

Open the output file for AsciiSpatial format.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(hvs_asciiSpatial_type), intent(inout) :: asciiSpatial

asciiSpatial file output

type(tem_comm_env_type), intent(in) :: outProc

Parallel environment to use for the output.

type(tem_time_type), intent(in) :: time

current global time

type(tem_varSys_type), intent(in) :: varSys

solver-provided variable systems

integer, intent(in) :: varPos(:)

Position of variables to dump in varSys

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

public subroutine hvs_asciiSpatial_dump_elem_data(asciiSpatial, varpos, varSys, bary, mesh, subtree, time, nDofs)

Write a spatial representation for elements into an ascii tracking file

Read more…

Arguments

TypeIntentOptionalAttributesName
type(hvs_asciiSpatial_type), intent(inout) :: asciiSpatial

The file description to open

integer, intent(in) :: varpos(:)

Positions of the variables to write

type(tem_varSys_type), intent(in) :: varSys

solver-provided variable systems

real(kind=rk), intent(in) :: bary(:,:)

Barycenter of elements

type(treelmesh_type), intent(in) :: mesh

Mesh to write the data on.

type(tem_subTree_type), intent(in), optional :: subtree

Optional restriction of the elements to output.

type(tem_time_type), intent(in) :: time

current global time

integer, intent(in) :: nDofs

The number of dofs for each scalar variable of the equation system

public subroutine hvs_asciiSpatial_dump_point_data(asciiSpatial, varpos, varSys, bary, mesh, subtree, time)

Write a spatial representation for list of points into an ascii tracking file

Read more…

Arguments

TypeIntentOptionalAttributesName
type(hvs_asciiSpatial_type), intent(inout) :: asciiSpatial

The file description to open

integer, intent(in) :: varpos(:)

Positions of the variables to write

type(tem_varSys_type), intent(in) :: varSys

solver-provided variable systems

real(kind=rk), intent(in) :: bary(:,:)

Barycenter of elements

type(treelmesh_type), intent(in) :: mesh

Mesh to write the data on.

type(tem_subTree_type), intent(in), optional :: subtree

Optional restriction of the elements to output.

type(tem_time_type), intent(in) :: time

current global time

public subroutine hvs_ascii_close(ascii)

close the ascii output unit

Arguments

TypeIntentOptionalAttributesName
type(hvs_ascii_type), intent(inout) :: ascii

ascii output

public subroutine hvs_asciiSpatial_close(asciiSpatial)

close the asciiSpatial output unit

Arguments

TypeIntentOptionalAttributesName
type(hvs_asciiSpatial_type), intent(inout) :: asciiSpatial

asciiSpatial output