fileio_xdmf_mod Module Reference

module for XDMF file I/O More...

Data Types

type  fileio_xdmf
 FileIO gnuplot class. More...
 

Functions/Subroutines

subroutine initfileio_xdmf (this, Mesh, Physics, Timedisc, Sources, config, IO)
 Constructor for the xdmf file I/O. More...
 
recursive subroutine iteratedict (this, Mesh, config, offset, filename, path, indent)
 Iterate the dictionary and run a Subroutine on every node. More...
 
subroutine writekey_xdmf (this, offset, key, type, bytes, dims)
 Write the xdmf key. More...
 
subroutine writenode_xdmf (this, Mesh, key, node, offset, filename, indent)
 Write the xdmf node. More...
 
subroutine writedataitem (this, dims, filename, offset, indent)
 Writes description of data item in xml syntax. More...
 
subroutine writeattribute (this, Mesh, name, dims, filename, offset, ref, indent)
 Writes description of data item in xml syntax. More...
 
subroutine writevector (this, Mesh, name, dims, ref1, ref2, ref3, step)
 Writes the mesh to file. More...
 
subroutine writemeshxml (this, Mesh, filename, indent)
 Writes the mesh to file. More...
 
subroutine writexmf (this, Mesh, IO)
 Main routine to write all data to xmf file. More...
 
pure subroutine getdimsstr (dims, res)
 determines the string for the dimension attribute, i.e. array dimensions of mesh data More...
 
subroutine finalize (this)
 

Variables

integer, parameter blk_indent = 2
 block indentation More...
 
character, parameter sp = ACHAR(32)
 space More...
 
character, parameter lf = ACHAR(10)
 line feed More...
 
character(len=2), parameter tb = REPEAT(SP, BLK_INDENT)
 

Detailed Description

module for XDMF file I/O

Author
Manuel Jung
Jannes Klee
Tobias Illenseer

The xdmf file format [1,4] carries light data in a xml file and can store heavy data in binary or hdf5 files. This implementation stores heavy data in binary files (See fileio_binary.f90).

If the xdmf file fails loading in paraview 2 try validation using

xmllint --noout --dtdvalid Xdmf.dtd <example_data_file.xmf>

with the dtd file from 3 .

Function/Subroutine Documentation

◆ finalize()

subroutine fileio_xdmf_mod::finalize ( type(fileio_xdmf), intent(inout)  this)
private

Definition at line 544 of file fileio_xdmf.f90.

◆ getdimsstr()

pure subroutine fileio_xdmf_mod::getdimsstr ( integer, dimension(3), intent(in)  dims,
character(len=*), intent(out)  res 
)

determines the string for the dimension attribute, i.e. array dimensions of mesh data

Definition at line 521 of file fileio_xdmf.f90.

Here is the caller graph for this function:

◆ initfileio_xdmf()

subroutine fileio_xdmf_mod::initfileio_xdmf ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
class(physics_base), intent(in)  Physics,
class(timedisc_base), intent(in)  Timedisc,
class(sources_list), intent(in), allocatable  Sources,
type(dict_typ), intent(in), pointer  config,
type(dict_typ), intent(in), pointer  IO 
)

Constructor for the xdmf file I/O.

Initilizes the file I/O type, filename, stoptime, number of outputs, number of files, unit number, config as a dict

Parameters
[in,out]this[in,out] fileio class
[in]mesh[in] Mesh class
[in]physics[in] Physics class
[in]timedisc[in] Timedisc class
[in]sources[in] Sources sources type
[in]io[in] IO Dictionary for I/O

Definition at line 98 of file fileio_xdmf.f90.

◆ iteratedict()

recursive subroutine fileio_xdmf_mod::iteratedict ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
type(dict_typ), intent(in), pointer  config,
integer, intent(inout)  offset,
character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  path,
integer  indent 
)
private

Iterate the dictionary and run a Subroutine on every node.

Parameters
[in,out]this[in,out] fileio class
[in]mesh[in] mesh class
[in]config[in] config dict
[in]path[in] path
[in,out]offset[in,out] offset
indent[in] indent indentation level

Definition at line 139 of file fileio_xdmf.f90.

Here is the call graph for this function:

◆ writeattribute()

subroutine fileio_xdmf_mod::writeattribute ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
character(len=*), intent(in)  name,
integer, dimension(:), intent(in)  dims,
character(len=*), intent(in)  filename,
integer, intent(in)  offset,
logical, intent(in)  ref,
integer, intent(in)  indent 
)
private

