71 #ifndef Foam_vtk_vtmWriter_H 72 #define Foam_vtk_vtmWriter_H 116 vtmEntry(
const vtmEntry&) =
default;
117 vtmEntry(vtmEntry&&) =
default;
118 vtmEntry& operator=(
const vtmEntry&) =
default;
119 vtmEntry& operator=(vtmEntry&&) =
default;
128 vtmEntry(
int what,
const string&
name,
const fileName& file)
130 type_(what), name_(
name), file_(file)
136 static vtmEntry
block(
const string&
name)
138 return vtmEntry(BEGIN_BLOCK,
name,
"");
141 static vtmEntry endblock()
143 return vtmEntry(END_BLOCK,
"",
"");
148 return vtmEntry(DATA,
"", file);
153 return vtmEntry(DATA,
name, file);
162 return type_ == what;
200 bool pruneEmptyBlocks();
203 bool collapseBlocks();
239 void setTime(scalar timeValue);
296 void repair(
bool collapse=
false);
306 const word& blockName,
Provides a means of accumulating file entries for generating a vtkMultiBlockDataSet (...
A class for handling file names.
label write(const fileName &file)
Open file for writing (creates parent directory) and write the blocks and TimeValue.
bool append_vtp(const fileName &file)
Add a (.vtp) file.
vtmWriter()
Default construct, with autoName on.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const
The number of data sets.
bool append(const fileName &file)
Add a file. The name is either empty or created with autoName.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
bool isType(const U &obj)
Check if typeid of the object and Type are identical.
void setTime(scalar timeValue)
Define "TimeValue" for FieldData (name as per Catalyst output)
static const word null
An empty word.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void repair(bool collapse=false)
Sanity fixes on the data.
label beginBlock(const word &blockName=word::null)
Start a new block, optionally with a name.
OBJstream os(runTime.globalPath()/outputName)
void dump(Ostream &os) const
Print debug view of block and dataset contents.
bool empty() const
If there are no data sets.
word format(conversionProperties.get< word >("format"))
fileTag
Some common XML tags for vtk files.
~vtmWriter()=default
Destructor.
label endBlock(const word &blockName=word::null)
End the previous block, optionally with name checking.
bool append_vtu(const fileName &file)
Add a (.vtu) file.
void add(const word &blockName, const vtmWriter &other)
Add in content from another vtm and place under the given block name.
static word ext()
File extension (always "vtm")
A keyword and a list of tokens is an 'entry'.
void clear()
Clear all entries and reset output.