Appearance
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
- xml_writer_abstract
- close_xml_file
- open_xml_file
- free
- get_xml_volatile
- write_end_tag
- write_header_tag
- write_self_closing_tag
- write_start_tag
- write_tag
- write_topology_tag
- write_dataarray_tag
- write_dataarray_tag_appended
- dataarray_tag_overrides
- image_attributes
- write_dataarray_location_tag
- write_fielddata1_rank0
- write_fielddata1_rank1
- write_fielddata_strings
- write_fielddata_tag
- write_piece_start_tag
- write_piece_start_tag_unst
- write_piece_start_tag_unst_I8P
- write_piece_start_tag_poly
- write_piece_start_tag_poly_I8P
- write_piece_end_tag
- write_geo_rect_data3_rank1_R8P
- write_geo_rect_data3_rank1_R4P
- write_geo_strg_data1_rank2_R8P
- write_geo_strg_data1_rank2_R4P
- write_geo_strg_data1_rank4_R8P
- write_geo_strg_data1_rank4_R4P
- write_geo_strg_data3_rank1_R8P
- write_geo_strg_data3_rank1_R4P
- write_geo_strg_data3_rank3_R8P
- write_geo_strg_data3_rank3_R4P
- write_geo_unst_data1_rank2_R8P
- write_geo_unst_data1_rank2_R8P_I8P
- write_geo_unst_data1_rank2_R4P
- write_geo_unst_data1_rank2_R4P_I8P
- write_geo_unst_data3_rank1_R8P
- write_geo_unst_data3_rank1_R8P_I8P
- write_geo_unst_data3_rank1_R4P
- write_geo_unst_data3_rank1_R4P_I8P
- write_connectivity_I4P
- write_connectivity_I8P
- write_dataarray_unsigned_I1P
- write_dataarray_unsigned_I2P
- write_dataarray_unsigned_I4P
- write_dataarray_unsigned_I8P
- write_polydata_cells
- write_parallel_open_block
- write_parallel_close_block
- next_vtm_index
- write_parallel_dataarray
- write_parallel_geo
- write_parallel_block_file
- write_parallel_block_files_array
- write_parallel_block_files_string
Derived Types
xml_writer_abstract
VTK file abstract XML writer.
Inheritance
Attributes: abstract
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
format_ch | type(string) | Output format, string code. | |
topology | type(string) | Mesh topology. | |
indent | integer(kind=I4P) | Indent count. | |
ghost_level | integer(kind=I4P) | Ghost level of parallel (P*) topologies. | |
data_type_override | type(string) | If set, type of the next DataArray tag (then unset). | |
tag_name_override | type(string) | If set, element name of the next DataArray tag (then unset). | |
tuples_override | integer(kind=I8P) | If >= 0, number of tuples of the next DataArray tag (then unset). | |
origin | real(kind=R8P) | Origin of ImageData topologies. | |
spacing | real(kind=R8P) | Spacing of ImageData topologies. | |
direction | real(kind=R8P) | Axes directions of ImageData topologies (row-major 3x3). | |
is_direction_set | logical | Write the Direction of ImageData topologies. | |
is_uint64 | logical | Use UInt64 (instead of UInt32) bytes count headers. | |
is_compressed | logical | Compress (zlib) the binary data. | |
ioffset | integer(kind=I8P) | Offset count. | |
xml | integer(kind=I4P) | XML Logical unit. | |
vtm_index | integer(kind=I4P) | allocatable | Next child index of each open level of a multi-block file. |
error | integer(kind=I4P) | IO Error status. | |
tag | type(xml_tag) | XML tags handler. | |
is_volatile | logical | Flag to check volatile writer. | |
xml_volatile | type(string) | XML file volatile (not a physical file). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
close_xml_file | pass(self) | Close xml file. |
open_xml_file | pass(self) | Open xml file. |
free | pass(self) | Free allocated memory. |
get_xml_volatile | pass(self) | Return the XML volatile string file. |
write_connectivity | Write connectivity. | |
write_polydata_cells | pass(self) | Write cell blocks of polydata. |
write_dataarray_location_tag | pass(self) | Write dataarray location tag. |
write_dataarray_tag | pass(self) | Write dataarray tag. |
write_dataarray_tag_appended | pass(self) | Write dataarray appended tag. |
write_end_tag | pass(self) | Write `` end tag. |
write_header_tag | pass(self) | Write header tag. |
write_parallel_open_block | pass(self) | Write parallel open block. |
write_parallel_close_block | pass(self) | Write parallel close block. |
write_parallel_dataarray | pass(self) | Write parallel dataarray. |
write_parallel_geo | pass(self) | Write parallel geo. |
write_self_closing_tag | pass(self) | Write self closing tag. |
write_start_tag | pass(self) | Write start tag. |
write_tag | pass(self) | Write tag. |
write_topology_tag | pass(self) | Write topology tag. |
image_attributes | pass(self) | Return ImageData attributes. |
initialize | pass(self) | Initialize writer. |
finalize | pass(self) | Finalize writer. |
write_dataarray | Write data (array). | |
write_fielddata | Write FieldData tag. | |
write_dataarray_unsigned | Write data (array) as unsigned integers. | |
write_geo | Write mesh. | |
write_parallel_block_files | Write block list of files. | |
write_piece | Write Piece start/end tag. | |
write_dataarray1_rank1_R8P | pass(self) | Data 1, rank 1, R8P. |
write_dataarray1_rank1_R4P | pass(self) | Data 1, rank 1, R4P. |
write_dataarray1_rank1_I8P | pass(self) | Data 1, rank 1, I8P. |
write_dataarray1_rank1_I4P | pass(self) | Data 1, rank 1, I4P. |
write_dataarray1_rank1_I2P | pass(self) | Data 1, rank 1, I2P. |
write_dataarray1_rank1_I1P | pass(self) | Data 1, rank 1, I1P. |
write_dataarray1_rank2_R8P | pass(self) | Data 1, rank 2, R8P. |
write_dataarray1_rank2_R4P | pass(self) | Data 1, rank 2, R4P. |
write_dataarray1_rank2_I8P | pass(self) | Data 1, rank 2, I8P. |
write_dataarray1_rank2_I4P | pass(self) | Data 1, rank 2, I4P. |
write_dataarray1_rank2_I2P | pass(self) | Data 1, rank 2, I2P. |
write_dataarray1_rank2_I1P | pass(self) | Data 1, rank 2, I1P. |
write_dataarray1_rank3_R8P | pass(self) | Data 1, rank 3, R8P. |
write_dataarray1_rank3_R4P | pass(self) | Data 1, rank 3, R4P. |
write_dataarray1_rank3_I8P | pass(self) | Data 1, rank 3, I8P. |
write_dataarray1_rank3_I4P | pass(self) | Data 1, rank 3, I4P. |
write_dataarray1_rank3_I2P | pass(self) | Data 1, rank 3, I2P. |
write_dataarray1_rank3_I1P | pass(self) | Data 1, rank 3, I1P. |
write_dataarray1_rank4_R8P | pass(self) | Data 1, rank 4, R8P. |
write_dataarray1_rank4_R4P | pass(self) | Data 1, rank 4, R4P. |
write_dataarray1_rank4_I8P | pass(self) | Data 1, rank 4, I8P. |
write_dataarray1_rank4_I4P | pass(self) | Data 1, rank 4, I4P. |
write_dataarray1_rank4_I2P | pass(self) | Data 1, rank 4, I2P. |
write_dataarray1_rank4_I1P | pass(self) | Data 1, rank 4, I1P. |
write_dataarray3_rank1_R8P | pass(self) | Data 3, rank 1, R8P. |
write_dataarray3_rank1_R4P | pass(self) | Data 3, rank 1, R4P. |
write_dataarray3_rank1_I8P | pass(self) | Data 3, rank 1, I8P. |
write_dataarray3_rank1_I4P | pass(self) | Data 3, rank 1, I4P. |
write_dataarray3_rank1_I2P | pass(self) | Data 3, rank 1, I2P. |
write_dataarray3_rank1_I1P | pass(self) | Data 3, rank 1, I1P. |
write_dataarray3_rank3_R8P | pass(self) | Data 3, rank 3, R8P. |
write_dataarray3_rank3_R4P | pass(self) | Data 3, rank 3, R4P. |
write_dataarray3_rank3_I8P | pass(self) | Data 3, rank 3, I8P. |
write_dataarray3_rank3_I4P | pass(self) | Data 3, rank 3, I4P. |
write_dataarray3_rank3_I2P | pass(self) | Data 3, rank 3, I2P. |
write_dataarray3_rank3_I1P | pass(self) | Data 3, rank 3, I1P. |
write_dataarray6_rank1_R8P | pass(self) | Data 3, rank 1, R8P. |
write_dataarray6_rank1_R4P | pass(self) | Data 3, rank 1, R4P. |
write_dataarray6_rank1_I8P | pass(self) | Data 3, rank 1, I8P. |
write_dataarray6_rank1_I4P | pass(self) | Data 3, rank 1, I4P. |
write_dataarray6_rank1_I2P | pass(self) | Data 3, rank 1, I2P. |
write_dataarray6_rank1_I1P | pass(self) | Data 3, rank 1, I1P. |
write_dataarray6_rank3_R8P | pass(self) | Data 3, rank 3, R8P. |
write_dataarray6_rank3_R4P | pass(self) | Data 3, rank 3, R4P. |
write_dataarray6_rank3_I8P | pass(self) | Data 3, rank 3, I8P. |
write_dataarray6_rank3_I4P | pass(self) | Data 3, rank 3, I4P. |
write_dataarray6_rank3_I2P | pass(self) | Data 3, rank 3, I2P. |
write_dataarray6_rank3_I1P | pass(self) | Data 3, rank 3, I1P. |
write_dataarray_appended | pass(self) | Write appended. |
write_dataarray_unsigned_I1P | pass(self) | Write data (array) as UInt8. |
write_dataarray_unsigned_I2P | pass(self) | Write data (array) as UInt16. |
write_dataarray_unsigned_I4P | pass(self) | Write data (array) as UInt32. |
write_dataarray_unsigned_I8P | pass(self) | Write data (array) as UInt64. |
write_fielddata1_rank0 | pass(self) | Write FieldData tag (data 1, rank 0). |
write_fielddata1_rank1 | pass(self) | Write FieldData tag (data 1, rank 1). |
write_fielddata_strings | pass(self) | Write FieldData tag (strings). |
dataarray_tag_overrides | pass(self) | Apply the one-shot overrides of DataArray tag. |
next_vtm_index | pass(self) | Return (and count) the next multi-block child index. |
write_fielddata_tag | pass(self) | Write FieldData tag. |
write_geo_strg_data1_rank2_R8P | pass(self) | Write StructuredGrid mesh (data 1, rank 2, R8P). |
write_geo_strg_data1_rank2_R4P | pass(self) | Write StructuredGrid mesh (data 1, rank 2, R4P). |
write_geo_strg_data1_rank4_R8P | pass(self) | Write StructuredGrid mesh (data 1, rank 4, R8P). |
write_geo_strg_data1_rank4_R4P | pass(self) | Write StructuredGrid mesh (data 1, rank 4, R4P). |
write_geo_strg_data3_rank1_R8P | pass(self) | Write StructuredGrid mesh (data 3, rank 1, R8P). |
write_geo_strg_data3_rank1_R4P | pass(self) | Write StructuredGrid mesh (data 3, rank 1, R4P). |
write_geo_strg_data3_rank3_R8P | pass(self) | Write StructuredGrid mesh (data 3, rank 3, R8P). |
write_geo_strg_data3_rank3_R4P | pass(self) | Write StructuredGrid mesh (data 3, rank 3, R4P). |
write_geo_rect_data3_rank1_R8P | pass(self) | Write RectilinearGrid mesh (data 3, rank 1, R8P). |
write_geo_rect_data3_rank1_R4P | pass(self) | Write RectilinearGrid mesh (data 3, rank 1, R4P). |
write_geo_unst_data1_rank2_R8P | pass(self) | Write UnstructuredGrid mesh (data 1, rank 2, R8P). |
write_geo_unst_data1_rank2_R4P | pass(self) | Write UnstructuredGrid mesh (data 1, rank 2, R4P). |
write_geo_unst_data3_rank1_R8P | pass(self) | Write UnstructuredGrid mesh (data 3, rank 1, R8P). |
write_geo_unst_data3_rank1_R4P | pass(self) | Write UnstructuredGrid mesh (data 3, rank 1, R4P). |
write_geo_unst_data1_rank2_R8P_I8P | pass(self) | Write UnstructuredGrid mesh, I8P counts. |
write_geo_unst_data1_rank2_R4P_I8P | pass(self) | Write UnstructuredGrid mesh, I8P counts. |
write_geo_unst_data3_rank1_R8P_I8P | pass(self) | Write UnstructuredGrid mesh, I8P counts. |
write_geo_unst_data3_rank1_R4P_I8P | pass(self) | Write UnstructuredGrid mesh, I8P counts. |
write_connectivity_I4P | pass(self) | Write connectivity (I4P ids). |
write_connectivity_I8P | pass(self) | Write connectivity (I8P ids). |
write_piece_start_tag | pass(self) | Write `` start tag. |
write_piece_start_tag_unst | pass(self) | Write `` start tag for unstructured topology. |
write_piece_start_tag_poly | pass(self) | Write `` start tag for polydata topology. |
write_piece_start_tag_unst_I8P | pass(self) | Write `` start tag, unstructured, I8P counts. |
write_piece_start_tag_poly_I8P | pass(self) | Write `` start tag, polydata, I8P counts. |
write_piece_end_tag | pass(self) | Write `` end tag. |
write_parallel_block_file | pass(self) | Write single file that belong to the current block. |
write_parallel_block_files_array | pass(self) | Write block list of files (array input). |
write_parallel_block_files_string | pass(self) | Write block list of files (string input). |
Subroutines
close_xml_file
Close XML file.
fortran
subroutine close_xml_file(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. |
Call graph
open_xml_file
Open XML file.
fortran
subroutine open_xml_file(self, filename)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
filename | character(len=*) | in | File name. |
Call graph
free
Free allocated memory.
Attributes: elemental
fortran
subroutine free(self, error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
error | integer(kind=I4P) | out | optional | Error status. |
get_xml_volatile
Return the eventual XML volatile string file.
Attributes: pure
fortran
subroutine get_xml_volatile(self, xml_volatile, error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | in | Writer. | |
xml_volatile | character(len=:) | out | allocatable | XML volatile file. |
error | integer(kind=I4P) | out | optional | Error status. |
Call graph
write_end_tag
Write </tag_name> end tag.
fortran
subroutine write_end_tag(self, name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
name | character(len=*) | in | Tag name. |
Call graph
write_header_tag
Write header tag.
The header_type (bytes count width) is always declared; when the binary data are compressed, the compressor is declared too: compressor="vtkZLibDataCompressor" header_type="UInt32".
fortran
subroutine write_header_tag(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. |
Call graph
write_self_closing_tag
Write <tag_name.../> self closing tag.
fortran
subroutine write_self_closing_tag(self, name, attributes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
name | character(len=*) | in | Tag name. | |
attributes | character(len=*) | in | optional | Tag attributes. |
Call graph
write_start_tag
Write <tag_name...> start tag.
fortran
subroutine write_start_tag(self, name, attributes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
name | character(len=*) | in | Tag name. | |
attributes | character(len=*) | in | optional | Tag attributes. |
Call graph
write_tag
Write <tag_name...>...</tag_name> tag.
fortran
subroutine write_tag(self, name, attributes, content)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
name | character(len=*) | in | Tag name. | |
attributes | character(len=*) | in | optional | Tag attributes. |
content | character(len=*) | in | optional | Tag 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
nx1 | integer(kind=I4P) | in | optional | Initial node of x axis. |
nx2 | integer(kind=I4P) | in | optional | Final node of x axis. |
ny1 | integer(kind=I4P) | in | optional | Initial node of y axis. |
ny2 | integer(kind=I4P) | in | optional | Final node of y axis. |
nz1 | integer(kind=I4P) | in | optional | Initial node of z axis. |
nz2 | integer(kind=I4P) | in | optional | Final node of z axis. |
mesh_kind | character(len=*) | in | optional | Kind 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_type | character(len=*) | in | Type of dataarray. | |
number_of_components | integer(kind=I4P) | in | Number of dataarray components. | |
data_name | character(len=*) | in | Data name. | |
data_content | character(len=*) | in | optional | Data content. |
is_tuples | logical | in | optional | Use "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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_type | character(len=*) | in | Type of dataarray. | |
number_of_components | integer(kind=I4P) | in | Number of dataarray components. | |
data_name | character(len=*) | in | Data name. | |
is_tuples | logical | in | optional | Use "NumberOfTuples". |
Call graph
dataarray_tag_overrides
Return element name, type and count of the next DataArray tag, applying (then unsetting) the one-shot overrides.
The overrides let a caller tag specially one array written through the generic DataArray writers: cell types as UInt8, strings as <Array type="String" NumberOfTuples="n"> (bytes written as Int8), field data arrays with their tuples count.
fortran
subroutine dataarray_tag_overrides(self, data_type, number_of_components, tag_name, data_type_, count)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_type | character(len=*) | in | Type of dataarray. | |
number_of_components | integer(kind=I4P) | in | Number of dataarray components. | |
tag_name | character(len=:) | out | allocatable | Element name. |
data_type_ | character(len=:) | out | allocatable | Type of dataarray. |
count | character(len=:) | out | allocatable | Components (or tuples) count. |
Call graph
Functions
image_attributes
Return the Origin="..." Spacing="..." [Direction="..."] attributes of ImageData topologies.
Values are written in the shortest form that reads back exactly.
Returns: character(len=:)
fortran
function image_attributes(self) result(attributes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | in | Writer. |
Call graph
write_dataarray_location_tag
Write <[/]PointData> or <[/]CellData> open/close tag (<[/]PPointData> or <[/]PCellData> for parallel files).
@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 this function must be called two times, before saving cell-centered variables and before saving node-centered variables.
@note When opening, the optional scalars, vectors, normals, tensors and tcoords arguments designate the active array of each role, written as the Scalars, Vectors, Normals, Tensors and TCoords attributes of the tag: readers (e.g. ParaView) use it as the default array of that role. Each argument is the data_name of an array written (or, for parallel files, declared) inside this tag; the name is not checked. They are ignored when closing.
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')Opening node piece designating the active scalars and vectors
fortran
error = vtk%write_dataarray(location='node', action='open', scalars='pressure', vectors='velocity')Returns: integer(kind=I4P)
fortran
function write_dataarray_location_tag(self, location, action, scalars, vectors, normals, tensors, tcoords) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
location | character(len=*) | in | Location of variables: cell or node centered. | |
action | character(len=*) | in | Action: open or close tag. | |
scalars | character(len=*) | in | optional | Name of the active scalars array. |
vectors | character(len=*) | in | optional | Name of the active vectors array. |
normals | character(len=*) | in | optional | Name of the active normals array. |
tensors | character(len=*) | in | optional | Name of the active tensors array. |
tcoords | character(len=*) | in | optional | Name of the active texture coordinates array. |
Call graph
write_fielddata1_rank0
Write one FieldData value: a number (any kind) or a string.
A number is written as <DataArray ... NumberOfTuples="1">, a string as <Array type="String" NumberOfTuples="1"> (its characters followed by a NUL, as VTK writes strings; trailing blanks are trimmed).
Example of usage
fortran
error = vtk%xml_writer%write_fielddata(action='open')
error = vtk%xml_writer%write_fielddata(data_name='TIME', x=0.1_R8P)
error = vtk%xml_writer%write_fielddata(data_name='solver', x='my solver v1.2')
error = vtk%xml_writer%write_fielddata(action='close')Returns: integer(kind=I4P)
fortran
function write_fielddata1_rank0(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | class(*) | in | Data variable. |
Call graph
write_fielddata1_rank1
Write a FieldData array: numbers (any kind) or strings, one tuple per element.
Numbers are written as <DataArray ... NumberOfTuples="size(x)"> (one component per tuple), strings as <Array type="String" NumberOfTuples="size(x)"> (each string followed by a NUL, as VTK writes strings; trailing blanks of each element are trimmed).
Example of usage
fortran
error = vtk%xml_writer%write_fielddata(data_name='residuals', x=[1.e-3_R8P, 1.e-4_R8P, 1.e-5_R8P])
error = vtk%xml_writer%write_fielddata(data_name='species', x=['N2', 'O2'])Returns: integer(kind=I4P)
fortran
function write_fielddata1_rank1(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | class(*) | in | Data variable. |
Call graph
write_fielddata_strings
Write FieldData strings as VTK does: <Array type="String" NumberOfTuples="size(x)">, the bytes of each string (trailing blanks trimmed) followed by a NUL, encoded as any Int8 data in the selected format.
Returns: integer(kind=I4P)
fortran
function write_fielddata_strings(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | character(len=*) | in | Strings. |
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
action | character(len=*) | in | Action: 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
nx1 | integer(kind=I4P) | in | Initial node of x axis. | |
nx2 | integer(kind=I4P) | in | Final node of x axis. | |
ny1 | integer(kind=I4P) | in | Initial node of y axis. | |
ny2 | integer(kind=I4P) | in | Final node of y axis. | |
nz1 | integer(kind=I4P) | in | Initial node of z axis. | |
nz2 | integer(kind=I4P) | in | Final 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nc | integer(kind=I4P) | in | Number of cells. |
Call graph
write_piece_start_tag_unst_I8P
Write <Piece ...> start tag for unstructured topology, 64-bit counts (more than 2^31-1 points or cells).
Returns: integer(kind=I4P)
fortran
function write_piece_start_tag_unst_I8P(self, np, nc) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nc | integer(kind=I8P) | in | Number of cells. |
Call graph
write_piece_start_tag_poly
Write <Piece ...> start tag for polydata topology: the number of points and of cells of each block.
Returns: integer(kind=I4P)
fortran
function write_piece_start_tag_poly(self, np, nverts, nlines, nstrips, npolys) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nverts | integer(kind=I4P) | in | Number of vertex cells (block Verts). | |
nlines | integer(kind=I4P) | in | Number of line/polyline cells (block Lines). | |
nstrips | integer(kind=I4P) | in | Number of triangle strip cells (block Strips). | |
npolys | integer(kind=I4P) | in | Number of polygon cells (block Polys). |
Call graph
write_piece_start_tag_poly_I8P
Write <Piece ...> start tag for polydata topology, 64-bit counts (more than 2^31-1 points or cells).
Returns: integer(kind=I4P)
fortran
function write_piece_start_tag_poly_I8P(self, np, nverts, nlines, nstrips, npolys) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nverts | integer(kind=I8P) | in | Number of vertex cells (block Verts). | |
nlines | integer(kind=I8P) | in | Number of line/polyline cells (block Lines). | |
nstrips | integer(kind=I8P) | in | Number of triangle strip cells (block Strips). | |
npolys | integer(kind=I8P) | in | Number of polygon cells (block Polys). |
Call graph
write_piece_end_tag
Write </Piece> end tag.
Returns: integer(kind=I4P)
fortran
function write_piece_end_tag(self) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. |
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
x | real(kind=R8P) | in | X coordinates. | |
y | real(kind=R8P) | in | Y coordinates. | |
z | real(kind=R8P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
x | real(kind=R4P) | in | X coordinates. | |
y | real(kind=R4P) | in | Y coordinates. | |
z | real(kind=R4P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
xyz | real(kind=R8P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
xyz | real(kind=R4P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
xyz | real(kind=R8P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
xyz | real(kind=R4P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
n | integer(kind=I4P) | in | Number of nodes. | |
x | real(kind=R8P) | in | X coordinates. | |
y | real(kind=R8P) | in | Y coordinates. | |
z | real(kind=R8P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
n | integer(kind=I4P) | in | Number of nodes. | |
x | real(kind=R4P) | in | X coordinates. | |
y | real(kind=R4P) | in | Y coordinates. | |
z | real(kind=R4P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
n | integer(kind=I4P) | in | Number of nodes. | |
x | real(kind=R8P) | in | X coordinates. | |
y | real(kind=R8P) | in | Y coordinates. | |
z | real(kind=R8P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
n | integer(kind=I4P) | in | Number of nodes. | |
x | real(kind=R4P) | in | X coordinates. | |
y | real(kind=R4P) | in | Y coordinates. | |
z | real(kind=R4P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nc | integer(kind=I4P) | in | Number of cells. | |
xyz | real(kind=R8P) | in | X, y, z coordinates [1:3,:]. |
Call graph
write_geo_unst_data1_rank2_R8P_I8P
Write mesh with UnstructuredGrid topology, 64-bit counts (data 1, rank 2, R8P).
Returns: integer(kind=I4P)
fortran
function write_geo_unst_data1_rank2_R8P_I8P(self, np, nc, xyz) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nc | integer(kind=I8P) | in | Number of cells. | |
xyz | real(kind=R8P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nc | integer(kind=I4P) | in | Number of cells. | |
xyz | real(kind=R4P) | in | X, y, z coordinates [1:3,:]. |
Call graph
write_geo_unst_data1_rank2_R4P_I8P
Write mesh with UnstructuredGrid topology, 64-bit counts (data 1, rank 2, R4P).
Returns: integer(kind=I4P)
fortran
function write_geo_unst_data1_rank2_R4P_I8P(self, np, nc, xyz) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nc | integer(kind=I8P) | in | Number of cells. | |
xyz | real(kind=R4P) | in | X, 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nc | integer(kind=I4P) | in | Number of cells. | |
x | real(kind=R8P) | in | X coordinates. | |
y | real(kind=R8P) | in | Y coordinates. | |
z | real(kind=R8P) | in | Z coordinates. |
Call graph
write_geo_unst_data3_rank1_R8P_I8P
Write mesh with UnstructuredGrid topology, 64-bit counts (data 3, rank 1, R8P).
Returns: integer(kind=I4P)
fortran
function write_geo_unst_data3_rank1_R8P_I8P(self, np, nc, x, y, z) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nc | integer(kind=I8P) | in | Number of cells. | |
x | real(kind=R8P) | in | X coordinates. | |
y | real(kind=R8P) | in | Y coordinates. | |
z | real(kind=R8P) | in | Z 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I4P) | in | Number of points. | |
nc | integer(kind=I4P) | in | Number of cells. | |
x | real(kind=R4P) | in | X coordinates. | |
y | real(kind=R4P) | in | Y coordinates. | |
z | real(kind=R4P) | in | Z coordinates. |
Call graph
write_geo_unst_data3_rank1_R4P_I8P
Write mesh with UnstructuredGrid topology, 64-bit counts (data 3, rank 1, R4P).
Returns: integer(kind=I4P)
fortran
function write_geo_unst_data3_rank1_R4P_I8P(self, np, nc, x, y, z) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
np | integer(kind=I8P) | in | Number of points. | |
nc | integer(kind=I8P) | in | Number of cells. | |
x | real(kind=R4P) | in | X coordinates. | |
y | real(kind=R4P) | in | Y coordinates. | |
z | real(kind=R4P) | in | Z coordinates. |
Call graph
write_connectivity_I4P
Write mesh connectivity.
Connectivity, offsets and faces are given as I4P (written as Int32) or, with the 64-bit version, as I8P (written as Int64, as VTK does), for pieces with more than 2^31-1 points or connectivity entries; cell types are always I1P.
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. They must be children of the Cells element, otherwise readers ignore them (issue #31).
Returns: integer(kind=I4P)
fortran
function write_connectivity_I4P(self, nc, connectivity, offset, cell_type, face, faceoffset) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
nc | integer(kind=I4P) | in | Number of cells. | |
connectivity | integer(kind=I4P) | in | Mesh connectivity. | |
offset | integer(kind=I4P) | in | Cell offset. | |
cell_type | integer(kind=I1P) | in | VTK cell type. | |
face | integer(kind=I4P) | in | optional | face composing the polyhedra. |
faceoffset | integer(kind=I4P) | in | optional | face offset. |
Call graph
write_connectivity_I8P
Write mesh connectivity, 64-bit ids and offsets (written as Int64): see the I4P version.
Returns: integer(kind=I4P)
fortran
function write_connectivity_I8P(self, nc, connectivity, offset, cell_type, face, faceoffset) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
nc | integer(kind=I8P) | in | Number of cells. | |
connectivity | integer(kind=I8P) | in | Mesh connectivity. | |
offset | integer(kind=I8P) | in | Cell offset. | |
cell_type | integer(kind=I1P) | in | VTK cell type. | |
face | integer(kind=I8P) | in | optional | face composing the polyhedra. |
faceoffset | integer(kind=I8P) | in | optional | face offset. |
Call graph
write_dataarray_unsigned_I1P
Write <DataArray type="UInt8" ...>: the bits of x as unsigned integers of the same width.
Example of usage
fortran
error = vtk%xml_writer%write_dataarray(location='cell', action='open')
error = vtk%xml_writer%write_dataarray_unsigned(data_name='vtkGhostType', x=ghost) ! ghost: integer(I1P), 0 or 1
error = vtk%xml_writer%write_dataarray(location='cell', action='close')Returns: integer(kind=I4P)
fortran
function write_dataarray_unsigned_I1P(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | integer(kind=I1P) | in | Data variable (bits of unsigned integers). |
Call graph
write_dataarray_unsigned_I2P
Write <DataArray type="UInt16" ...>: the bits of x as unsigned integers of the same width.
Returns: integer(kind=I4P)
fortran
function write_dataarray_unsigned_I2P(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | integer(kind=I2P) | in | Data variable (bits of unsigned integers). |
Call graph
write_dataarray_unsigned_I4P
Write <DataArray type="UInt32" ...>: the bits of x as unsigned integers of the same width.
Returns: integer(kind=I4P)
fortran
function write_dataarray_unsigned_I4P(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | integer(kind=I4P) | in | Data variable (bits of unsigned integers). |
Call graph
write_dataarray_unsigned_I8P
Write <DataArray type="UInt64" ...>: the bits of x as unsigned integers of the same width.
@note With the ASCII format, values of 2^63 or more (negative x) cannot be printed (there is no wider integer kind): nothing is written and the error status is 1.
Returns: integer(kind=I4P)
fortran
function write_dataarray_unsigned_I8P(self, data_name, x) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
x | integer(kind=I8P) | in | Data variable (bits of unsigned integers). |
Call graph
write_polydata_cells
Write the cell blocks of polydata topology: <Verts>, <Lines>, <Strips> and <Polys>.
Each block is given by a pair of arrays, as in write_connectivity: the point ids (0-based) of its cells, one cell after the other, and the cumulative offset of the end of each cell. Only the blocks passed are written (VTK readers treat an absent block as empty); a block with only one of its two arrays is an error. The number of cells of each block must match the counts passed to write_piece(np, nverts, nlines, nstrips, npolys).
The arrays are I4P (written as Int32) or I8P (written as Int64, for more than 2^31-1 points or entries); any other type is an error. They are declared class(*): a generic could not tell an I4P version from an I8P one, all arguments being optional.
@note Cell data of polydata are ordered by block: verts, lines, strips, polys.
Example of usage
fortran
! a square made of two triangles and a polyline of 3 points
error = vtk%xml_writer%write_polydata_cells(lines_connectivity=[4,5,6], lines_offset=[3], &
polys_connectivity=[0,1,2, 0,2,3], polys_offset=[3,6])Returns: integer(kind=I4P)
fortran
function write_polydata_cells(self, verts_connectivity, verts_offset, lines_connectivity, lines_offset, strips_connectivity, strips_offset, polys_connectivity, polys_offset) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
verts_connectivity | class(*) | in | optional | Vertices connectivity. |
verts_offset | class(*) | in | optional | Vertices offsets. |
lines_connectivity | class(*) | in | optional | Lines connectivity. |
lines_offset | class(*) | in | optional | Lines offsets. |
strips_connectivity | class(*) | in | optional | Triangle strips connectivity. |
strips_offset | class(*) | in | optional | Triangle strips offsets. |
polys_connectivity | class(*) | in | optional | Polygons connectivity. |
polys_offset | class(*) | in | optional | Polygons offsets. |
Call graph
write_parallel_open_block
Write a block (open) container.
Blocks can be nested: each open block is a new level. The children of a level (blocks and datasets) are indexed from 0 in the order they are written, as VTK numbers the children of a multi-block dataset.
Returns: integer(kind=I4P)
fortran
function write_parallel_open_block(self, name) result(error)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
name | character(len=*) | in | optional | Block 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. |
Call graph
next_vtm_index
Return the index of the next child (block or dataset) of the current level of a multi-block file, and count it.
Returns: integer(kind=I4P)
fortran
function next_vtm_index(self) result(vtm_index)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. |
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
data_name | character(len=*) | in | Data name. | |
data_type | character(len=*) | in | Type of dataarray. | |
number_of_components | integer(kind=I4P) | in | optional | Number 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
source | character(len=*) | in | Source file name containing the piece data. | |
nx1 | integer(kind=I4P) | in | optional | Initial node of x axis. |
nx2 | integer(kind=I4P) | in | optional | Final node of x axis. |
ny1 | integer(kind=I4P) | in | optional | Initial node of y axis. |
ny2 | integer(kind=I4P) | in | optional | Final node of y axis. |
nz1 | integer(kind=I4P) | in | optional | Initial node of z axis. |
nz2 | integer(kind=I4P) | in | optional | Final 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
file_index | integer(kind=I4P) | in | Index of file in the list. | |
filename | character(len=*) | in | Wrapped file names. | |
name | character(len=*) | in | optional | Names 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
filenames | character(len=*) | in | List of VTK-XML wrapped file names. | |
names | character(len=*) | in | optional | List 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(xml_writer_abstract) | inout | Writer. | |
filenames | character(len=*) | in | List of VTK-XML wrapped file names. | |
names | character(len=*) | in | optional | List names attributed to wrapped files. |
delimiter | character(len=*) | in | optional | Delimiter character. |
Call graph