Skip to content

vtk_fortran_vtk_file_xml_writer_abstract

VTK file abstract XML writer.

Source: src/lib/vtk_fortran_vtk_file_xml_writer_abstract.f90

Dependencies

Contents

Derived Types

xml_writer_abstract

VTK file abstract XML writer.

Inheritance

Attributes: abstract

Components

NameTypeAttributesDescription
format_chtype(string)Output format, string code.
topologytype(string)Mesh topology.
indentinteger(kind=I4P)Indent count.
ioffsetinteger(kind=I8P)Offset count.
xmlinteger(kind=I4P)XML Logical unit.
vtm_blockinteger(kind=I4P)Block indexes.
errorinteger(kind=I4P)IO Error status.
tagtype(xml_tag)XML tags handler.
is_volatilelogicalFlag to check volatile writer.
xml_volatiletype(string)XML file volatile (not a physical file).

Type-Bound Procedures

NameAttributesDescription
close_xml_filepass(self)Close xml file.
open_xml_filepass(self)Open xml file.
freepass(self)Free allocated memory.
get_xml_volatilepass(self)Return the XML volatile string file.
write_connectivitypass(self)Write connectivity.
write_dataarray_location_tagpass(self)Write dataarray location tag.
write_dataarray_tagpass(self)Write dataarray tag.
write_dataarray_tag_appendedpass(self)Write dataarray appended tag.
write_end_tagpass(self)Write `` end tag.
write_header_tagpass(self)Write header tag.
write_parallel_open_blockpass(self)Write parallel open block.
write_parallel_close_blockpass(self)Write parallel close block.
write_parallel_dataarraypass(self)Write parallel dataarray.
write_parallel_geopass(self)Write parallel geo.
write_self_closing_tagpass(self)Write self closing tag.
write_start_tagpass(self)Write start tag.
write_tagpass(self)Write tag.
write_topology_tagpass(self)Write topology tag.
initializepass(self)Initialize writer.
finalizepass(self)Finalize writer.
write_dataarrayWrite data (array).
write_fielddataWrite FieldData tag.
write_geoWrite mesh.
write_parallel_block_filesWrite block list of files.
write_pieceWrite Piece start/end tag.
write_dataarray1_rank1_R8Ppass(self)Data 1, rank 1, R8P.
write_dataarray1_rank1_R4Ppass(self)Data 1, rank 1, R4P.
write_dataarray1_rank1_I8Ppass(self)Data 1, rank 1, I8P.
write_dataarray1_rank1_I4Ppass(self)Data 1, rank 1, I4P.
write_dataarray1_rank1_I2Ppass(self)Data 1, rank 1, I2P.
write_dataarray1_rank1_I1Ppass(self)Data 1, rank 1, I1P.
write_dataarray1_rank2_R8Ppass(self)Data 1, rank 2, R8P.
write_dataarray1_rank2_R4Ppass(self)Data 1, rank 2, R4P.
write_dataarray1_rank2_I8Ppass(self)Data 1, rank 2, I8P.
write_dataarray1_rank2_I4Ppass(self)Data 1, rank 2, I4P.
write_dataarray1_rank2_I2Ppass(self)Data 1, rank 2, I2P.
write_dataarray1_rank2_I1Ppass(self)Data 1, rank 2, I1P.
write_dataarray1_rank3_R8Ppass(self)Data 1, rank 3, R8P.
write_dataarray1_rank3_R4Ppass(self)Data 1, rank 3, R4P.
write_dataarray1_rank3_I8Ppass(self)Data 1, rank 3, I8P.
write_dataarray1_rank3_I4Ppass(self)Data 1, rank 3, I4P.
write_dataarray1_rank3_I2Ppass(self)Data 1, rank 3, I2P.
write_dataarray1_rank3_I1Ppass(self)Data 1, rank 3, I1P.
write_dataarray1_rank4_R8Ppass(self)Data 1, rank 4, R8P.
write_dataarray1_rank4_R4Ppass(self)Data 1, rank 4, R4P.
write_dataarray1_rank4_I8Ppass(self)Data 1, rank 4, I8P.
write_dataarray1_rank4_I4Ppass(self)Data 1, rank 4, I4P.
write_dataarray1_rank4_I2Ppass(self)Data 1, rank 4, I2P.
write_dataarray1_rank4_I1Ppass(self)Data 1, rank 4, I1P.
write_dataarray3_rank1_R8Ppass(self)Data 3, rank 1, R8P.
write_dataarray3_rank1_R4Ppass(self)Data 3, rank 1, R4P.
write_dataarray3_rank1_I8Ppass(self)Data 3, rank 1, I8P.
write_dataarray3_rank1_I4Ppass(self)Data 3, rank 1, I4P.
write_dataarray3_rank1_I2Ppass(self)Data 3, rank 1, I2P.
write_dataarray3_rank1_I1Ppass(self)Data 3, rank 1, I1P.
write_dataarray3_rank3_R8Ppass(self)Data 3, rank 3, R8P.
write_dataarray3_rank3_R4Ppass(self)Data 3, rank 3, R4P.
write_dataarray3_rank3_I8Ppass(self)Data 3, rank 3, I8P.
write_dataarray3_rank3_I4Ppass(self)Data 3, rank 3, I4P.
write_dataarray3_rank3_I2Ppass(self)Data 3, rank 3, I2P.
write_dataarray3_rank3_I1Ppass(self)Data 3, rank 3, I1P.
write_dataarray6_rank1_R8Ppass(self)Data 3, rank 1, R8P.
write_dataarray6_rank1_R4Ppass(self)Data 3, rank 1, R4P.
write_dataarray6_rank1_I8Ppass(self)Data 3, rank 1, I8P.
write_dataarray6_rank1_I4Ppass(self)Data 3, rank 1, I4P.
write_dataarray6_rank1_I2Ppass(self)Data 3, rank 1, I2P.
write_dataarray6_rank1_I1Ppass(self)Data 3, rank 1, I1P.
write_dataarray6_rank3_R8Ppass(self)Data 3, rank 3, R8P.
write_dataarray6_rank3_R4Ppass(self)Data 3, rank 3, R4P.
write_dataarray6_rank3_I8Ppass(self)Data 3, rank 3, I8P.
write_dataarray6_rank3_I4Ppass(self)Data 3, rank 3, I4P.
write_dataarray6_rank3_I2Ppass(self)Data 3, rank 3, I2P.
write_dataarray6_rank3_I1Ppass(self)Data 3, rank 3, I1P.
write_dataarray_appendedpass(self)Write appended.
write_fielddata1_rank0pass(self)Write FieldData tag (data 1, rank 0, R8P).
write_fielddata_tagpass(self)Write FieldData tag.
write_geo_strg_data1_rank2_R8Ppass(self)Write StructuredGrid mesh (data 1, rank 2, R8P).
write_geo_strg_data1_rank2_R4Ppass(self)Write StructuredGrid mesh (data 1, rank 2, R4P).
write_geo_strg_data1_rank4_R8Ppass(self)Write StructuredGrid mesh (data 1, rank 4, R8P).
write_geo_strg_data1_rank4_R4Ppass(self)Write StructuredGrid mesh (data 1, rank 4, R4P).
write_geo_strg_data3_rank1_R8Ppass(self)Write StructuredGrid mesh (data 3, rank 1, R8P).
write_geo_strg_data3_rank1_R4Ppass(self)Write StructuredGrid mesh (data 3, rank 1, R4P).
write_geo_strg_data3_rank3_R8Ppass(self)Write StructuredGrid mesh (data 3, rank 3, R8P).
write_geo_strg_data3_rank3_R4Ppass(self)Write StructuredGrid mesh (data 3, rank 3, R4P).
write_geo_rect_data3_rank1_R8Ppass(self)Write RectilinearGrid mesh (data 3, rank 1, R8P).
write_geo_rect_data3_rank1_R4Ppass(self)Write RectilinearGrid mesh (data 3, rank 1, R4P).
write_geo_unst_data1_rank2_R8Ppass(self)Write UnstructuredGrid mesh (data 1, rank 2, R8P).
write_geo_unst_data1_rank2_R4Ppass(self)Write UnstructuredGrid mesh (data 1, rank 2, R4P).
write_geo_unst_data3_rank1_R8Ppass(self)Write UnstructuredGrid mesh (data 3, rank 1, R8P).
write_geo_unst_data3_rank1_R4Ppass(self)Write UnstructuredGrid mesh (data 3, rank 1, R4P).
write_piece_start_tagpass(self)Write `` start tag.
write_piece_start_tag_unstpass(self)Write `` start tag for unstructured topology.
write_piece_end_tagpass(self)Write `` end tag.
write_parallel_block_filepass(self)Write single file that belong to the current block.
write_parallel_block_files_arraypass(self)Write block list of files (array input).
write_parallel_block_files_stringpass(self)Write block list of files (string input).

