dune-grid 2.9.0
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::VTK::ConformingVolumeWriter< GV > Class Template Reference

#include <dune/grid/io/file/vtk/volumewriter.hh>

Inheritance diagram for Dune::VTK::ConformingVolumeWriter< GV >:
Inheritance graph

Public Types

typedef Dune::VTKFunction< GV > VTKFunction
 
typedef std::shared_ptr< VTKFunctionVTKFunctionPtr
 
typedef GV::template Codim< 0 >::Entity Cell
 
typedef GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
 
typedef VTK::Corner< CellCorner
 
typedef VTK::CornerIterator< CellIteratorCornerIterator
 
typedef VTK::Corner< CellPoint
 
typedef VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
 
typedef ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
 
typedef GV::Communication Communication
 
typedef FunctionWriterBase< CellFunctionWriter
 

Public Member Functions

 ConformingVolumeWriter (const GV &gv_)
 
void addCellData (const VTKFunctionPtr &p)
 
void addCellData (VTKFunction *p)
 
template<typename V >
void addCellData (const V &v, const std::string &name, int ncomps=1)
 
void addVertexData (const VTKFunctionPtr &p)
 
void addVertexData (VTKFunction *p)
 
template<typename V >
void addVertexData (const V &v, const std::string &name, int ncomps=1)
 
void addPointData (const std::shared_ptr< FunctionWriter > &writer)
 
CellIterator beginCells () const
 
CellIterator endCells () const
 
CornerIterator beginCorners () const
 
CornerIterator endCorners () const
 
PointIterator beginPoints () const
 
PointIterator endPoints () const
 
ConnectivityWriter makeConnectivity () const
 
const Communicationcomm () const
 
void addCellData (const std::shared_ptr< FunctionWriter > &writer)
 
void clear ()
 
void writePiece (const std::string &filename, OutputType outputType)
 
void writeCollection (const std::string name, const std::string &piecename, const std::string &piecepath)
 write header file in parallel case to stream More...
 
std::string getParallelPieceName (const std::string &name, const std::string &path, int rank) const
 return name of a parallel piece file More...
 