Writes description of data item in xml syntax.

Parameters
[in,out]this[in,out] this fileio type
[in]mesh[in] mesh mesh type
[in]name[in] name
[in]filename[in] filename
[in]dims[in] dims
[in]offset[in,out] offset
[in]ref[in] ref
[in]indent[in] indentation level

Definition at line 307 of file fileio_xdmf.f90.

Here is the call graph for this function:

◆ writedataitem()

subroutine fileio_xdmf_mod::writedataitem ( class(fileio_xdmf), intent(inout)  this,
character(len=*), intent(in)  dims,
character(len=*), intent(in)  filename,
integer, intent(in)  offset,
integer, intent(in)  indent 
)
private

Writes description of data item in xml syntax.

Parameters
[in,out]this[in,out] this fileio type
[in]dims[in] dims
[in]filename[in] filename
[in]offset[in] offset
[in]indent[in] indentation level

Definition at line 281 of file fileio_xdmf.f90.

◆ writekey_xdmf()

subroutine fileio_xdmf_mod::writekey_xdmf ( class(fileio_xdmf), intent(inout)  this,
integer, intent(inout)  offset,
character(len=*), intent(in)  key,
integer, intent(in)  type,
integer, intent(in)  bytes,
integer, dimension(5), intent(in), optional  dims 
)
private

Write the xdmf key.

Attention
There is also a WriteKey function in the parent class (binary) which should not be inherited
Parameters
[in,out]this[in,out]

Definition at line 177 of file fileio_xdmf.f90.

◆ writemeshxml()

subroutine fileio_xdmf_mod::writemeshxml ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
character(len=*), intent(in)  filename,
integer  indent 
)
private

Writes the mesh to file.

Parameters
[in,out]this[in,out] this fileio type
[in]mesh[in] mesh mesh type
[in]filename[in] filename
indent[in] indent indentation level

Definition at line 405 of file fileio_xdmf.f90.

Here is the call graph for this function:

◆ writenode_xdmf()

subroutine fileio_xdmf_mod::writenode_xdmf ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
character(len=max_char_len), intent(in)  key,
type(dict_typ), intent(in), pointer  node,
integer, intent(inout)  offset,
character(len=*), intent(in)  filename,
integer, intent(in)  indent 
)
private

Write the xdmf node.

Attention
There is also a WriteNode function in the parent class (binary) which should not be inherited
Parameters
[in,out]this[in,out] this fileio type
[in]mesh[in] mesh mesh type
[in]node[in] data node
[in,out]offset[in,out] offset
[in]filename[in] filename
[in]indent[in] indentation level

Definition at line 206 of file fileio_xdmf.f90.

Here is the call graph for this function:

◆ writevector()

subroutine fileio_xdmf_mod::writevector ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
character(len=*), intent(in)  name,
integer, dimension(3), intent(in)  dims,
character(len=*), intent(in)  ref1,
character(len=*), intent(in)  ref2,
character(len=*), intent(in)  ref3,
character(len=*), intent(in)  step 
)
private

Writes the mesh to file.

Parameters
[in,out]this[in,out] this fileio type
[in]mesh[in] mesh mesh type
[in]name[in] name
[in]dims[in] dims
[in]ref3[in] name
[in]step[in]

Definition at line 363 of file fileio_xdmf.f90.

Here is the call graph for this function:

◆ writexmf()

subroutine fileio_xdmf_mod::writexmf ( class(fileio_xdmf), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
type(dict_typ), intent(in), pointer  IO 
)
private

Main routine to write all data to xmf file.

Parameters
[in,out]this[in,out] this fileio type
[in]mesh[in] mesh mesh type
[in]io[in] io I/O dictionary

Definition at line 447 of file fileio_xdmf.f90.

Variable Documentation

◆ blk_indent

integer, parameter fileio_xdmf_mod::blk_indent = 2
private

block indentation

Definition at line 64 of file fileio_xdmf.f90.

◆ lf

character, parameter fileio_xdmf_mod::lf = ACHAR(10)
private

line feed

Definition at line 66 of file fileio_xdmf.f90.

◆ sp

character, parameter fileio_xdmf_mod::sp = ACHAR(32)
private

space

Definition at line 65 of file fileio_xdmf.f90.

◆ tb

character(len=2), parameter fileio_xdmf_mod::tb = REPEAT(SP, BLK_INDENT)
private

Definition at line 67 of file fileio_xdmf.f90.