Provides a means of accumulating file entries for generating a vtkMultiBlockDataSet (.vtm) file. More...
#include <foamVtmWriter.H>
Public Member Functions | |
| vtmWriter () | |
| Default construct, with autoName on. | |
| vtmWriter (bool autoName) | |
| Construct with specified behaviour for autoName. | |
| ~vtmWriter ()=default | |
| Destructor. | |
| bool | empty () const |
| If there are no data sets. | |
| label | size () const |
| The number of data sets. | |
| void | clear () |
| Clear all entries and reset output. | |
| void | setTime (scalar timeValue) |
| Define "TimeValue" for FieldData (name as per Catalyst output). | |
| void | setTime (const Time &t) |
| Define "TimeValue" for FieldData (name as per Catalyst output). | |
| label | beginBlock (const word &blockName=word::null) |
| Start a new block, optionally with a name. | |
| label | endBlock (const word &blockName=word::null) |
| End the previous block, optionally with name checking. | |
| bool | append (const fileName &file) |
| Add a file. The name is either empty or created with autoName. | |
| bool | append (const word &name, const fileName &file) |
| Add a file with name. | |
| bool | append (const fileName &file, vtk::fileTag contentType) |
| Add a file with given contentType extension The name is either empty or created with autoName. | |
| bool | append (const word &name, const fileName &file, vtk::fileTag contentType) |
| Add a file with name, with given contentType extension. | |
| bool | append_poly (const fileName &file) |
| Add a PolyData (.vtp) file. | |
| bool | append_poly (const word &name, const fileName &file) |
| Add a PolyData (.vtp) file with name. | |
| bool | append_ugrid (const fileName &file) |
| Add an UnstructuredGrid (.vtu) file. | |
| bool | append_ugrid (const word &name, const fileName &file) |
| Add an UnstructuredGrid (.vtu) file with name. | |
| template<vtk::fileTag DataType = vtk::fileTag::VTK_HDF> | |
| bool | append_hdf (const fileName &file) |
| Add a (.vtkhdf) file. Often need to specify the content type as well (PolyData, UnstructuredGrid). | |
| template<vtk::fileTag DataType = vtk::fileTag::VTK_HDF> | |
| bool | append_hdf (const word &name, const fileName &file) |
| Add a (.vtkhdf) file with name. Often need to specify content type as well (PolyData, UnstructuredGrid). | |
| void | repair (bool collapse=false) |
| Sanity fixes on the data. | |
| void | add (const word &blockName, const vtmWriter &other) |
| Add in content from another vtm and place under the given block name. | |
| void | add (const word &blockName, const fileName &prefix, const vtmWriter &other) |
| Add in content from another vtm and place under the given block name. Adjust the added 'file' entries to include the given prefix. | |
| label | write_xml (std::ostream &os) const |
| Write the blocks and TimeValue (xml format). | |
| label | write_xml (OSstream &os) const |
| Write the blocks and TimeValue (xml format). | |
| label | write_xml (const fileName &file) const |
| Open file for writing (creates parent directory) and write the blocks and TimeValue. | |
| label | write (const fileName &file) const |
| Forwards to write_xml(). | |
| void | dump (Ostream &os) const |
| Print debug view of block and dataset contents. | |
| bool | append_vtp (const fileName &file) |
| Same as append_poly - used until (2025-12). | |
| bool | append_vtu (const fileName &file) |
| Same as append_ugrid - used until (2025-12). | |
| bool | append_vtp (const word &name, const fileName &file) |
| Same as append_poly - used until (2025-12). | |
| bool | append_vtu (const word &name, const fileName &file) |
| Same as append_ugrid - used until (2025-12). | |
Static Public Member Functions | |
| static word | ext () |
| File extension (always "vtm"). | |
Provides a means of accumulating file entries for generating a vtkMultiBlockDataSet (.vtm) file.
For example, to generate the following content:
<?xml version='1.0'?>
<VTKFile type='vtkMultiBlockDataSet' ...>
<vtkMultiBlockDataSet>
<DataSet name='internal' file='internal.vtu' />
<Block name='boundary'>
<DataSet name='inlet' file='boundary/inlet.vtp' />
<DataSet name='outlet' file='boundary/outlet.vtp' />
</Block>
</vtkMultiBlockDataSet>
<FieldData>
<DataArray type='Float32' Name='TimeValue' ...>
12.345
</DataArray>
</FieldData>
</VTKFile>
The following code would be used:
Definition at line 90 of file foamVtmWriter.H.
| vtmWriter | ( | ) |
|
explicit |
Construct with specified behaviour for autoName.
|
default |
Destructor.
|
inlinestatic |
File extension (always "vtm").
Definition at line 50 of file foamVtmWriterI.H.
References Foam::vtk::fileExtension, and Foam::vtk::MULTI_BLOCK.
| bool empty | ( | ) | const |
If there are no data sets.
| label size | ( | ) | const |
The number of data sets.
| void clear | ( | ) |
Clear all entries and reset output.
| void setTime | ( | scalar | timeValue | ) |
Define "TimeValue" for FieldData (name as per Catalyst output).
| void setTime | ( | const Time & | t | ) |
Define "TimeValue" for FieldData (name as per Catalyst output).
| label beginBlock | ( | const word & | blockName = word::null | ) |
| label endBlock | ( | const word & | blockName = word::null | ) |
| bool append | ( | const fileName & | file | ) |
Add a file. The name is either empty or created with autoName.
Add a file with name.
References Foam::name().

