|
| VTKWriter (const GridView &gridView, VTK::DataMode dm=VTK::conforming, VTK::Precision coordPrecision=VTK::Precision::float32) |
| Construct a VTKWriter working on a specific GridView. More...
|
|
void | addCellData (const std::shared_ptr< const VTKFunction > &p) |
| Add a grid function that lives on the cells of the grid to the visualization. More...
|
|
template<typename F > |
void | addCellData (F &&f, VTK::FieldInfo vtkFieldInfo) |
| Add a function by sampling it on the element centers. More...
|
|
template<class Container > |
void | addCellData (const Container &v, const std::string &name, int ncomps=1, VTK::Precision prec=VTK::Precision::float32) |
| Add a grid function (represented by container) that lives on the cells of the grid to the visualization. More...
|
|
void | addVertexData (const std::shared_ptr< const VTKFunction > &p) |
| Add a grid function that lives on the vertices of the grid to the visualization. More...
|
|
template<typename F > |
void | addVertexData (F &&f, VTK::FieldInfo vtkFieldInfo) |
| Add a function by sampling it on the grid vertices. More...
|
|
template<class Container > |
void | addVertexData (const Container &v, const std::string &name, int ncomps=1, VTK::Precision prec=VTK::Precision::float32) |
| Add a grid function (represented by container) that lives on the vertices of the grid to the visualization output. More...
|
|
void | clear () |
| clear list of registered functions More...
|
|
VTK::Precision | coordPrecision () const |
| get the precision with which coordinates are written out More...
|
|
virtual | ~VTKWriter () |
| destructor More...
|
|
std::string | write (const std::string &name, VTK::OutputType type=VTK::ascii) |
| write output (interface might change later) More...
|
|
std::string | pwrite (const std::string &name, const std::string &path, const std::string &extendpath, VTK::OutputType type=VTK::ascii) |
| write output (interface might change later) More...
|
|
|
CellIterator | cellBegin () const |
|
CellIterator | cellEnd () const |
|
VertexIterator | vertexBegin () const |
|
VertexIterator | vertexEnd () const |
|
CornerIterator | cornerBegin () const |
|
CornerIterator | cornerEnd () const |
|
std::string | getParallelPieceName (const std::string &name, const std::string &path, int commRank, int commSize) const |
| return name of a parallel piece file (or header name) More...
|
|
std::string | getParallelHeaderName (const std::string &name, const std::string &path, int commSize) const |
| return name of a parallel header file More...
|
|
std::string | getSerialPieceName (const std::string &name, const std::string &path) const |
| return name of a serial piece file More...
|
|
std::string | write (const std::string &name, VTK::OutputType type, const int commRank, const int commSize) |
| write output (interface might change later) More...
|
|
std::string | pwrite (const std::string &name, const std::string &path, const std::string &extendpath, VTK::OutputType ot, const int commRank, const int commSize) |
| write output; interface might change later More...
|
|
std::string | getFormatString () const |
|
std::string | getTypeString () const |
|
virtual void | countEntities (int &nvertices_, int &ncells_, int &ncorners_) |
| count the vertices, cells and corners More...
|
|
template<typename T > |
std::tuple< std::string, std::string > | getDataNames (const T &data) const |
|
template<typename Data , typename Iterator > |
void | writeData (VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries) |
|
virtual void | writeCellData (VTK::VTUWriter &writer) |
| write cell data More...
|
|
virtual void | writeVertexData (VTK::VTUWriter &writer) |
| write vertex data More...
|
|
virtual void | writeGridPoints (VTK::VTUWriter &writer) |
| write the positions of vertices More...
|
|
virtual void | writeGridCells (VTK::VTUWriter &writer) |
| write the connectivity array More...
|
|
bool | checkForPolyhedralCells () const |
|
virtual void | writeCellFaces (VTK::VTUWriter &writer) |
| write the connectivity array More...
|
|
template<class CornerIterator , class IndexSet , class T > |
void | fillFaceVertices (CornerIterator it, const CornerIterator end, const IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets) |
|
template<class GridView>
class Dune::VTKWriter< GridView >
Writer for the ouput of grid functions in the vtk format.
Writes arbitrary grid functions (living on cells or vertices of a grid) to a file suitable for easy visualization with The Visualization Toolkit (VTK).
template<class GridView >
template<class Container >
Add a grid function (represented by container) that lives on the cells of the grid to the visualization.
The container has to have random access via operator[] (e.g. std::vector). The value of the grid function for an arbitrary element will be accessed by calling operator[] with the index (corresponding to the index from the MGMC mapper on the grid view) of the element. For vector valued data all components for an element are assumed to be consecutive.
- Parameters
-
v | The container with the values of the grid function for each cell. |
name | A name to identify the grid function. |
ncomps | Number of components (default is 1). |
template<class GridView >
template<typename F >
Add a function by sampling it on the element centers.
- Parameters
-
f | The function to be written to the file |
The object f can be one of several things. Depending on what it is exactly, its object life-time is influenced in different ways:
- If f has the method bind(), then a copy of f is stored, regardless of whether f is an l- or r-value.
- If f can be localized by calling localFunction(f), then a copy of localFunction(f) is stored, but f is never stored, regardless of whether f is an l- or r-value.
- If f supports neither bind() or localFunction(), then a copy of f is stored, regardless if f is an l- or r-value.
The previous paragraph actually refers to parts of the dune-functions interface, and you may want to read up on that if you want to write functions to VTK.
- Deprecated:
- f may also be a VTKFunction object, but you are strongly discouraged from using VTKFunctions.
template<class GridView >
template<class Container >
Add a grid function (represented by container) that lives on the vertices of the grid to the visualization output.
The container has to have random access via operator[] (e.g. std::vector). The value of the grid function for an arbitrary element will be accessed by calling operator[] with the index (corresponding to the index from the MGMC mapper on the grid view) of the vertex. For vector valued data all components for a vertex are assumed to be consecutive.
- Parameters
-
v | The container with the values of the grid function for each vertex. |
name | A name to identify the grid function. |
ncomps | Number of components (default is 1). |
template<class GridView >
template<typename F >
Add a function by sampling it on the grid vertices.
- Parameters
-
f | The function to be written to the file |
The object f can be one of several things. Depending on what it is exactly, its object life-time is influenced in different ways:
- If f has the method bind(), then a copy of f is stored, regardless of whether f is an l- or r-value.
- If f can be localized by calling localFunction(f), then a copy of localFunction(f) is stored, but f is never stored, regardless of whether f is an l- or r-value.
- If f supports neither bind() or localFunction(), then a copy of f is stored, regardless if f is an l- or r-value.
The previous paragraph actually refers to parts of the dune-functions interface, and you may want to read up on that if you want to write functions to VTK.
- Deprecated:
- f may also be a VTKFunction object, but you are strongly discouraged from using VTKFunctions.
template<class GridView >
write output (interface might change later)
"pwrite" means "path write" (i.e. write somewhere else than the current directory). The "p" does not mean this method has a monopoly on parallel writing, the regular write(const std::string &, VTK::OutputType) method can do that just fine.
- Parameters
-
name | Base name of the output files. This should not contain any directory part and not filename extensions. It will be used both for each processes piece as well as the parallel collection file. |
path | Directory where to put the parallel collection (.pvtu/.pvtp) file. If it is relative, it is taken relative to the current directory. |
extendpath | Directory where to put the piece file (.vtu/.vtp) of this process. If it is relative, it is taken relative to the directory denoted by path. |
type | How to encode the data in the file. |
- Note
- Currently, extendpath may not be absolute unless path is absolute, because that would require the value of the current directory.
- Exceptions
-
NotImplemented | Extendpath is absolute but path is relative. |
IOError | Failed to open a file. |