Skip to content

Lib_VTK_IO_INI_XML

INI_XML interface definition for Lib_VTK_IO.

Source: src/third_party/VTKFortran/references/legacy/Lib_VTK_IO_INI_XML.f90

Dependencies

Contents

Functions

VTK_INI_XML_WRITE

Procedure for initializing VTK-XML file (exporter).

The XML standard is more powerful than legacy one. It is flexible but on the other hand is (but not so more using this library ...) complex than legacy standard. The output of XML functions is a well-formated valid XML file, at least for the ascii, binary and binary appended formats (in the raw-binary format the library uses raw-binary-appended format that is not a valid XML file). Note that the XML functions have the same name of legacy functions with the suffix XML. @note This function must be the first to be called.

Supported output formats are (the passed specifier value is case insensitive):

  • ASCII: data are saved in ASCII format;
  • BINARY: data are saved in base64 encoded format;
  • RAW: data are saved in raw-binary format in the appended tag of the XML file;
  • BINARY-APPENDED: data are saved in base64 encoded format in the appended tag of the XML file. Supported topologies are:
  • RectilinearGrid;
  • StructuredGrid;
  • UnstructuredGrid.

Example of usage

fortran
 integer(I4P):: nx1,nx2,ny1,ny2,nz1,nz2
 ...
 E_IO = VTK_INI_XML('BINARY','XML_RECT_BINARY.vtr','RectilinearGrid',nx1=nx1,nx2=nx2,ny1=ny1,ny2=ny2,nz1=nz1,nz2=nz2)
 ...

Note that the file extension is necessary in the file name. The XML standard has different extensions for each different topologies (e.g. vtr for rectilinear topology). See the VTK-standard file for more information.

Returns: integer(kind=I4P)

fortran
function VTK_INI_XML_WRITE(fformat, filename, mesh_topology, nx1, nx2, ny1, ny2, nz1, nz2, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
fformatcharacter(len=*)inFile format: ASCII, BINARY, RAW or BINARY-APPENDED.
filenamecharacter(len=*)inFile name.
mesh_topologycharacter(len=*)inMesh topology.
nx1integer(kind=I4P)inoptionalInitial node of x axis.
nx2integer(kind=I4P)inoptionalFinal node of x axis.
ny1integer(kind=I4P)inoptionalInitial node of y axis.
ny2integer(kind=I4P)inoptionalFinal node of y axis.
nz1integer(kind=I4P)inoptionalInitial node of z axis.
nz2integer(kind=I4P)inoptionalFinal node of z axis.
cfinteger(kind=I4P)outoptionalCurrent file index (for concurrent files IO).

Call graph

VTK_INI_XML_READ

Procedure for initializing VTK-XML file (importer).

Supported input formats are (the passed specifier value is case insensitive):

  • ASCII: data are saved in ASCII format; (Not implemented!)
  • BINARY: data are saved in base64 encoded format; (Not tested!)
  • RAW: data are saved in raw-binary format in the appended tag of the XML file; (Not implemented!)
  • BINARY-APPENDED: data are saved in base64 encoded format in the appended tag of the XML file. (Not implemented!) Supported topologies are:
  • RectilinearGrid; (Not tested!)
  • StructuredGrid; (Not tested!)
  • UnstructuredGrid. (Not tested!)

Example of usage

fortran
 integer(I4P):: nx1,nx2,ny1,ny2,nz1,nz2
 ...
 E_IO = VTK_INI_XML_READ('BINARY','XML_RECT_BINARY.vtr','RectilinearGrid',nx1=nx1,nx2=nx2,ny1=ny1,ny2=ny2,nz1=nz1,nz2=nz2,cf=rf)
 ...

Note that the file extension is necessary in the file name. The XML standard has different extensions for each different topologies (e.g. vtr for rectilinear topology). See the VTK-standard file for more information.

Returns: integer(kind=I4P)

fortran
function VTK_INI_XML_READ(fformat, filename, mesh_topology, npieces, nx1, nx2, ny1, ny2, nz1, nz2, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
fformatcharacter(len=*)inFile format: ASCII, BINARY or RAW
filenamecharacter(len=*)inFile name
mesh_topologycharacter(len=*)inMesh topology
npiecesinteger(kind=I4P)outoptionalNumber of pieces stored in the file
nx1integer(kind=I4P)outoptionalInitial node of x axis.
nx2integer(kind=I4P)outoptionalFinal node of x axis.
ny1integer(kind=I4P)outoptionalInitial node of y axis.
ny2integer(kind=I4P)outoptionalFinal node of y axis.
nz1integer(kind=I4P)outoptionalInitial node of z axis.
nz2integer(kind=I4P)outoptionalFinal node of z axis.
cfinteger(kind=I4P)outoptionalCurrent file index (for concurrent files IO).

Call graph