Dune Core Modules (unstable)
subsamplingvtkwriter.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be larger than zero! (One interval means no subsampling)");
101 SubElementIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
111 SubElementIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries, IteratorSelector<SubIterator> sis)
140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
207 void SubsamplingVTKWriter<GridView>::countEntities(int &nvertices_, int &ncells_, int &ncorners_)
214 Refinement &refinement = buildRefinement<dim, ctype>(it->type(), subsampledGeometryType(it->type()));
218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin(intervals).vertexIndices().size();
255 writeData(writer,vertexdata,cellBegin(),cellEnd(),nvertices,IteratorSelector<SubVertexIterator>());
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition: base.cc:94
Writer for the output of subsampled grid functions in the vtk format.
Definition: subsamplingvtkwriter.hh:40
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition: subsamplingvtkwriter.hh:261
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition: subsamplingvtkwriter.hh:243
SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK::Precision::float32)
Construct a SubsamplingVTKWriter working on a specific GridView.
Definition: subsamplingvtkwriter.hh:80
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition: subsamplingvtkwriter.hh:207
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition: subsamplingvtkwriter.hh:225
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition: subsamplingvtkwriter.hh:292
Writer for the output of grid functions in the vtk format.
Definition: vtkwriter.hh:95
void addVertexData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition: vtkwriter.hh:713
void addCellData(const std::shared_ptr< const VTKFunction > &p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition: vtkwriter.hh:649
VTK::Precision coordPrecision() const
get the precision with which coordinates are written out
Definition: vtkwriter.hh:782
@ vector
vector-valued field (always 3D, will be padded if necessary)
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition: vtuwriter.hh:380
void endCellData()
finish CellData section
Definition: vtuwriter.hh:220
void beginCells()
start section for the grid cells/PolyData lines
Definition: vtuwriter.hh:274
void endPointData()
finish PointData section
Definition: vtuwriter.hh:182
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition: vtuwriter.hh:205
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition: vtuwriter.hh:167
void endPoints()
finish section for the point coordinates
Definition: vtuwriter.hh:249
void endCells()
start section for the grid cells/PolyData lines
Definition: vtuwriter.hh:285
void beginPoints()
start section for the point coordinates
Definition: vtuwriter.hh:238
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:38
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition: virtualrefinement.cc:54
virtual int nElements(Dune::RefinementIntervals tag) const =0
Get the number of Elements.
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition: virtualrefinement.cc:62
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:290
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:46
virtual int nVertices(Dune::RefinementIntervals tag) const =0
Get the number of Vertices.
std::vector< int > IndexVector
The IndexVector of the VirtualRefinement.
Definition: virtualrefinement.hh:303
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:288
Precision
which precision to use when writing out data to vtk files
Definition: common.hh:271
static constexpr int dimension
The dimension of the grid.
Definition: gridview.hh:134
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition: gridview.hh:137
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:453
constexpr auto min
Function object that returns the smaller of the given values.
Definition: hybridutilities.hh:506
Utility class for handling nested indentation in output.
A unique label for each type of element that can occur in a grid.
This file contains the virtual wrapper around refinement.
Provides file i/o for the visualization toolkit.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)