dune-fem  2.4.1-rc
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::Fem::IOInterface Class Referenceabstract

IOInterface to write data to hard disk. More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/io/file/iointerface.hh>

Inheritance diagram for Dune::Fem::IOInterface:
Inheritance graph

Classes

struct  SaveParallelCartesianGrid
 
struct  SaveParallelCartesianGrid< YaspGrid< dim, CoordCont > >
 

Public Member Functions

virtual ~IOInterface ()
 destructor More...
 
virtual void writeData (double sequenceStamp) const =0
 write data with a given sequence stamp More...
 
virtual void write (const TimeProviderBase &tp) const =0
 write given data to disc, evaluates parameter savecount and savestep More...
 
virtual void write () const =0
 write given data to disc, evaluates parameter savecount More...
 

Static Public Member Functions

static std::string defaultGridKey (int dimension, bool check=true)
 return FEM key for macro grid reading More...
 
static std::string defaultGridKey (int dimension, const ParameterReader &parameter, bool check=true)
 
static std::string defaultGridKey (std::string base, int dimension, bool check=true)
 
static std::string defaultGridKey (std::string base, int dimension, const ParameterReader &parameter, bool check=true)
 return FEM key for macro grid reading More...
 
static void createPath (const std::string &path)
 create given path in combination with rank More...
 
static std::string createPathName (const std::string &pathPref, int rank)
 create given path in combination with rank More...
 
static std::string readPath ()
 
template<class CommunicatorType >
static void createGlobalPath (const CommunicatorType &comm, const std::string &path)
 create global path for data output More...
 
static std::string copyPathToFilename (const std::string &path)
 
template<class CommunicatorType >
static std::string createPath (const CommunicatorType &comm, const std::string &pathPrefix, const std::string &dataPrefix, const int step, const bool alsoCreateRankPath=true)
 
static std::string createRecoverPath (const std::string &pathPrefix, const int rank, const std::string &dataPrefix, const int step, const bool alsoUseRankPath=true)
 
template<class GridImp >
static void writeMacroGrid (const GridImp &grid, std::ostream &out, const std::string &macroname, const std::string &path, const std::string &prefix, const bool writeSubFiles=false)
 if grid is structured grid, write macro file More...
 
template<class GridImp >
static void copyMacroGrid (const GridImp &g, const std::string &macroGrid, const std::string &orgPath, const std::string &destPath, const std::string &prefix)
 if grid is structured grid, write macro file More...
 

Protected Member Functions

 IOInterface ()
 default constructor More...
 

Static Protected Member Functions

static std::string strRank (const int rank)
 create string containing rank More...
 
template<class GridImp >
static void saveCartesianGrid (const GridImp &grid, std::ostream &out, dgf::IntervalBlock &intervalBlock, std::string filename, const bool writeSubFiles)
 write my partition as macro grid More...
 
template<int dimension>
static void writeToStream (std::ostream &file, const FieldVector< double, dimension > &origin, const FieldVector< double, dimension > &lang, const FieldVector< int, dimension > &anz)
 
template<int dimension>
static void writeStructuredGrid (const std::string &filename, std::ostream &out, const FieldVector< double, dimension > &origin, const FieldVector< double, dimension > &lang, const FieldVector< int, dimension > &anz)
 write structured grid as DGF file More...
 

Detailed Description

IOInterface to write data to hard disk.

An interface class:

Constructor & Destructor Documentation

Dune::Fem::IOInterface::IOInterface ( )
inlineprotected

default constructor

virtual Dune::Fem::IOInterface::~IOInterface ( )
inlinevirtual

destructor

References write(), and writeData().

Member Function Documentation

template<class GridImp >
static void Dune::Fem::IOInterface::copyMacroGrid ( const GridImp &  g,
const std::string &  macroGrid,
const std::string &  orgPath,
const std::string &  destPath,
const std::string &  prefix 
)
inlinestatic

if grid is structured grid, write macro file

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

static std::string Dune::Fem::IOInterface::copyPathToFilename ( const std::string &  path)
inlinestatic

Referenced by createPath(), and createRecoverPath().

template<class CommunicatorType >
static void Dune::Fem::IOInterface::createGlobalPath ( const CommunicatorType &  comm,
const std::string &  path 
)
inlinestatic

create global path for data output

References Dune::Fem::createDirectory().

