DUNE-FEM (unstable)

Implementation of the Dune::IOInterface. This class manages data output. Available output formats are GRAPE, VTK and VTK Vertex projected using the VtxProjection operator. Details can be found in DiscFuncIO. More...

#include <dune/fem/io/file/datawriter.hh>

Public Member Functions

 DataWriter (const GridType &grid, OutPutDataType &data, const DataWriterParameters &parameter=DataWriterParameters())
 Constructor creating data writer. More...
 
 DataWriter (const GridType &grid, OutPutDataType &data, const TimeProviderBase &tp, const DataWriterParameters &parameter=DataWriterParameters())
 Constructor creating data writer. More...
 
virtual ~DataWriter ()
 destructor
 
virtual bool willWrite (const TimeProviderBase &tp) const
 returns true if data will be written on next write call
 
virtual bool willWrite () const
 returns true if data will be written on next write call
 
void write (const std::string &outstring) const
 write given data to disc, evaluates parameter savecount More...
 
void write () const
 write given data to disc, evaluates parameter savecount
 
void write (const TimeProviderBase &tp, const std::string &outstring) const
 write given data to disc, evaluates parameter savecount and savestep More...
 
void write (const TimeProviderBase &tp) const
 write given data to disc, evaluates parameter savecount and savestep More...
 
void writeData (double sequenceStamp, const std::string &outstring) const
 write data with a given sequence stamp and outstring More...
 
void writeData (double sequenceStamp) const
 write data with a given sequence stamp More...
 
const std::string & path () const
 return output path name
 
int writeStep () const
 return write step
 
int writeCalls () const
 return write calls
 
double saveTime () const
 return save time
 

Static Public Member Functions

static std::string defaultGridKey (int dimension, bool check=true)
 return FEM key for macro grid reading
 
static std::string defaultGridKey (std::string base, int dimension, const ParameterReader &parameter, bool check=true)
 return FEM key for macro grid reading
 
static void createPath (const std::string &path)
 create given path in combination with rank
 
static std::string createPathName (const std::string &pathPref, int rank)
 create given path in combination with rank
 
static std::string readPath ()
 
template<class CommunicatorType >
static void createGlobalPath (const CommunicatorType &comm, const std::string &path)
 create global path for data output
 

Protected Types

typedef GridImp GridType
 type of grid used
 
typedef DataImp OutPutDataType
 type of data tuple
 
typedef DataWriter< GridImp, DataImp > ThisType
 type of this class
 

Protected Member Functions

virtual const char * myClassName () const
 print class name
 
virtual void writeBinaryData (const double sequenceStamp) const
 write binary data
 
virtual void display () const
 display data with grape
 
template<class OutputTupleType >
void grapeDisplay (OutputTupleType &data) const
 display data with grape
 

Protected Attributes

const GridTypegrid_
 type of this class
 

Detailed Description

template<class GridImp, class DataImp>
class Dune::Fem::DataWriter< GridImp, DataImp >

Implementation of the Dune::IOInterface. This class manages data output. Available output formats are GRAPE, VTK and VTK Vertex projected using the VtxProjection operator. Details can be found in DiscFuncIO.

Constructor & Destructor Documentation

◆ DataWriter() [1/2]

template<class GridImp , class DataImp >
Dune::Fem::DataWriter< GridImp, DataImp >::DataWriter ( const GridType grid,
OutPutDataType data,
const DataWriterParameters &  parameter = DataWriterParameters() 
)
inline

Constructor creating data writer.

Parameters
gridcorresponding grid
dataTuple containing discrete functions to write
parameterstructure for tuning the behavior of the Dune::DataWriter defaults to Dune::DataWriterParameters

◆ DataWriter() [2/2]

template<class GridImp , class DataImp >
Dune::Fem::DataWriter< GridImp, DataImp >::DataWriter ( const GridType grid,
OutPutDataType data,
const TimeProviderBase tp,
const DataWriterParameters &  parameter = DataWriterParameters() 
)
inline

Constructor creating data writer.

Parameters
gridcorresponding grid
dataTuple containing discrete functions to write
tpa time provider to set time (e.g. for restart)
parameterstructure for tuning the behavior of the Dune::DataWriter defaults to Dune::DataWriterParameters

Member Function Documentation

◆ readPath()

static std::string Dune::Fem::IOInterface::readPath ( )
inlinestaticinherited

standard path reading and creation method rank is added to output path

References Dune::Fem::Parameter::commonOutputPath().

Referenced by Dune::Fem::CheckPointer< GridImp >::restoreGrid().

◆ write() [1/3]

template<class GridImp , class DataImp >
void Dune::Fem::DataOutput< GridImp, DataImp >::write ( const std::string &  outstring) const
inlineinherited

write given data to disc, evaluates parameter savecount

Parameters
outstringpass additional string for naming

References Dune::Fem::DataOutput< GridImp, DataImp >::willWrite(), and Dune::Fem::DataOutput< GridImp, DataImp >::writeData().

◆ write() [2/3]

template<class GridImp , class DataImp >
void Dune::Fem::DataOutput< GridImp, DataImp >::write ( const TimeProviderBase tp) const
inlinevirtualinherited

write given data to disc, evaluates parameter savecount and savestep

Parameters
tptime provider for time and step

Implements Dune::Fem::IOInterface.

References Dune::Fem::DataOutput< GridImp, DataImp >::write().

◆ write() [3/3]

template<class GridImp , class DataImp >
void Dune::Fem::DataOutput< GridImp, DataImp >::write ( const TimeProviderBase tp,
const std::string &  outstring 
) const
inlineinherited

write given data to disc, evaluates parameter savecount and savestep

Parameters
tptime provider for time and step
outstringpass additional string for naming

References Dune::Fem::TimeProviderBase::time(), Dune::Fem::DataOutput< GridImp, DataImp >::willWrite(), and Dune::Fem::DataOutput< GridImp, DataImp >::writeData().

◆ writeData() [1/2]

template<class GridImp , class DataImp >
void Dune::Fem::DataOutput< GridImp, DataImp >::writeData ( double  sequenceStamp) const
inlinevirtualinherited

write data with a given sequence stamp

Parameters
sequenceStampstamp for the data set

Implements Dune::Fem::IOInterface.

References Dune::Fem::DataOutput< GridImp, DataImp >::writeData().

◆ writeData() [2/2]

template<class GridImp , class DataImp >
void Dune::Fem::DataOutput< GridImp, DataImp >::writeData ( double  sequenceStamp,
const std::string &  outstring 
) const
inlineinherited

write data with a given sequence stamp and outstring

Parameters
sequenceStampstamp for the data set
outstringpass additional string for naming

References DUNE_THROW, Dune::GeometryTypes::none(), and Dune::Fem::Parameter::verbose().

Referenced by Dune::Fem::DataOutput< GridImp, DataImp >::write(), and Dune::Fem::DataOutput< GridImp, DataImp >::writeData().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 20, 23:30, 2024)