|
dune-grid 2.11
|
Loading...
Searching...
No Matches
vtkwriter.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
63 struct IsBindable< F, E, std::void_t< decltype( std::declval< F & >().bind( std::declval< const E & >() ) ),
314 // That is, a function that you can create a LocalFunction for, and evaluate that in element coordinates
315 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && Impl::HasLocalFunction<F>::value, int> = 0>
325 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && not Impl::HasLocalFunction<F>::value, int> = 0>
838 std::string pwrite ( const std::string & name, const std::string & path, const std::string & extendpath,
1298 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries)
1316 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
1456 DUNE_THROW(IOError, "VTKWriter: grid must support codim 1 entities to be able to write VTK polyhedral cells");
1587 DUNE_THROW(IOError, "VTKWriter: grid must support codim 1 entities to be able to write VTK polyhedral cells");
#define DUNE_PRIVATE
Mapper for multiple codim and multiple geometry types.
int size() const
iterator end()
iterator begin()
std::string relativePath(const std::string &newbase, const std::string &p)
std::string concatPaths(const std::string &base, const std::string &p)
typename Impl::voider< Types... >::type void_t
size_type dim() const
#define DUNE_THROW(E,...)
Functions for VTK output.
Data array writers for the VTKWriter.
Common stuff for the VTKWriter.
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:177
Traits::IndexSet IndexSet
type of the index set
Definition common/gridview.hh:86
const Communication & comm() const
obtain communication object
Definition common/gridview.hh:273
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:131
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
STL namespace.
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
@ int32
@ uint8
@ float32
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
@ appendedraw
Output is to the file is appended raw binary.
Definition common.hh:49
@ appendedbase64
Output is to the file is appended base64 binary.
Definition common.hh:51
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition common.hh:186
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
DataMode
Whether to produce conforming or non-conforming output.
Definition common.hh:67
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition common.hh:151
Include standard header files.
Specialize with 'true' for all codims that a grid implements entities for. (default=false)
Definition common/capabilities.hh:58
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
size_type size() const
Return total number of entities in the entity set managed by the mapper.
Definition mcmgmapper.hh:204
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to starting index in array for dof block.
Definition mcmgmapper.hh:185
std::size_t size() const
The number of components in the data field.
Definition common.hh:364
Precision precision() const
The precision used for the output of the data field.
Definition common.hh:370
@ vector
vector-valued field (always 3D, will be padded if necessary)
std::string name() const
The name of the data field.
Definition common.hh:352
void write(T data)
write one element of data
Definition dataarraywriter.hh:69
A base class for grid functions with any return type and dimension.
Definition function.hh:42
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
Writer for the output of grid functions in the vtk format.
Definition vtksequencewriter.hh:29
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition vtksequencewriterbase.hh:34
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 visualizati...
Definition vtkwriter.hh:697
std::string write(const std::string &name, VTK::OutputType type=VTK::ascii)
write output (interface might change later)
Definition vtkwriter.hh:806
std::string getParallelHeaderName(const std::string &name, const std::string &path, int commSize) const
return name of a parallel header file
Definition vtkwriter.hh:923
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:715
std::string getSerialPieceName(const std::string &name, const std::string &path) const
return name of a serial piece file
Definition vtkwriter.hh:943
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:650
bool checkForPolyhedralCells() const
Definition vtkwriter.hh:1448
void addVertexData(F &&f, VTK::FieldInfo vtkFieldInfo)
Add a function by sampling it on the grid vertices.
Definition vtkwriter.hh:740
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition vtkwriter.hh:1340
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition vtkwriter.hh:1242
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)
Definition vtkwriter.hh:858
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1392
virtual void writeCellFaces(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1464
void fillFaceVertices(CornerIterator it, const CornerIterator end, const IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1503
std::string write(const std::string &name, VTK::OutputType type, const int commRank, const int commSize)
write output (interface might change later)
Definition vtkwriter.hh:968
VTK::Precision coordPrecision() const
get the precision with which coordinates are written out
Definition vtkwriter.hh:785
std::list< VTKLocalFunction >::const_iterator FunctionIterator
Definition vtkwriter.hh:377
std::tuple< std::string, std::string > getDataNames(const T &data) const
Definition vtkwriter.hh:1271
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition vtkwriter.hh:1368
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition vtkwriter.hh:1354
void addCellData(F &&f, VTK::FieldInfo vtkFieldInfo)
Add a function by sampling it on the element centers.
Definition vtkwriter.hh:675
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 visualiz...
Definition vtkwriter.hh:763
static void fillFacesForElement(const Entity &element, const IndexSet &indexSet, const std::vector< T > &vertices, T &offset, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1544
void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries)
Definition vtkwriter.hh:1298
VTKWriter(const GridView &gridView, VTK::DataMode dm=VTK::conforming, VTK::Precision coordPrecision=VTK::Precision::float32)
Construct a VTKWriter working on a specific GridView.
Definition vtkwriter.hh:637
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
Definition vtkwriter.hh:1046
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)
Definition vtkwriter.hh:838
void write(const Coordinate &pos, Writer &writer) const
Write the value of the data set at local coordinate pos to the writer.
Definition vtkwriter.hh:367
void unbind() const
Unbind the data set from the currently bound entity.
Definition vtkwriter.hh:361
VTKLocalFunction(F &&f, VTK::FieldInfo fieldInfo)
Construct a VTKLocalFunction for a dune-functions style LocalFunction.
Definition vtkwriter.hh:308
std::string name() const
Returns the name of the data set.
Definition vtkwriter.hh:343
const VTK::FieldInfo & fieldInfo() const
Returns the VTK::FieldInfo for the data set.
Definition vtkwriter.hh:349
void bind(const Entity &e) const
Bind the data set to grid entity e.
Definition vtkwriter.hh:355
VTKLocalFunction(const std::shared_ptr< const VTKFunction > &vtkFunctionPtr)
Construct a VTKLocalFunction for a legacy VTKFunction.
Definition vtkwriter.hh:332
std::shared_ptr< FunctionWrapperBase > _f
Definition vtkwriter.hh:372
Base class for polymorphic container of underlying data set.
Definition vtkwriter.hh:165
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const =0
Evaluate data set at local position pos inside the current entity and write result to w.
virtual ~FunctionWrapperBase()
Definition vtkwriter.hh:179
virtual void unbind()=0
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
virtual void bind(const Entity &e)=0
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Type erasure implementation for functions conforming to the dune-functions LocalFunction interface.
Definition vtkwriter.hh:189
typename std::decay< F >::type Function
Definition vtkwriter.hh:190
FunctionWrapper(F_ &&f)
Definition vtkwriter.hh:193
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:202
virtual void write(const Coordinate &pos, Writer &writer, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:207
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:197
Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordi...
Definition vtkwriter.hh:237
GlobalFunctionWrapper(F_ &&f)
Definition vtkwriter.hh:241
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:251
virtual void write(const Coordinate &pos, Writer &writer, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:256
typename std::decay< F >::type Function
Definition vtkwriter.hh:238
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:246
Type erasure implementation for legacy VTKFunctions.
Definition vtkwriter.hh:277
virtual void write(const Coordinate &pos, Writer &writer, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w.
Definition vtkwriter.hh:293
virtual void unbind()
Unbind data set from current grid entity - mostly here for performance and symmetry reasons.
Definition vtkwriter.hh:288
VTKFunctionWrapper(const std::shared_ptr< const VTKFunction > &f)
Definition vtkwriter.hh:278
virtual void bind(const Entity &e)
Bind data set to grid entity - must be called before evaluating (i.e. calling write())
Definition vtkwriter.hh:283
CellIterator(const GridCellIterator &x)
construct a CellIterator from the gridview's Iterator.
Definition vtkwriter.hh:389
const FieldVector< DT, n > position() const
Definition vtkwriter.hh:392
VertexIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm)
Definition vtkwriter.hh:458
EntityReference dereference() const
Definition vtkwriter.hh:492
bool equals(const VertexIterator &cit) const
Definition vtkwriter.hh:486
FieldVector< DT, n > position() const
position of vertex inside the entity
Definition vtkwriter.hh:502
int localindex() const
index of vertex within the entity, in Dune-numbering
Definition vtkwriter.hh:497
CornerIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm, const std::vector< int > &num)
Definition vtkwriter.hh:559
int id() const
Process-local consecutive zero-starting vertex id.
Definition vtkwriter.hh:598
EntityReference dereference() const
Definition vtkwriter.hh:589
bool equals(const CornerIterator &cit) const
Definition vtkwriter.hh:583
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:381
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
A set of traits classes to store static information about grid implementation.
T c_str(T... args)
T clear(T... args)
T close(T... args)
T end(T... args)
T endl(T... args)
T exceptions(T... args)
T find(T... args)
T is_open(T... args)
T make_tuple(T... args)
T min(T... args)
T open(T... args)
T push_back(T... args)
T reserve(T... args)
T reset(T... args)
T resize(T... args)
T rfind(T... args)
T setfill(T... args)
T setw(T... args)
T size(T... args)
T str(T... args)
T substr(T... args)
T tie(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8