dune-grid  2.2.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 >:
Dune::VTK::ConformingVolumeIteratorFactory< GV > Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >

Public Types

typedef Dune::VTKFunction< GV > VTKFunction
typedef 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
< CellIterator
CornerIterator
typedef VTK::Corner< CellPoint
typedef VTK::PointIterator
< CellIterator, typename
GV::IndexSet > 
PointIterator
typedef
ConformingConnectivityWriter
< ConformingVolumeIteratorFactory
< GV > > 
ConnectivityWriter
typedef GV::CollectiveCommunication CollectiveCommunication
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)
CellIterator beginCells () const
CellIterator endCells () const
CornerIterator beginCorners () const
CornerIterator endCorners () const
PointIterator beginPoints () const
PointIterator endPoints () const
ConnectivityWriter makeConnectivity () const
const CollectiveCommunicationcomm () const
void addCellData (const shared_ptr< FunctionWriter > &writer)
void addPointData (const 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
std::string getParallelPieceName (const std::string &name, const std::string &path, int rank) const
 return name of a parallel piece file
std::string getParallelHeaderName (const std::string &name, const std::string &path) const
 return name of a parallel header file
std::string getSerialPieceName (const std::string &name, const std::string &path) const
 return name of a serial piece file
std::string pwrite (const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
 write output; interface might change later
std::string write (const std::string &name, OutputType outputType)
 write output (interface might change later)

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

template<typename GV >
typedef GV::template Codim<0>::Entity Dune::VTK::ConformingVolumeIteratorFactory< GV >::Cell
inherited
template<typename GV >
typedef GV::template Codim<0>:: template Partition<InteriorBorder_Partition>::Iterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::CellIterator
inherited
template<typename GV >
typedef GV::CollectiveCommunication Dune::VTK::ConformingVolumeIteratorFactory< GV >::CollectiveCommunication
inherited
template<typename GV >
typedef ConformingConnectivityWriter<ConformingVolumeIteratorFactory<GV> > Dune::VTK::ConformingVolumeIteratorFactory< GV >::ConnectivityWriter
inherited
template<typename GV >
typedef VTK::Corner<Cell> Dune::VTK::ConformingVolumeIteratorFactory< GV >::Corner
inherited
template<typename GV >
typedef VTK::Corner<Cell> Dune::VTK::ConformingVolumeIteratorFactory< GV >::Point
inherited
template<typename GV >
typedef VTK::PointIterator<CellIterator, typename GV::IndexSet> Dune::VTK::ConformingVolumeIteratorFactory< GV >::PointIterator
inherited
template<typename GV >
typedef Dune::VTKFunction< GV > Dune::VTK::ConformingVolumeWriter< GV >::VTKFunction
template<typename GV >
typedef shared_ptr<VTKFunction> Dune::VTK::ConformingVolumeWriter< GV >::VTKFunctionPtr

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( const VTKFunctionPtr p)
inline
template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( VTKFunction p)
inline
template<typename GV >
template<typename V >
void Dune::VTK::ConformingVolumeWriter< GV >::addCellData ( const V &  v,
const std::string &  name,
int  ncomps = 1 
)
inline
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::addCellData ( const shared_ptr< FunctionWriter > &  writer)
inlineinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::addPointData ( const shared_ptr< FunctionWriter > &  writer)
inlineinherited
template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( const VTKFunctionPtr p)
inline
template<typename GV >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( VTKFunction p)
inline
template<typename GV >
template<typename V >
void Dune::VTK::ConformingVolumeWriter< GV >::addVertexData ( const V &  v,
const std::string &  name,
int  ncomps = 1 
)
inline
template<typename GV >
CellIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginCells ( ) const
inlineinherited
template<typename GV >
CornerIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginCorners ( ) const
inlineinherited
template<typename GV >
PointIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::beginPoints ( ) const
inlineinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::clear ( )
inlineinherited
template<typename GV >
const CollectiveCommunication& Dune::VTK::ConformingVolumeIteratorFactory< GV >::comm ( ) const
inlineinherited
template<typename GV >
CellIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endCells ( ) const
inlineinherited
template<typename GV >
CornerIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endCorners ( ) const
inlineinherited
template<typename GV >
PointIterator Dune::VTK::ConformingVolumeIteratorFactory< GV >::endPoints ( ) const
inlineinherited
static std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getFirstScalar ( const WriterList &  data)
inlinestaticprotectedinherited
static std::string Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::getFirstVector ( const WriterList &  data)
inlinestaticprotectedinherited
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.
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.
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.
template<typename GV >
ConnectivityWriter Dune::VTK::ConformingVolumeIteratorFactory< GV >::makeConnectivity ( ) const
inlineinherited
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.
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.
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeAll ( VTUWriter vtuWriter,
unsigned  ncells,
unsigned  npoints,
unsigned  ncorners 
)
inlineprotectedinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCellData ( VTUWriter vtuWriter,
unsigned  ncells 
) const
inlineprotectedinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCellFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  ncells 
) const
inlineprotectedinherited
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.
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeCornerFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  ncorners 
) const
inlineprotectedinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writeGrid ( VTUWriter vtuWriter,
unsigned  ncells,
unsigned  npoints,
unsigned  ncorners 
)
inlineprotectedinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePiece ( const std::string &  filename,
OutputType  outputType 
)
inlineinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePointData ( VTUWriter vtuWriter,
unsigned  npoints 
) const
inlineprotectedinherited
void Dune::VTK::BasicWriter< ConformingVolumeIteratorFactory< GV > >::writePointFunction ( VTUWriter vtuWriter,
FunctionWriter functionWriter,
unsigned  npoints 
) const
inlineprotectedinherited

Member Data Documentation

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

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