std::string getParallelHeaderName (const std::string &name, const std::string &path) 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 pwrite (const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
 write output; interface might change later More...
 
std::string write (const std::string &name, OutputType outputType)
 write output (interface might change later) More...
 

Static Public Attributes

static const unsigned dimCell = GV::dimension
 

Protected Member Functions

void writeCellFunction (VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncells) const
 
void writePointFunction (VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned npoints) const
 
void writeCornerFunction (VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncorners) const
 
void writeCellData (VTUWriter &vtuWriter, unsigned ncells) const
 
void writePointData (VTUWriter &vtuWriter, unsigned npoints) const
 
void writeGrid (VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
 
void writeAll (VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
 

Static Protected Member Functions

static std::string getFirstScalar (const WriterList &data)
 
static std::string getFirstVector (const WriterList &data)
 

Member Typedef Documentation

◆ Cell

template<typename GV >
typedef GV::template Codim<0>::Entity Dune::VTK::ConformingVolumeIteratorFactory< GV >::Cell
inherited

◆ CellIterator

template<typename GV >
typedef GV::template Codim<0>::template Partition<InteriorBorder_Partition>::Iterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::CellIterator
inherited

◆ Communication

template<typename GV >
typedef GV::Communication Dune::VTK::ConformingVolumeIteratorFactory< GV >::Communication
inherited

◆ ConnectivityWriter

template<typename GV >
typedef ConformingConnectivityWriter<ConformingVolumeIteratorFactory<GV> > Dune::VTK::ConformingVolumeIteratorFactory< GV >::ConnectivityWriter
inherited

◆ Corner

template<typename GV >
typedef VTK::Corner<Cell> Dune::VTK::ConformingVolumeIteratorFactory< GV >::Corner
inherited

◆ CornerIterator

template<typename GV >
typedef VTK::CornerIterator<CellIterator> Dune::VTK::ConformingVolumeIteratorFactory< GV >::CornerIterator
inherited

◆ FunctionWriter

◆ Point

template<typename GV >
typedef VTK::Corner<Cell> Dune::VTK::ConformingVolumeIteratorFactory< GV >::Point
inherited

◆ PointIterator

template<typename GV >
typedef VTK::PointIterator<CellIterator, typename GV::IndexSet> Dune::VTK::ConformingVolumeIteratorFactory< GV >::PointIterator
inherited

◆ VTKFunction

template<typename GV >
typedef Dune::VTKFunction< GV > Dune::VTK::ConformingVolumeWriter< GV >::VTKFunction

◆ VTKFunctionPtr

template<typename GV >
typedef std::shared_ptr<VTKFunction> Dune::VTK::ConformingVolumeWriter< GV >::VTKFunctionPtr

Constructor & Destructor Documentation

◆ ConformingVolumeWriter()

template<typename GV >
Dune::VTK::ConformingVolumeWriter< GV >::ConformingVolumeWriter ( const GV &  gv_)
inline

Member Function Documentation

◆ addCellData() [1/4]

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::addCellData ( const std::shared_ptr< FunctionWriter > &  writer)
inlineinherited

◆ addCellData() [2/4]

template<typename GV >
template<typename V >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( const V &  v,
const std::string &  name,
int  ncomps = 1 
)
inline

◆ addCellData() [3/4]

template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( const VTKFunctionPtr p)
inline

◆ addCellData() [4/4]

template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( VTKFunction p)
inline

◆ addPointData()

template<typename GV >
void Dune::VTK::BasicWriter< IteratorFactory >::addPointData ( const std::shared_ptr< FunctionWriter > &  writer)
inline

◆ addVertexData() [1/3]

template<typename GV >
template<typename V >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( const V &  v,
const std::string &  name,
int  ncomps = 1 
)
inline

◆ addVertexData() [2/3]

template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( const VTKFunctionPtr p)
inline

◆ addVertexData() [3/3]

template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( VTKFunction p)
inline

◆ beginCells()

template<typename GV >
CellIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginCells ( ) const
inlineinherited

◆ beginCorners()

template<typename GV >
CornerIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginCorners ( ) const
inlineinherited

◆ beginPoints()

template<typename GV >
PointIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginPoints ( ) const
inlineinherited

◆ clear()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::clear ( )
inlineinherited

◆ comm()

template<typename GV >
const Communication & Dune::VTK::ConformingVolumeIteratorFactory< GV >::comm ( ) const
inlineinherited

◆ endCells()

template<typename GV >
CellIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endCells ( ) const
inlineinherited

◆ endCorners()

template<typename GV >
CornerIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endCorners ( ) const
inlineinherited

◆ endPoints()

template<typename GV >
PointIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endPoints ( ) const
inlineinherited

◆ getFirstScalar()

static std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getFirstScalar ( const WriterList &  data)
inlinestaticprotectedinherited

◆ getFirstVector()

static std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getFirstVector ( const WriterList &  data)
inlinestaticprotectedinherited

◆ getParallelHeaderName()

std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getParallelHeaderName ( const std::string &  name,
const std::string &  path 
) const
inlineinherited

return name of a parallel header file

Parameters
nameBase name of the VTK output. This should be without any directory parts and without a filename extension.
pathDirectory part of the resulting header name. May be empty, in which case the resulting name will not have a directory part. If non-empty, may or may not have a trailing '/'. If a trailing slash is missing, one is appended implicitly.

◆ getParallelPieceName()

std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getParallelPieceName ( const std::string &  name,
const std::string &  path,
int  rank 
) const
inlineinherited

return name of a parallel piece file

Parameters
nameBase name of the VTK output. This should be without any directory parts and without a filename extension.
pathDirectory part of the resulting piece name. May be empty, in which case the resulting name will not have a directory part. If non-empty, may or may not have a trailing '/'. If a trailing slash is missing, one is appended implicitly.
rankRank of the process to generate a piece name for.

◆ getSerialPieceName()

std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getSerialPieceName ( const std::string &  name,
const std::string &  path 
) const
inlineinherited

return name of a serial piece file

This is similar to getParallelPieceName, but skips the prefixes for commSize ("s####:") and commRank ("p####:").

Parameters
nameBase name of the VTK output. This should be without any directory parts and without a filename extension.
pathDirectory part of the resulting piece name. May be empty, in which case the resulting name will not have a directory part. If non-empty, may or may not have a trailing '/'. If a trailing slash is missing, one is appended implicitly.

◆ makeConnectivity()

template<typename GV >
ConnectivityWriter Dune::VTK::ConformingVolumeIteratorFactory< GV >::makeConnectivity ( ) const
inlineinherited

◆ pwrite()

std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::pwrite ( const std::string &  name,
const std::string &  path,
const std::string &  extendpath,
OutputType  outputType 
)
inlineinherited

write output; interface might change later

Parameters
nameBase 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.
pathDirectory where to put the parallel collection (.pvtu/.pvtp) file. If it is relative, it is taken realtive to the current directory.
extendpathDirectory 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.
outputTypeHow 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
NotImplementedExtendpath is absolute but path is relative.
IOErrorFailed to open a file.
MPIGuardErrorAn exception was thrown during this method in one of the other processes.

◆ write()

std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::write ( const std::string &  name,
OutputType  outputType 
)
inlineinherited

write output (interface might change later)

This method can be used in parallel as well as in serial programs. For serial runs (commSize=1) it chooses other names without the "s####:p####:" prefix for the .vtu/.vtp files and omits writing of the .pvtu/pvtp file however. For parallel runs (commSize > 1) it is the same as a call to pwrite() with path="" and extendpath="".

Parameters
nameBase name of the output files. This should not contain any directory part and no filename extensions.
outputTypeHow to encode the data in the file.

◆ writeAll()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeAll ( VTUWriter vtuWriter,
unsigned  ncells,
unsigned  npoints,
unsigned  ncorners 
)
inlineprotectedinherited

◆ writeCellData()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCellData ( VTUWriter vtuWriter,
unsigned  ncells 
) const
inlineprotectedinherited

◆ writeCellFunction()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCellFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  ncells 
) const
inlineprotectedinherited

◆ writeCollection()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCollection ( const std::string  name,
const std::string &  piecename,
const std::string &  piecepath 
)
inlineinherited

write header file in parallel case to stream

Writes a .pvtu/.pvtp file for a collection of concurrently written .vtu/.vtp files.

Parameters
nameName of file to write contents to,
piecenameBase name of the pieces. Should not contain a directory part or filename extension.
piecepathDirectory part of the pieces. Since paraview does not support absolute paths in parallel collection files, this should be a path relative to the directory the collection file resides in. A trailing '/' is optional, and an empty value "" is equivalent to the value "." except it will look nicer in the collection file.

◆ writeCornerFunction()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCornerFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  ncorners 
) const
inlineprotectedinherited

◆ writeGrid()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeGrid ( VTUWriter vtuWriter,
unsigned  ncells,
unsigned  npoints,
unsigned  ncorners 
)
inlineprotectedinherited

◆ writePiece()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePiece ( const std::string &  filename,
OutputType  outputType 
)
inlineinherited

◆ writePointData()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePointData ( VTUWriter vtuWriter,
unsigned  npoints 
) const
inlineprotectedinherited

◆ writePointFunction()

void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePointFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  npoints 
) const
inlineprotectedinherited

Member Data Documentation

◆ dimCell

template<typename GV >
const unsigned Dune::VTK::ConformingVolumeIteratorFactory< GV >::dimCell = GV::dimension
staticinherited

The documentation for this class was generated from the following file: