BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Bempp::ConcreteVtkWriter< DuneGridView > Class Template Reference

Wrapper of a Dune VTK writer for a grid view of type DuneGridView. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/concrete_vtk_writer.hpp>

Inheritance diagram for Bempp::ConcreteVtkWriter< DuneGridView >:
Bempp::VtkWriter

Public Member Functions

virtual void clear ()
 Clear the list of registered functions.
 
virtual std::string write (const std::string &name, OutputType type=ASCII)
 Write output (interface might change later). More...
 
virtual std::string pwrite (const std::string &name, const std::string &path, const std::string &extendpath, OutputType type=ASCII)
 Write output (interface might change later). More...
 
- Public Member Functions inherited from Bempp::VtkWriter
virtual ~VtkWriter ()
 Destructor.
 
void addCellData (const arma::Mat< double > &data, const std::string &name)
 Add a grid function (represented by a container) that lives on the cells of the grid to the visualization output. More...
 
void addCellData (const arma::Mat< float > &data, const std::string &name)
 
void addVertexData (const arma::Mat< double > &data, const std::string &name)
 Add a grid function (represented by a container) that lives on the vertices of the grid to the visualization output. More...
 
void addVertexData (const arma::Mat< float > &data, const std::string &name)
 

Private Member Functions

 ConcreteVtkWriter (const DuneGridView &dune_gv, Dune::VTK::DataMode dm=Dune::VTK::conforming)
 Construct a VtkWriter working on a specific DuneGridView. More...
 
virtual void addCellDataDoubleImpl (const arma::Mat< double > &data, const std::string &name)
 
virtual void addCellDataFloatImpl (const arma::Mat< float > &data, const std::string &name)
 
template<typename ValueType >
void addCellDataImpl (const arma::Mat< ValueType > &data, const std::string &name)
 
virtual void addVertexDataDoubleImpl (const arma::Mat< double > &data, const std::string &name)
 
virtual void addVertexDataFloatImpl (const arma::Mat< float > &data, const std::string &name)
 
template<typename ValueType >
void addVertexDataImpl (const arma::Mat< ValueType > &data, const std::string &name)
 
Dune::VTK::OutputType duneVtkOutputType (OutputType type) const
 

Private Attributes

Dune::VTKWriter< DuneGridView > m_dune_vtk_writer
 
const DuneGridView * m_dune_gv
 

Friends

std::auto_ptr< VtkWriterConcreteGridView (Dune::VTK::DataMode dm) const
 

Additional Inherited Members

- Public Types inherited from Bempp::VtkWriter
enum  OutputType { ASCII, BASE_64, APPENDED_RAW, APPENDED_BASE_64 }
 How data should be stored in a VTK file. More...
 
enum  DataType { CELL_DATA, VERTEX_DATA }
 Dataset type.
 

Detailed Description

template<typename DuneGridView>
class Bempp::ConcreteVtkWriter< DuneGridView >

Wrapper of a Dune VTK writer for a grid view of type DuneGridView.

Constructor & Destructor Documentation

template<typename DuneGridView >
Bempp::ConcreteVtkWriter< DuneGridView >::ConcreteVtkWriter ( const DuneGridView &  dune_gv,
Dune::VTK::DataMode  dm = Dune::VTK::conforming 
)
inlineexplicitprivate

Construct a VtkWriter working on a specific DuneGridView.

Parameters
dune_gvThe grid view the grid functions live on. (E.g. a LevelGridView.)
dmThe data mode.

Member Function Documentation

template<typename DuneGridView >
virtual std::string Bempp::ConcreteVtkWriter< DuneGridView >::pwrite ( const std::string &  name,
const std::string &  path,
const std::string &  extendpath,
OutputType  type = ASCII 
)
inlinevirtual

Write output (interface might change later).

"pwrite" means "path write" (i.e. write somewhere else than the current directory). The "p" does not mean this method has a monopoly on parallel writing, the regular write(const std::string &, OutputType) method can do that just fine.

Parameters
nameBase name of the output files. This should not contain any directory part or filename extensions. It will be used both for the piece file of each process and the parallel collection file.
pathDirectory where to put the parallel collection (.pvtu/.pvtp) file. If it is relative, it is taken relative 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.
typeHow to encode the data in the file.
Returns
Name of the created file.
Note
Currently, extendpath may not be absolute unless path is absolute, because that would require the value of the current directory.
Exceptions
Dune::NotImplementedExtendpath is absolute but path is relative.
Dune::IOErrorFailed to open a file.

Implements Bempp::VtkWriter.

template<typename DuneGridView >
virtual std::string Bempp::ConcreteVtkWriter< DuneGridView >::write ( const std::string &  name,
OutputType  type = ASCII 
)
inlinevirtual

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
[in]nameBasic name to write (may not contain a path).
[in]typeType of output (e.g,, ASCII) (optional).
Returns
Name of the created file.

Implements Bempp::VtkWriter.


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