4 #ifndef DUNE_VTKWRITER_HH
5 #define DUNE_VTKWRITER_HH
17 #include <dune/common/deprecated.hh>
18 #include <dune/common/typetraits.hh>
19 #include <dune/common/exceptions.hh>
20 #include <dune/common/std/memory.hh>
21 #include <dune/common/indent.hh>
22 #include <dune/common/iteratorfacades.hh>
23 #include <dune/common/path.hh>
24 #include <dune/common/shared_ptr.hh>
25 #include <dune/geometry/referenceelements.hh>
51 template <
class Gr
idView>
52 class VTKSequenceWriterBase;
62 template<
class Gr
idView >
75 typedef typename GridView::template Codim< 0 >::Entity Cell;
76 typedef typename GridView::template Codim< n >::Entity Vertex;
84 typedef typename GridView::template Codim< 0 >
85 ::template Partition< VTK_Partition >::Iterator
87 typedef typename GridView::template Codim< n >
88 ::template Partition< VTK_Partition >::Iterator
91 typedef typename GridCellIterator::Reference EntityReference;
93 typedef typename GridView::template Codim< 0 >
94 ::Entity::Geometry::LocalCoordinate Coordinate;
96 typedef MultipleCodimMultipleGeomTypeMapper< GridView, MCMGVertexLayout > VertexMapper;
101 switch( VTK_Partition )
106 default: DUNE_THROW(NotImplemented,
"Add check for this partition type");
134 virtual void bind(
const Entity& e)
const = 0;
137 virtual void unbind()
const = 0;
143 virtual void write(
const Coordinate& pos, Writer& w, std::size_t count)
const = 0;
156 template<
typename F_>
158 : _f(
std::forward<F_>(f))
161 virtual void bind(
const Entity& e)
const
171 virtual void write(
const Coordinate& pos, Writer& w, std::size_t count)
const
175 do_write(w,r,count,is_indexable<decltype(r)>());
181 void do_write(Writer& w,
const R& r, std::size_t count, std::true_type)
const
183 for (std::size_t i = 0; i < count; ++i)
188 void do_write(Writer& w,
const R& r, std::size_t count, std::false_type)
const
206 virtual void bind(
const Entity& e)
const
216 virtual void write(
const Coordinate& pos, Writer& w, std::size_t count)
const
218 for (std::size_t i = 0; i < count; ++i)
219 w.
write(_f->evaluate(i,*_entity,pos));
225 mutable const Entity* _entity;
240 vtkFunctionPtr->
name(),
241 vtkFunctionPtr->ncomps() > 1 ? VTK::FieldInfo::Type::vector : VTK::FieldInfo::Type::scalar,
242 vtkFunctionPtr->ncomps()
259 void bind(
const Entity& e)
const
271 void write(
const Coordinate& pos, Writer& w)
const
276 std::shared_ptr<FunctionWrapperBase>
_f;
298 return ReferenceElements<DT,n>::general((*this)->type()).
position(0,0);
304 return gridView_.template begin< 0, VTK_Partition >();
309 return gridView_.template end< 0, VTK_Partition >();
328 public ForwardIteratorFacade<VertexIterator, const Entity, EntityReference, int>
330 GridCellIterator git;
331 GridCellIterator gend;
336 const VertexMapper & vertexmapper;
337 std::vector<bool> visited;
350 const int numCorners = git->subEntities(n);
351 if( cornerIndexDune == numCorners )
353 offset += numCorners;
357 while( (git != gend) && skipEntity( git->partitionType() ) )
363 const GridCellIterator & end,
365 const VertexMapper & vm) :
366 git(x), gend(end), datamode(dm), cornerIndexDune(0),
367 vertexmapper(vm), visited(vm.size(), false),
371 visited[vertexmapper.
subIndex(*git,cornerIndexDune,n)] =
true;
378 while(visited[vertexmapper.
subIndex(*git,cornerIndexDune,n)])
381 if (git == gend)
return;
383 visited[vertexmapper.
subIndex(*git,cornerIndexDune,n)] =
true;
392 return git == cit.git
393 && cornerIndexDune == cit.cornerIndexDune
394 && datamode == cit.datamode;
403 return cornerIndexDune;
408 return ReferenceElements<DT,n>::general(git->type())
416 gridView_.template end< 0, VTK_Partition >(),
417 datamode, *vertexmapper );
423 gridView_.template end< 0, VTK_Partition >(),
424 datamode, *vertexmapper );
443 public ForwardIteratorFacade<CornerIterator, const Entity, EntityReference, int>
445 GridCellIterator git;
446 GridCellIterator gend;
451 const VertexMapper & vertexmapper;
455 const std::vector<int> & number;
464 const GridCellIterator & end,
466 const VertexMapper & vm,
467 const std::vector<int> & num) :
468 git(x), gend(end), datamode(dm), cornerIndexVTK(0),
470 number(num), offset(0) {}
476 const int numCorners = git->subEntities(n);
477 if( cornerIndexVTK == numCorners )
479 offset += numCorners;
483 while( (git != gend) && skipEntity( git->partitionType() ) )
489 return git == cit.git
490 && cornerIndexVTK == cit.cornerIndexVTK
491 && datamode == cit.datamode;
513 DUNE_THROW(IOError,
"VTKWriter: unsupported DataMode" << datamode);
521 gridView_.template end< 0, VTK_Partition >(),
522 datamode, *vertexmapper, number );
528 gridView_.template end< 0, VTK_Partition >(),
529 datamode, *vertexmapper, number );
566 void addCellData (VTKFunction* p) DUNE_DEPRECATED_MSG(
"Don't pass raw pointers, use the version with shared_ptr")
587 void addCellData (
const V& v,
const std::string &name,
int ncomps = 1)
590 for (
int c=0; c<ncomps; ++c) {
591 std::stringstream compName;
594 compName <<
"[" << c <<
"]";
595 VTKFunction* p =
new Function(
gridView_, v, compName.str(), ncomps, c);
605 void addVertexData (VTKFunction* p) DUNE_DEPRECATED_MSG(
"Don't pass raw pointers, use the version with shared_ptr")
645 for (
int c=0; c<ncomps; ++c) {
646 std::stringstream compName;
649 compName <<
"[" << c <<
"]";
650 VTKFunction* p =
new Function(
gridView_, v, compName.str(), ncomps, c);
679 std::string
write (
const std::string &name,
711 std::string
pwrite (
const std::string & name,
const std::string & path,
const std::string & extendpath,
731 const std::string& path,
732 int commRank,
int commSize)
const
734 std::ostringstream s;
735 if(path.size() > 0) {
737 if(path[path.size()-1] !=
'/')
740 s <<
's' << std::setw(4) << std::setfill(
'0') << commSize <<
'-';
741 s <<
'p' << std::setw(4) << std::setfill(
'0') << commRank <<
'-';
762 const std::string& path,
765 std::ostringstream s;
766 if(path.size() > 0) {
768 if(path[path.size()-1] !=
'/')
771 s <<
's' << std::setw(4) << std::setfill(
'0') << commSize <<
'-';
794 const std::string& path)
const
796 static const std::string extension =
799 return concatPaths(path, name+extension);
817 std::string
write (
const std::string &name,
825 return pwrite(name,
"",
"", type, commRank, commSize);
835 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
836 std::ios_base::eofbit);
839 file.open( pieceName.c_str(), std::ios::binary );
842 std::cerr <<
"Filename: " << pieceName <<
" could not be opened" << std::endl;
845 if (! file.is_open())
846 DUNE_THROW(IOError,
"Could not write to piece file " << pieceName);
847 writeDataFile( file );
877 std::string
pwrite(
const std::string& name,
const std::string& path,
878 const std::string& extendpath,
887 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
888 std::ios_base::eofbit);
889 std::string piecepath = concatPaths(path, extendpath);
890 std::string relpiecepath = relativePath(path, piecepath);
897 file.open(fullname.c_str(),std::ios::binary);
900 std::cerr <<
"Filename: " << fullname <<
" could not be opened" << std::endl;
903 if (! file.is_open())
904 DUNE_THROW(IOError,
"Could not write to piecefile file " << fullname);
913 file.open(fullname.c_str());
914 if (! file.is_open())
915 DUNE_THROW(IOError,
"Could not write to parallel file " << fullname);
916 writeParallelHeader(file,name,relpiecepath, commSize );
942 void writeParallelHeader(std::ostream& s,
const std::string& piecename,
943 const std::string& piecepath,
const int commSize)
954 std::string scalars, vectors;
956 writer.beginPointData(scalars, vectors);
963 unsigned writecomps = it->fieldInfo().size();
964 if(writecomps == 2) writecomps = 3;
965 writer.addArray<
float>(it->name(), writecomps);
967 writer.endPointData();
971 std::string scalars, vectors;
973 writer.beginCellData(scalars, vectors);
980 unsigned writecomps = it->fieldInfo().size();
981 if(writecomps == 2) writecomps = 3;
982 writer.addArray<
float>(it->name(), writecomps);
984 writer.endCellData();
987 writer.beginPoints();
988 writer.addArray<
float>(
"Coordinates", 3);
992 for(
int i = 0; i < commSize; ++i )
997 writer.addPiece(fullname);
1004 void writeDataFile (std::ostream& s)
1009 VTK::VTUWriter writer(s,
outputtype, fileType);
1012 vertexmapper =
new VertexMapper(
gridView_ );
1015 number.resize(vertexmapper->
size());
1016 for (std::vector<int>::size_type i=0; i<number.size(); i++) number[i] = -1;
1021 writeAllData(writer);
1025 if(writer.beginAppended())
1026 writeAllData(writer);
1027 writer.endAppended();
1029 delete vertexmapper; number.clear();
1032 void writeAllData(VTK::VTUWriter& writer) {
1057 DUNE_THROW(IOError,
"VTKWriter: unsupported OutputType" <<
outputtype);
1065 return "UnstructuredGrid";
1079 const int subEntities = it->subEntities(n);
1080 for (
int i=0; i<subEntities; ++i)
1085 int alpha = vertexmapper->
subIndex(*it,i,n);
1086 if (number[alpha]<0)
1087 number[alpha] = nvertices++;
1097 template<
typename T>
1100 std::string scalars =
"";
1101 for (
auto it = data.begin(),
1107 scalars = it->name();
1111 std::string vectors =
"";
1112 for (
auto it = data.begin(),
1118 vectors = it->name();
1121 return std::make_tuple(scalars,vectors);
1124 template<
typename Data,
typename Iterator>
1127 for (
auto it = data.begin(),
1132 const auto& f = *it;
1134 std::size_t writecomps = fieldInfo.
size();
1135 switch (fieldInfo.
type())
1143 DUNE_THROW(IOError,
"Cannot write VTK vectors with more than 3 components (components was " << writecomps <<
")");
1147 DUNE_THROW(NotImplemented,
"VTK output for tensors not implemented yet");
1149 shared_ptr<VTK::DataArrayWriter<float> > p
1151 if(!p->writeIsNoop())
1152 for (Iterator eit = begin; eit!=end; ++eit)
1154 const Entity & e = *eit;
1156 f.write(eit.position(),*p);
1160 for (std::size_t j=fieldInfo.
size(); j < writecomps; ++j)
1172 std::string scalars, vectors;
1186 std::string scalars, vectors;
1199 shared_ptr<VTK::DataArrayWriter<float> > p
1201 if(!p->writeIsNoop()) {
1206 for (
int j=0; j<
std::min(dimw,3); j++)
1207 p->write((*vit).geometry().corner(vit.localindex())[j]);
1208 for (
int j=std::min(dimw,3); j<3; j++)
1225 shared_ptr<VTK::DataArrayWriter<int> > p1
1227 if(!p1->writeIsNoop())
1234 shared_ptr<VTK::DataArrayWriter<int> > p2
1236 if(!p2->writeIsNoop()) {
1240 offset += it->subEntities(n);
1249 shared_ptr<VTK::DataArrayWriter<unsigned char> > p3
1251 if(!p3->writeIsNoop())
1275 VertexMapper* vertexmapper;
1278 std::vector<int> number;
virtual void bind(const Entity &e) const
Bind data set to grid entity - must be called before evaluating (i.e. calling write()) ...
Definition: vtkwriter.hh:206
EntityReference dereference() const
Definition: vtkwriter.hh:396
void increment()
Definition: vtkwriter.hh:471
for .vtu files (UnstructuredGrid)
Definition: common.hh:294
Grid::ctype ctype
type used for coordinates in grid
Definition: common/gridview.hh:127
std::string name() const
The name of the data field.
Definition: common.hh:330
A base class for grid functions with any return type and dimension.
Definition: function.hh:38
CornerIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm, const std::vector< int > &num)
Definition: vtkwriter.hh:463
void addVertexData(VTKFunction *p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition: vtkwriter.hh:605
for .vtp files (PolyData)
Definition: common.hh:292
OutputType
How the bulk data should be stored in the file.
Definition: common.hh:40
Base class for polymorphic container of underlying data set.
Definition: vtkwriter.hh:130
Type type() const
The type of the data field.
Definition: common.hh:336
VertexIterator vertexEnd() const
Definition: vtkwriter.hh:420
Dump a .vtu/.vtp files contents to a stream.
Definition: pvtuwriter.hh:60
void beginCells()
start section for the grid cells/PolyData lines
Definition: vtuwriter.hh:272
virtual void bind(const Entity &e) const =0
Bind data set to grid entity - must be called before evaluating (i.e. calling write()) ...
Base class to write pvd-files which contains a list of all collected vtk-files.
Definition: vtksequencewriterbase.hh:32
void addVertexData(const V &v, const std::string &name, int ncomps=1)
Add a grid function (represented by container) that lives on the vertices of the grid to the visualiz...
Definition: vtkwriter.hh:642
CornerIterator cornerEnd() const
Definition: vtkwriter.hh:525
const CollectiveCommunication & comm() const
obtain collective communication object
Definition: common/gridview.hh:249
Traits::Grid Grid
type of the grid
Definition: common/gridview.hh:77
virtual ~FunctionWrapperBase()
Definition: vtkwriter.hh:145
VTKFunctionWrapper(const VTKFunctionPtr &f)
Definition: vtkwriter.hh:201
FileType
which type of VTK file to write
Definition: common.hh:290
virtual void unbind() const =0
Unbind data set from current grid entity - mostly here for performance and symmetry reasons...
Output conforming data.
Definition: common.hh:70
VTKLocalFunction(const VTKFunctionPtr &vtkFunctionPtr)
Construct a VTKLocalFunction for a legacy VTKFunction.
Definition: vtkwriter.hh:237
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition: vtkwriter.hh:1195
void addCellData(VTKFunction *p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition: vtkwriter.hh:566
VertexIterator(const GridCellIterator &x, const GridCellIterator &end, const VTK::DataMode &dm, const VertexMapper &vm)
Definition: vtkwriter.hh:362
The dimension of the grid.
Definition: common/gridview.hh:130
Traits::IndexSet IndexSet
type of the index set
Definition: common/gridview.hh:80
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition: vtkwriter.hh:1181
Include standard header files.
Definition: agrid.hh:59
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...
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:711
CornerIterator cornerBegin() const
Definition: vtkwriter.hh:518
VTK::FieldInfo _fieldInfo
Definition: vtkwriter.hh:277
std::string name() const
Returns the name of the data set.
Definition: vtkwriter.hh:247
Iterate over the elements' corners.
Definition: vtkwriter.hh:442
std::list< VTKLocalFunction >::const_iterator FunctionIterator
Definition: vtkwriter.hh:281
std::string getTypeString() const
Definition: vtkwriter.hh:1060
all interior entities
Definition: gridenums.hh:29
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition: gridenums.hh:134
base class for data array writers
Definition: dataarraywriter.hh:53
DataArrayWriter< T > * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems)
aquire a DataArrayWriter
Definition: vtuwriter.hh:379
void increment()
Definition: vtkwriter.hh:373
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:817
Functions for VTK output.
const VTK::FieldInfo & fieldInfo() const
Returns the VTK::FieldInfo for the data set.
Definition: vtkwriter.hh:253
Ouput is to the file is appended raw binary.
Definition: common.hh:46
int size() const
Return total number of entities in the entity set managed by the mapper.
Definition: mcmgmapper.hh:205
VTK::DataArrayWriter< float > Writer
Definition: vtkwriter.hh:127
Mapper for multiple codim and multiple geometry types.
Take a vector and interpret it as cell data for the VTKWriter.
Definition: function.hh:88
Iterator over the grids elements.
Definition: vtkwriter.hh:289
Ouput is to the file is appended base64 binary.
Definition: common.hh:48
VTKWriter(const GridView &gridView, VTK::DataMode dm=VTK::conforming)
Construct a VTKWriter working on a specific GridView.
Definition: vtkwriter.hh:540
CellIterator cellBegin() const
Definition: vtkwriter.hh:302
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition: vtkwriter.hh:1219
void basicIncrement()
Definition: vtkwriter.hh:345
void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries)
Definition: vtkwriter.hh:1125
Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Map subentity of codim 0 entity to array index.
Definition: mcmgmapper.hh:190
vector-valued field (always 3D, will be padded if necessary)
Type erasure implementation for functions conforming to the dune-functions LocalFunction interface...
Definition: vtkwriter.hh:152
Common stuff for the VTKWriter.
DataMode
Whether to produce conforming or non-conforming output.
Definition: common.hh:64
GridView gridView_
Definition: vtkwriter.hh:1268
std::string getParallelHeaderName(const std::string &name, const std::string &path, int commSize) const
return name of a parallel header file
Definition: vtkwriter.hh:761
void clear()
clear list of registered functions
Definition: vtkwriter.hh:656
virtual ~VTKWriter()
destructor
Definition: vtkwriter.hh:663
virtual void write(T data)=0
write one data element
int localindex() const
index of vertex within the entity, in Dune-numbering
Definition: vtkwriter.hh:401
Data array writers for the VTKWriter.
void addCellData(const V &v, const std::string &name, int ncomps=1)
Add a grid function (represented by container) that lives on the cells of the grid to the visualizati...
Definition: vtkwriter.hh:587
all entities
Definition: gridenums.hh:139
VTK::OutputType outputtype
Definition: vtkwriter.hh:1281
std::shared_ptr< FunctionWrapperBase > _f
Definition: vtkwriter.hh:276
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w...
Definition: vtkwriter.hh:216
EntityReference dereference() const
Definition: vtkwriter.hh:493
void addCellData(const VTKFunctionPtr &p)
Add a grid function that lives on the cells of the grid to the visualization.
Definition: vtkwriter.hh:550
Output to the file is inline base64 binary.
Definition: common.hh:44
void addCellData(F &&f, VTK::FieldInfo vtkFieldInfo)
Definition: vtkwriter.hh:556
std::list< VTKLocalFunction > celldata
Definition: vtkwriter.hh:1264
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition: common.hh:195
std::list< VTKLocalFunction > vertexdata
Definition: vtkwriter.hh:1265
CellIterator cellEnd() const
Definition: vtkwriter.hh:307
virtual void unbind() const
Unbind data set from current grid entity - mostly here for performance and symmetry reasons...
Definition: vtkwriter.hh:166
std::string write(const std::string &name, VTK::OutputType type=VTK::ascii)
write output (interface might change later)
Definition: vtkwriter.hh:679
bool equals(const CornerIterator &cit) const
Definition: vtkwriter.hh:487
std::string getFormatString() const
Definition: vtkwriter.hh:1047
VertexIterator vertexBegin() const
Definition: vtkwriter.hh:413
Grid view abstract base class.
Definition: common/gridview.hh:58
Type erasure wrapper for VTK data sets.
Definition: vtkwriter.hh:122
void endPointData()
finish PointData section
Definition: vtuwriter.hh:180
Output to the file is in ascii.
Definition: common.hh:42
std::string getParallelPieceName(const std::string &name, const std::string &path, int commRank, int commSize) const
return name of a parallel piece file
Definition: vtkwriter.hh:730
Type erasure implementation for legacy VTKFunctions.
Definition: vtkwriter.hh:198
int min(const DofVectorPointer< int > &dofVector)
Definition: dofvector.hh:346
shared_ptr< const VTKFunction > VTKFunctionPtr
Definition: vtkwriter.hh:114
int id() const
Process-local consecutive zero-starting vertex id.
Definition: vtkwriter.hh:502
bool equals(const VertexIterator &cit) const
Definition: vtkwriter.hh:390
void endCells()
start section for the grid cells/PolyData lines
Definition: vtuwriter.hh:283
void beginPoints()
start section for the point coordinates
Definition: vtuwriter.hh:236
const FieldVector< DT, n > & position() const
position of vertex inside the entity
Definition: vtkwriter.hh:406
Dune::VTKFunction< GridView > VTKFunction
Definition: vtkwriter.hh:113
tensor field (always 3x3)
std::tuple< std::string, std::string > getDataNames(const T &data) const
Definition: vtkwriter.hh:1098
interior and border entities
Definition: gridenums.hh:136
The dimension of the world the grid lives in.
Definition: common/gridview.hh:134
std::string getSerialPieceName(const std::string &name, const std::string &path) const
return name of a serial piece file
Definition: vtkwriter.hh:793
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
virtual void unbind() const
Unbind data set from current grid entity - mostly here for performance and symmetry reasons...
Definition: vtkwriter.hh:211
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition: vtuwriter.hh:165
virtual void bind(const Entity &e) const
Bind data set to grid entity - must be called before evaluating (i.e. calling write()) ...
Definition: vtkwriter.hh:161
virtual void writeCellData(VTK::VTUWriter &writer)
write cell data
Definition: vtkwriter.hh:1167
int ncorners
Definition: vtkwriter.hh:1273
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition: vtuwriter.hh:203
std::size_t size() const
The number of components in the data field.
Definition: common.hh:342
void write(const Coordinate &pos, Writer &w) const
Write the value of the data set at local coordinate pos to the writer w.
Definition: vtkwriter.hh:271
void unbind() const
Unbind the data set from the currently bound entity.
Definition: vtkwriter.hh:265
Descriptor struct for VTK fields.
Definition: common.hh:306
void addVertexData(F &&f, VTK::FieldInfo vtkFieldInfo)
Definition: vtkwriter.hh:620
virtual void write(const Coordinate &pos, Writer &w, std::size_t count) const
Evaluate data set at local position pos inside the current entity and write result to w...
Definition: vtkwriter.hh:171
Dump a .vtu/.vtp files contents to a stream.
Definition: vtuwriter.hh:96
VTKLocalFunction(F &&f, VTK::FieldInfo fieldInfo)
Construct a VTKLocalFunction for a dune-functions style LocalFunction.
Definition: vtkwriter.hh:231
virtual void countEntities(int &nvertices, int &ncells, int &ncorners)
count the vertices, cells and corners
Definition: vtkwriter.hh:1069
Iterate over the grid's vertices.
Definition: vtkwriter.hh:327
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition: common.hh:224
void bind(const Entity &e) const
Bind the data set to grid entity e.
Definition: vtkwriter.hh:259
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:877
CellIterator(const GridCellIterator &x)
construct a CellIterator from the gridview's Iterator.
Definition: vtkwriter.hh:293
Output non-conforming data.
Definition: common.hh:78
const FieldVector< DT, n > position() const
Definition: vtkwriter.hh:296
Writer for the ouput of grid functions in the vtk format.Writes arbitrary grid functions (living on c...
Definition: vtkwriter.hh:63
int nvertices
Definition: vtkwriter.hh:1272
FunctionWrapper(F_ &&f)
Definition: vtkwriter.hh:157
int ncells
Definition: vtkwriter.hh:1271
void endPoints()
finish section for the point coordinates
Definition: vtuwriter.hh:247
void addVertexData(const VTKFunctionPtr &p)
Add a grid function that lives on the vertices of the grid to the visualization.
Definition: vtkwriter.hh:614
Take a vector and interpret it as point data for the VTKWriter.
Definition: function.hh:186
void endCellData()
finish CellData section
Definition: vtuwriter.hh:218