4#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH 
    5#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH 
   81          fileType = 
"PPolyData";
 
   84          fileType = 
"PUnstructuredGrid";
 
   91        stream << indent << 
"<?xml version=\"1.0\"?>\n";
 
   92        stream << indent << 
"<VTKFile" 
   93               << 
" type=\"" << fileType << 
"\"" 
   95               << 
" byte_order=\"" << byteOrder << 
"\">\n";
 
  102        stream << indent << 
"</VTKFile>\n" 
  119                                 const std::string& vectors = 
"") {
 
  120        stream << indent << 
"<PPointData";
 
  121        if(scalars != 
"") stream << 
" Scalars=\"" << scalars << 
"\"";
 
  122        if(vectors != 
"") stream << 
" Vectors=\"" << vectors << 
"\"";
 
  129        stream << indent << 
"</PPointData>\n";
 
  145                                const std::string& vectors = 
"") {
 
  146        stream << indent << 
"<PCellData";
 
  147        if(scalars != 
"") stream << 
" Scalars=\"" << scalars << 
"\"";
 
  148        if(vectors != 
"") stream << 
" Vectors=\"" << vectors << 
"\"";
 
  155        stream << indent << 
"</PCellData>\n";
 
  165        stream << indent << 
"<PPoints>\n";
 
  171        stream << indent << 
"</PPoints>\n";
 
  188        stream << indent << 
"<" << fileType
 
  189               << 
" GhostLevel=\"" << ghostLevel << 
"\">\n";
 
  195        stream << indent << 
"</" << fileType << 
">\n";
 
  205      void addArray(
const std::string& name, 
unsigned ncomps) {
 
  207        stream << indent << 
"<PDataArray" 
  208               << 
" type=\"" << tn() << 
"\"" 
  209               << 
" Name=\"" << name << 
"\"" 
  210               << 
" NumberOfComponents=\"" << ncomps << 
"\"/>\n";
 
  214      inline void addPiece(
const std::string& filename) {
 
  215        stream << indent << 
"<Piece " 
  216               << 
" Source=\"" << filename << 
"\"/>\n";
 
Default exception class for I/O errors.
Definition: exceptions.hh:256
 
Utility class for handling nested indentation in output.
Definition: indent.hh:51
 
Dump a .vtu/.vtp files contents to a stream.
Definition: pvtuwriter.hh:60
 
~PVTUWriter()
write footer
Definition: pvtuwriter.hh:100
 
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition: pvtuwriter.hh:193
 
void endCellData()
finish CellData section
Definition: pvtuwriter.hh:153
 
void addArray(const std::string &name, unsigned ncomps)
Add an array to the output file.
Definition: pvtuwriter.hh:205
 
void beginMain(unsigned ghostLevel=0)
start the main PPolyData/PUnstructuredGrid section
Definition: pvtuwriter.hh:187
 
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition: pvtuwriter.hh:144
 
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition: pvtuwriter.hh:118
 
void addPiece(const std::string &filename)
Add a serial piece to the output file.
Definition: pvtuwriter.hh:214
 
PVTUWriter(std::ostream &stream_, FileType fileType_)
create a PVTUWriter object
Definition: pvtuwriter.hh:76
 
void endPointData()
finish PointData section
Definition: pvtuwriter.hh:127
 
void endPoints()
finish section for the point coordinates
Definition: pvtuwriter.hh:169
 
void beginPoints()
start section for the point coordinates
Definition: pvtuwriter.hh:164
 
map type to its VTK name in data array
Definition: common.hh:124
 
Common stuff for the VTKWriter.
 
FileType
which type of VTK file to write
Definition: common.hh:290
 
@ polyData
for .vtp files (PolyData)
Definition: common.hh:292
 
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition: common.hh:294
 
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition: common.hh:270
 
A few common exception classes.
 
#define DUNE_THROW(E, m)
Definition: exceptions.hh:243
 
Utility class for handling nested indentation in output.
 
Dune namespace.
Definition: alignment.hh:10