| bool append | ( | const fileName & | file, |
| vtk::fileTag | contentType ) |
Add a file with given contentType extension The name is either empty or created with autoName.
| bool append | ( | const word & | name, |
| const fileName & | file, | ||
| vtk::fileTag | contentType ) |
Add a file with name, with given contentType extension.
References Foam::name().

|
inline |
Add a PolyData (.vtp) file.
Definition at line 56 of file foamVtmWriterI.H.
Referenced by append_vtp(), and append_vtp().

Add a PolyData (.vtp) file with name.
Definition at line 62 of file foamVtmWriterI.H.
References Foam::name().

|
inline |
Add an UnstructuredGrid (.vtu) file.
Definition at line 72 of file foamVtmWriterI.H.
Referenced by append_vtu(), and append_vtu().

Add an UnstructuredGrid (.vtu) file with name.
Definition at line 78 of file foamVtmWriterI.H.
References Foam::name().

|
inline |
Add a (.vtkhdf) file. Often need to specify the content type as well (PolyData, UnstructuredGrid).
Definition at line 89 of file foamVtmWriterI.H.
|
inline |
Add a (.vtkhdf) file with name. Often need to specify content type as well (PolyData, UnstructuredGrid).
Definition at line 96 of file foamVtmWriterI.H.
References Foam::name().

| void repair | ( | bool | collapse = false | ) |
Sanity fixes on the data.
Add in content from another vtm and place under the given block name.
References vtmWriter().

Add in content from another vtm and place under the given block name. Adjust the added 'file' entries to include the given prefix.
References vtmWriter().

| label write_xml | ( | std::ostream & | os | ) | const |
Write the blocks and TimeValue (xml format).
References os().

| label write_xml | ( | OSstream & | os | ) | const |
Write the blocks and TimeValue (xml format).
References os().

| label write_xml | ( | const fileName & | file | ) | const |
Open file for writing (creates parent directory) and write the blocks and TimeValue.
The file name is with/without an extension.
| label write | ( | const fileName & | file | ) | const |
Forwards to write_xml().
| void dump | ( | Ostream & | os | ) | const |
Print debug view of block and dataset contents.
References os().

|
inline |
Same as append_poly - used until (2025-12).
Definition at line 536 of file foamVtmWriter.H.
References append_poly().

|
inline |
Same as append_ugrid - used until (2025-12).
Definition at line 541 of file foamVtmWriter.H.
References append_ugrid().

Same as append_poly - used until (2025-12).
Definition at line 546 of file foamVtmWriter.H.
References append_poly(), and Foam::name().

Same as append_ugrid - used until (2025-12).
Definition at line 554 of file foamVtmWriter.H.
References append_ugrid(), and Foam::name().
