DUNE-FEM (unstable)

Implementation of the Dune::Fem::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/dataoutput.hh>

Public Types

typedef GridImp GridType
 type of grid used
 
typedef DataImp OutPutDataType
 type of data tuple
 

Public Member Functions

 DataOutput (const GridType &grid, OutPutDataType &data, std::unique_ptr< const DataOutputParameters > parameters)
 Constructor creating data output class. More...
 
 DataOutput (const GridType &grid, OutPutDataType &data, const DataOutputParameters &parameter)
 Constructor creating data output class. More...
 
 DataOutput (const GridType &grid, OutPutDataType &data, const TimeProviderBase &tp, std::unique_ptr< const DataOutputParameters > parameters)
 Constructor creating data writer. More...
 
 DataOutput (const GridType &grid, OutPutDataType &data, const TimeProviderBase &tp, const DataOutputParameters &parameter)
 Constructor creating data writer. More...
 
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...
 
virtual const char * myClassName () const
 print class name
 
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 Member Functions

virtual void writeBinaryData (const double) 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::DataOutput< GridImp, DataImp >

Implementation of the Dune::Fem::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

◆ DataOutput() [1/4]

template<class GridImp , class DataImp >
Dune::Fem::DataOutput< GridImp, DataImp >::DataOutput ( const GridType grid,
OutPutDataType data,
std::unique_ptr< const DataOutputParameters parameters 
)
inline

Constructor creating data output class.

Parameters
gridcorresponding grid
dataTuple containing discrete functions to write
parametersstructure for tuning the behavior of the Dune::DataOutput defaults to Dune::DataOutputParameters

◆ DataOutput() [2/4]

template<class GridImp , class DataImp >
Dune::Fem::DataOutput< GridImp, DataImp >::DataOutput ( const GridType grid,
OutPutDataType data,
const DataOutputParameters parameter 
)
inline

Constructor creating data output class.

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

◆ DataOutput() [3/4]

template<class GridImp , class DataImp >
Dune::Fem::DataOutput< GridImp, DataImp >::DataOutput ( const GridType grid,
OutPutDataType data,
const TimeProviderBase tp,
std::unique_ptr< const DataOutputParameters parameters 
)
inline

Constructor creating data writer.

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

◆ DataOutput() [4/4]

template<class GridImp , class DataImp >
Dune::Fem::DataOutput< GridImp, DataImp >::DataOutput ( const GridType grid,
OutPutDataType data,
const TimeProviderBase tp,
const DataOutputParameters parameter 
)
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::DataOutput defaults to Dune::DataOutputParameters

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
inline

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
inlinevirtual

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
inline

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
inlinevirtual

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
inline

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 12, 23:30, 2024)