Referenced by createPath(), and Dune::Fem::DataOutput< GridImp, DataImp >::init().

static void Dune::Fem::IOInterface::createPath ( const std::string &  path)
inlinestatic

create given path in combination with rank

References Dune::Fem::createDirectory().

Referenced by Dune::Fem::DataWriter< GridImp, DataImp >::writeMyBinaryData().

template<class CommunicatorType >
static std::string Dune::Fem::IOInterface::createPath ( const CommunicatorType &  comm,
const std::string &  pathPrefix,
const std::string &  dataPrefix,
const int  step,
const bool  alsoCreateRankPath = true 
)
inlinestatic
static std::string Dune::Fem::IOInterface::createPathName ( const std::string &  pathPref,
int  rank 
)
inlinestatic

create given path in combination with rank

References path.

Referenced by createPath(), and createRecoverPath().

static std::string Dune::Fem::IOInterface::createRecoverPath ( const std::string &  pathPrefix,
const int  rank,
const std::string &  dataPrefix,
const int  step,
const bool  alsoUseRankPath = true 
)
inlinestatic
static std::string Dune::Fem::IOInterface::defaultGridKey ( int  dimension,
bool  check = true 
)
inlinestatic

return FEM key for macro grid reading

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

Referenced by defaultGridKey(), and Dune::Fem::DataWriterParameters::macroGridName().

static std::string Dune::Fem::IOInterface::defaultGridKey ( int  dimension,
const ParameterReader parameter,
bool  check = true 
)
inlinestatic

References defaultGridKey().

static std::string Dune::Fem::IOInterface::defaultGridKey ( std::string  base,
int  dimension,
bool  check = true 
)
inlinestatic
static std::string Dune::Fem::IOInterface::defaultGridKey ( std::string  base,
int  dimension,
const ParameterReader parameter,
bool  check = true 
)
inlinestatic

return FEM key for macro grid reading

References Dune::Fem::BasicParameterReader< Parameter >::exists().

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

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

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

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

template<class GridImp >
static void Dune::Fem::IOInterface::saveCartesianGrid ( const GridImp &  grid,
std::ostream &  out,
dgf::IntervalBlock &  intervalBlock,
std::string  filename,
const bool  writeSubFiles 
)
inlinestaticprotected
static std::string Dune::Fem::IOInterface::strRank ( const int  rank)
inlinestaticprotected

create string containing rank

Referenced by saveCartesianGrid().

virtual void Dune::Fem::IOInterface::write ( const TimeProviderBase tp) const
pure virtual

write given data to disc, evaluates parameter savecount and savestep

Parameters
tptime provider for time and step

Implemented in Dune::Fem::DataOutput< GridImp, DataImp >.

virtual void Dune::Fem::IOInterface::write ( ) const
pure virtual

write given data to disc, evaluates parameter savecount

Implemented in Dune::Fem::DataOutput< GridImp, DataImp >.

Referenced by ~IOInterface().

virtual void Dune::Fem::IOInterface::writeData ( double  sequenceStamp) const
pure virtual

write data with a given sequence stamp

Parameters
sequenceStampstamp for the data set

Implemented in Dune::Fem::DataOutput< GridImp, DataImp >.

Referenced by ~IOInterface().

template<class GridImp >
static void Dune::Fem::IOInterface::writeMacroGrid ( const GridImp &  grid,
std::ostream &  out,
const std::string &  macroname,
const std::string &  path,
const std::string &  prefix,
const bool  writeSubFiles = false 
)
inlinestatic

if grid is structured grid, write macro file

References saveCartesianGrid().

template<int dimension>
static void Dune::Fem::IOInterface::writeStructuredGrid ( const std::string &  filename,
std::ostream &  out,
const FieldVector< double, dimension > &  origin,
const FieldVector< double, dimension > &  lang,
const FieldVector< int, dimension > &  anz 
)
inlinestaticprotected

write structured grid as DGF file

References writeToStream().

Referenced by saveCartesianGrid().

template<int dimension>
static void Dune::Fem::IOInterface::writeToStream ( std::ostream &  file,
const FieldVector< double, dimension > &  origin,
const FieldVector< double, dimension > &  lang,
const FieldVector< int, dimension > &  anz 
)
inlinestaticprotected

Referenced by writeStructuredGrid().


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