Subroutines

close_xml_file

Close XML file.

fortran
subroutine close_xml_file(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.

Call graph

open_xml_file

Open XML file.

fortran
subroutine open_xml_file(self, filename)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
filenamecharacter(len=*)inFile name.

Call graph

free

Free allocated memory.

Attributes: elemental

fortran
subroutine free(self, error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
errorinteger(kind=I4P)outoptionalError status.

get_xml_volatile

Return the eventual XML volatile string file.

Attributes: pure

fortran
subroutine get_xml_volatile(self, xml_volatile, error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inWriter.
xml_volatilecharacter(len=:)outallocatableXML volatile file.
errorinteger(kind=I4P)outoptionalError status.

Call graph

write_end_tag

Write </tag_name> end tag.

fortran
subroutine write_end_tag(self, name)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
namecharacter(len=*)inTag name.

Call graph

write_header_tag

Write header tag.

fortran
subroutine write_header_tag(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.

Call graph

write_self_closing_tag

Write <tag_name.../> self closing tag.

fortran
subroutine write_self_closing_tag(self, name, attributes)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
namecharacter(len=*)inTag name.
attributescharacter(len=*)inoptionalTag attributes.

Call graph

write_start_tag

Write <tag_name...> start tag.

fortran
subroutine write_start_tag(self, name, attributes)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
namecharacter(len=*)inTag name.
attributescharacter(len=*)inoptionalTag attributes.

Call graph

write_tag

Write <tag_name...>...</tag_name> tag.

fortran
subroutine write_tag(self, name, attributes, content)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
namecharacter(len=*)inTag name.
attributescharacter(len=*)inoptionalTag attributes.
contentcharacter(len=*)inoptionalTag content.

Call graph

write_topology_tag

Write XML topology tag.

fortran
subroutine write_topology_tag(self, nx1, nx2, ny1, ny2, nz1, nz2, mesh_kind)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
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.
mesh_kindcharacter(len=*)inoptionalKind of mesh data: Float64, Float32, ecc.

Call graph

write_dataarray_tag

Write <DataArray...>...</DataArray> tag.

fortran
subroutine write_dataarray_tag(self, data_type, number_of_components, data_name, data_content, is_tuples)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
data_typecharacter(len=*)inType of dataarray.
number_of_componentsinteger(kind=I4P)inNumber of dataarray components.
data_namecharacter(len=*)inData name.
data_contentcharacter(len=*)inoptionalData content.
is_tupleslogicalinoptionalUse "NumberOfTuples".

Call graph

write_dataarray_tag_appended

Write <DataArray.../> tag.

fortran
subroutine write_dataarray_tag_appended(self, data_type, number_of_components, data_name, is_tuples)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
data_typecharacter(len=*)inType of dataarray.
number_of_componentsinteger(kind=I4P)inNumber of dataarray components.
data_namecharacter(len=*)inData name.
is_tupleslogicalinoptionalUse "NumberOfTuples".

Call graph

Functions

write_dataarray_location_tag

Write <[/]PointData> or <[/]CellData> open/close tag.

@note must be called before saving the data related to geometric mesh, this function initializes the saving of data variables indicating the location (node or cell centered) of variables that will be saved.

@note A single file can contain both cell and node centered variables. In this case the VTK_DAT_XML function must be called two times, before saving cell-centered variables and before saving node-centered variables.

Examples of usage

Opening node piece

fortran
 error = vtk%write_dataarray('node','OPeN')

Closing node piece

fortran
 error = vtk%write_dataarray('node','Close')

Opening cell piece

fortran
 error = vtk%write_dataarray('cell','OPEN')

Closing cell piece

fortran
 error = vtk%write_dataarray('cell','close')

Returns: integer(kind=I4P)

fortran
function write_dataarray_location_tag(self, location, action) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
locationcharacter(len=*)inLocation of variables: cell or node centered.
actioncharacter(len=*)inAction: open or close tag.

Call graph

write_fielddata1_rank0

Write <DataArray... NumberOfTuples="..."...>...</DataArray> tag (R8P).

Returns: integer(kind=I4P)

fortran
function write_fielddata1_rank0(self, data_name, x) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
data_namecharacter(len=*)inData name.
xclass(*)inData variable.

Call graph

write_fielddata_tag

Write <FieldData>/</FieldData> start/end tag.

Returns: integer(kind=I4P)

fortran
function write_fielddata_tag(self, action) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
actioncharacter(len=*)inAction: open or close tag.

Call graph

write_piece_start_tag

Write <Piece ...> start tag.

Returns: integer(kind=I4P)

fortran
function write_piece_start_tag(self, nx1, nx2, ny1, ny2, nz1, nz2) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
nx1integer(kind=I4P)inInitial node of x axis.
nx2integer(kind=I4P)inFinal node of x axis.
ny1integer(kind=I4P)inInitial node of y axis.
ny2integer(kind=I4P)inFinal node of y axis.
nz1integer(kind=I4P)inInitial node of z axis.
nz2integer(kind=I4P)inFinal node of z axis.

Call graph

write_piece_start_tag_unst

Write <Piece ...> start tag for unstructured topology.

Returns: integer(kind=I4P)

fortran
function write_piece_start_tag_unst(self, np, nc) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
npinteger(kind=I4P)inNumber of points.
ncinteger(kind=I4P)inNumber of cells.

Call graph

write_piece_end_tag

Write </Piece> end tag.

Returns: integer(kind=I4P)

fortran
function write_piece_end_tag(self) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.

Call graph

write_geo_rect_data3_rank1_R8P

Write mesh with RectilinearGrid topology (data 3, rank 1, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_rect_data3_rank1_R8P(self, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xreal(kind=R8P)inX coordinates.
yreal(kind=R8P)inY coordinates.
zreal(kind=R8P)inZ coordinates.

Call graph

write_geo_rect_data3_rank1_R4P

Write mesh with RectilinearGrid topology (data 3, rank 1, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_rect_data3_rank1_R4P(self, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xreal(kind=R4P)inX coordinates.
yreal(kind=R4P)inY coordinates.
zreal(kind=R4P)inZ coordinates.

Call graph

write_geo_strg_data1_rank2_R8P

Write mesh with StructuredGrid topology (data 1, rank 2, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data1_rank2_R8P(self, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xyzreal(kind=R8P)inX, y, z coordinates [1:3,1:n].

Call graph

write_geo_strg_data1_rank2_R4P

Write mesh with StructuredGrid topology (data 1, rank 2, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data1_rank2_R4P(self, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xyzreal(kind=R4P)inX, y, z coordinates [1:3,:].

Call graph

write_geo_strg_data1_rank4_R8P

Write mesh with StructuredGrid topology (data 1, rank 4, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data1_rank4_R8P(self, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xyzreal(kind=R8P)inX, y, z coordinates [1:3,:,:,:].

Call graph

write_geo_strg_data1_rank4_R4P

Write mesh with StructuredGrid topology (data 1, rank 4, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data1_rank4_R4P(self, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
xyzreal(kind=R4P)inX, y, z coordinates [1:3,:,:,:].

Call graph

write_geo_strg_data3_rank1_R8P

Write mesh with StructuredGrid topology (data 3, rank 1, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data3_rank1_R8P(self, n, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
ninteger(kind=I4P)inNumber of nodes.
xreal(kind=R8P)inX coordinates.
yreal(kind=R8P)inY coordinates.
zreal(kind=R8P)inZ coordinates.

Call graph

write_geo_strg_data3_rank1_R4P

Write mesh with StructuredGrid topology (data 3, rank 1, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data3_rank1_R4P(self, n, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
ninteger(kind=I4P)inNumber of nodes.
xreal(kind=R4P)inX coordinates.
yreal(kind=R4P)inY coordinates.
zreal(kind=R4P)inZ coordinates.

Call graph

write_geo_strg_data3_rank3_R8P

Write mesh with StructuredGrid topology (data 3, rank 3, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data3_rank3_R8P(self, n, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
ninteger(kind=I4P)inNumber of nodes.
xreal(kind=R8P)inX coordinates.
yreal(kind=R8P)inY coordinates.
zreal(kind=R8P)inZ coordinates.

Call graph

write_geo_strg_data3_rank3_R4P

Write mesh with StructuredGrid topology (data 3, rank 3, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_strg_data3_rank3_R4P(self, n, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
ninteger(kind=I4P)inNumber of nodes.
xreal(kind=R4P)inX coordinates.
yreal(kind=R4P)inY coordinates.
zreal(kind=R4P)inZ coordinates.

Call graph

write_geo_unst_data1_rank2_R8P

Write mesh with UnstructuredGrid topology (data 1, rank 2, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_unst_data1_rank2_R8P(self, np, nc, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
npinteger(kind=I4P)inNumber of points.
ncinteger(kind=I4P)inNumber of cells.
xyzreal(kind=R8P)inX, y, z coordinates [1:3,:].

Call graph

write_geo_unst_data1_rank2_R4P

Write mesh with UnstructuredGrid topology (data 1, rank 2, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_unst_data1_rank2_R4P(self, np, nc, xyz) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
npinteger(kind=I4P)inNumber of points.
ncinteger(kind=I4P)inNumber of cells.
xyzreal(kind=R4P)inX, y, z coordinates [1:3,:].

Call graph

write_geo_unst_data3_rank1_R8P

Write mesh with UnstructuredGrid topology (data 3, rank 1, R8P).

Returns: integer(kind=I4P)

fortran
function write_geo_unst_data3_rank1_R8P(self, np, nc, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
npinteger(kind=I4P)inNumber of points.
ncinteger(kind=I4P)inNumber of cells.
xreal(kind=R8P)inX coordinates.
yreal(kind=R8P)inY coordinates.
zreal(kind=R8P)inZ coordinates.

Call graph

write_geo_unst_data3_rank1_R4P

Write mesh with UnstructuredGrid topology (data 3, rank 1, R4P).

Returns: integer(kind=I4P)

fortran
function write_geo_unst_data3_rank1_R4P(self, np, nc, x, y, z) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
npinteger(kind=I4P)inNumber of points.
ncinteger(kind=I4P)inNumber of cells.
xreal(kind=R4P)inX coordinates.
yreal(kind=R4P)inY coordinates.
zreal(kind=R4P)inZ coordinates.

Call graph

write_connectivity

Write mesh connectivity.

Must be used when unstructured grid is used, it saves the connectivity of the unstructured gird. @note The vector connect must follow the VTK-XML standard. It is passed as assumed-shape array because its dimensions is related to the mesh dimensions in a complex way. Its dimensions can be calculated by the following equation: (dc = \sum\limits_{i = 1}^{NC} {nvertex_i }). Note that this equation is different from the legacy one. The XML connectivity convention is quite different from the legacy standard. As an example suppose we have a mesh composed by 2 cells, one hexahedron (8 vertices) and one pyramid with square basis (5 vertices) and suppose that the basis of pyramid is constitute by a face of the hexahedron and so the two cells share 4 vertices. The above equation gives (dc=8+5=13). The connectivity vector for this mesh can be:

first cell
  • connect(1) = 0 identification flag of (1^\circ) vertex of first cell
  • connect(2) = 1 identification flag of (2^\circ) vertex of first cell
  • connect(3) = 2 identification flag of (3^\circ) vertex of first cell
  • connect(4) = 3 identification flag of (4^\circ) vertex of first cell
  • connect(5) = 4 identification flag of (5^\circ) vertex of first cell
  • connect(6) = 5 identification flag of (6^\circ) vertex of first cell
  • connect(7) = 6 identification flag of (7^\circ) vertex of first cell
  • connect(8) = 7 identification flag of (8^\circ) vertex of first cell
second cell
  • connect(9 ) = 0 identification flag of (1^\circ) vertex of second cell
  • connect(10) = 1 identification flag of (2^\circ) vertex of second cell
  • connect(11) = 2 identification flag of (3^\circ) vertex of second cell
  • connect(12) = 3 identification flag of (4^\circ) vertex of second cell
  • connect(13) = 8 identification flag of (5^\circ) vertex of second cell

Therefore this connectivity vector convention is more simple than the legacy convention, now we must create also the offset vector that contains the data now missing in the connect vector. The offset vector for this mesh can be:

first cell
  • offset(1) = 8 => summ of nodes of (1^\circ) cell
second cell
  • offset(2) = 13 => summ of nodes of (1^\circ) and (2^\circ) cells

The value of every cell-offset can be calculated by the following equation: (offset_c=\sum\limits_{i=1}^{c}{nvertex_i}) where (offset_c) is the value of (c^{th}) cell and (nvertex_i) is the number of vertices of (i^{th}) cell. The function VTK_CON_XML does not calculate the connectivity and offset vectors: it writes the connectivity and offset vectors conforming the VTK-XML standard, but does not calculate them. The vector variable cell_type must conform the VTK-XML standard (see the file VTK-Standard at the Kitware homepage) that is the same of the legacy standard. It contains the type of each cells. For the above example this vector is:

first cell
  • cell_type(1) = 12 hexahedron type of first cell
second cell
  • cell_type(2) = 14 pyramid type of second cell Add faces and faceoffsets to the cell block for polyhedra. If the cell is not a polyhedron, its offset must be set to -1.

Returns: integer(kind=I4P)

fortran
function write_connectivity(self, nc, connectivity, offset, cell_type, face, faceoffset) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
ncinteger(kind=I4P)inNumber of cells.
connectivityinteger(kind=I4P)inMesh connectivity.
offsetinteger(kind=I4P)inCell offset.
cell_typeinteger(kind=I1P)inVTK cell type.
faceinteger(kind=I4P)inoptionalface composing the polyhedra.
faceoffsetinteger(kind=I4P)inoptionalface offset.

Call graph

write_parallel_open_block

Write a block (open) container.

Returns: integer(kind=I4P)

fortran
function write_parallel_open_block(self, name) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
namecharacter(len=*)inoptionalBlock name.

Call graph

write_parallel_close_block

Close a block container.

Returns: integer(kind=I4P)

fortran
function write_parallel_close_block(self) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.

Call graph

write_parallel_dataarray

Write parallel (partitioned) VTK-XML dataarray info.

Returns: integer(kind=I4P)

fortran
function write_parallel_dataarray(self, data_name, data_type, number_of_components) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
data_namecharacter(len=*)inData name.
data_typecharacter(len=*)inType of dataarray.
number_of_componentsinteger(kind=I4P)inoptionalNumber of dataarray components.

Call graph

write_parallel_geo

Write parallel (partitioned) VTK-XML geo source file.

Returns: integer(kind=I4P)

fortran
function write_parallel_geo(self, source, nx1, nx2, ny1, ny2, nz1, nz2) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
sourcecharacter(len=*)inSource file name containing the piece data.
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.

Call graph

write_parallel_block_file

Write single file that belong to the current block.

Returns: integer(kind=I4P)

fortran
function write_parallel_block_file(self, file_index, filename, name) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
file_indexinteger(kind=I4P)inIndex of file in the list.
filenamecharacter(len=*)inWrapped file names.
namecharacter(len=*)inoptionalNames attributed to wrapped file.

Call graph

write_parallel_block_files_array

Write list of files that belong to the current block (list passed as rank 1 array).

Example of usage: 3 files blocks

fortran
 error = vtm%write_files_list_of_block(filenames=['file_1.vts','file_2.vts','file_3.vtu'])

Example of usage: 3 files blocks with custom name

fortran
 error = vtm%write_files_list_of_block(filenames=['file_1.vts','file_2.vts','file_3.vtu'],&
                                       names=['block-bar','block-foo','block-baz'])

Returns: integer(kind=I4P)

fortran
function write_parallel_block_files_array(self, filenames, names) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
filenamescharacter(len=*)inList of VTK-XML wrapped file names.
namescharacter(len=*)inoptionalList names attributed to wrapped files.

Call graph

write_parallel_block_files_string

Write list of files that belong to the current block (list passed as single string).

Example of usage: 3 files blocks

fortran
 error = vtm%write_files_list_of_block(filenames='file_1.vts file_2.vts file_3.vtu')

Example of usage: 3 files blocks with custom name

fortran
 error = vtm%write_files_list_of_block(filenames='file_1.vts file_2.vts file_3.vtu',&
                                       names='block-bar block-foo block-baz')

Returns: integer(kind=I4P)

fortran
function write_parallel_block_files_string(self, filenames, names, delimiter) result(error)

Arguments

NameTypeIntentAttributesDescription
selfclass(xml_writer_abstract)inoutWriter.
filenamescharacter(len=*)inList of VTK-XML wrapped file names.
namescharacter(len=*)inoptionalList names attributed to wrapped files.
delimitercharacter(len=*)inoptionalDelimiter character.

Call graph