dune-grid 2.9.0
|
Dump a .vtu/.vtp files contents to a stream. More...
#include <dune/grid/io/file/vtk/pvtuwriter.hh>
Public Member Functions | |
PVTUWriter (std::ostream &stream_, FileType fileType_) | |
create a PVTUWriter object More... | |
~PVTUWriter () | |
write footer More... | |
void | beginPointData (const std::string &scalars="", const std::string &vectors="") |
start PointData section More... | |
void | endPointData () |
finish PointData section More... | |
void | beginCellData (const std::string &scalars="", const std::string &vectors="") |
start CellData section More... | |
void | endCellData () |
finish CellData section More... | |
void | beginPoints () |
start section for the point coordinates More... | |
void | endPoints () |
finish section for the point coordinates More... | |
void | beginMain (unsigned ghostLevel=0) |
start the main PPolyData/PUnstructuredGrid section More... | |
void | endMain () |
finish the main PolyData/UnstructuredGrid section More... | |
void | addArray (const std::string &name, unsigned ncomps, Precision prec) |
Add an array to the output file. More... | |
void | addPiece (const std::string &filename) |
Add a serial piece to the output file. More... | |
Dump a .vtu/.vtp files contents to a stream.
This will help generating a .vtu/.vtp file. Typical use is like this:
|
inline |
create a PVTUWriter object
stream_ | Stream to write to. |
fileType_ | Whether to write PolyData (1D) or UnstructuredGrid (nD) format. |
Create object and write header.
|
inline |
write footer
|
inline |
Add an array to the output file.
T | The datatype of the array. |
name | Name of the array. |
ncomps | Number of components in each vector of the array. |
prec | The output precision of the data array |
|
inline |
Add a serial piece to the output file.
|
inline |
start CellData section
scalars | Name of field to which should be marked as default scalars field. If this is the empty string, don't set any default. |
vectors | Name of field to which should be marked as default vectors field. If this is the empty string, don't set any default. |
If there are no CellData fields, the call to this function may be skipped, together with the corresponding call to endCellData().
|
inline |
start the main PPolyData/PUnstructuredGrid section
ghostLevel | Set the GhostLevel attribute |
Between the call to this method and to endMain(), there should be calls to add the actual data:
|
inline |
start PointData section
scalars | Name of field to which should be marked as default scalars field. If this is the empty string, don't set any default. |
vectors | Name of field to which should be marked as default vectors field. If this is the empty string, don't set any default. |
If there are no PointData fields, the call to this function may be skipped, together with the corresponding call to endPointData().
|
inline |
start section for the point coordinates
Between the call to this method an the following call to the endPoints(), there must be a single field written. The name must be "Coordinates" and it must have 3 components.
|
inline |
finish CellData section
|
inline |
finish the main PolyData/UnstructuredGrid section
|
inline |
finish PointData section
|
inline |
finish section for the point coordinates