This module encapsulates the output in VTK format.
HK: this stuff should probably be changed to use the VTK library stuff beneath, see for example Or maybe replace by https://github.com/szaghi/Lib_VTK_IO Using the VTK API allows for greater flexibility and usage of more enhanced features.
The current workflow is as follows: call hvs_vtk_config_load to get relevant user configurations. Open the vtk files with hvs_vtk_open. Write the mesh data by calling hvs_vtk_write_meshdata, this requires the vertex information of the mesh, that needs to be obtained beforehand. If there is data to be attached to the mesh data, describe it by calling hvs_vtk_write_varSys, which requires a variable system and a list of variable names to write out of that variable system. Then go on and call hvs_vtk_dump_data for each variable. After all variables have been written, call hvs_vtk_close to close the vtk files.
Read the VTK output configuration from a Lua script.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_config_type), | intent(out) | :: | me |
The VTK configuration settings to fill. |
||
type(flu_State) | :: | conf |
Handle of the Lua script to load the configuration from. |
|||
integer, | intent(in) | :: | thandle |
Table handle to the table providing the VTK settings. |
Initialize the type for VTK format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(inout) | :: | vtk_file |
The file description to open. |
||
type(hvs_vtk_config_type), | intent(in) | :: | vtk_config |
User specified settings for the output |
||
character(len=*), | intent(in) | :: | basename |
Basename for the output file, rank and suffix will be appended as needed. |
||
type(tem_comm_env_type), | intent(in) | :: | proc |
Parallel environment to use for the output. |
Open the output files in VTK format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(inout) | :: | vtk_file |
The file description to open. |
||
logical, | intent(in) | :: | use_iter |
User specified settings for the output Whether to use iteration as part of filename |
||
type(tem_comm_env_type), | intent(in) | :: | proc |
Parallel environment to use for the output. |
||
type(tem_time_type), | intent(in), | optional | :: | time |
Time information. |
Write the mesh information into the VTK output files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(in) | :: | vtk_file |
File handles to the files where the mesh data should be written to. |
||
type(tem_vrtx_type), | intent(in) | :: | vrtx |
Information on the vertices of the mesh |
||
integer, | intent(in) | :: | nElems |
Number of elements in the mesh |
Write the cell data description into the VTK files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(in) | :: | vtk_file |
Handles for the VTK files to write the celldata to. |
||
character(len=*), | intent(in) | :: | celldata_str |
Actual string to put into the XML to describe the celldata. |
Convert the provided variable system data into celldata description in the given vtk files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(inout) | :: | vtk_file |
Output info for vtu_output. |
||
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 into the vtk output. |
Dump the given data (input) with the given name in the given format (vtu) to the given unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(in) | :: | vtk_file |
VTK file to write data to. |
||
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. |
||
type(tem_subTree_type), | intent(in), | optional | :: | subtree |
Optional restriction of the elements to output. |
This routine finalizes the vtu file i.e closing cellData xml and creating pvtu file to combile all parallel vtu files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(in) | :: | vtk_file |
The file descriptor to close again. |
||
type(tem_comm_env_type), | intent(in) | :: | proc |
Communicator for the parallel environment. |
This routine closes PVD file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_vtk_file_type), | intent(inout) | :: | vtk_file |
The file description to open. |
Dumps the debug_data into a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_comm_env_type), | intent(in) | :: | proc | |||
type(treelmesh_type), | intent(in) | :: | tree | |||
type(tem_time_type), | intent(in) | :: | time | |||
type(tem_vrtx_type) | :: | vrtx | ||||
real(kind=rk) | :: | debug_data(tree%nElems) |