|
dune-fem 2.12-git
|
Implementation of the IOInterface. This class manages checkpointing. More...
#include <dune/fem/io/file/datawriter.hh>

Classes | |
| struct | GridPersistentObject |
| call appropriate backup and restore methods on the grid class More... | |
Public Types | |
| enum | OutputFormat { vtk = 0 , vtkvtx = 1 , subvtk = 2 , binary = 3 , gnuplot = 4 , none = 5 } |
Public Member Functions | |
| CheckPointer (const GridType &grid, const CheckPointerParameters ¶meter=CheckPointerParameters()) | |
| Constructor generating a checkpointer. | |
| CheckPointer (const GridType &grid, const TimeProviderBase &tp, const CheckPointerParameters ¶meter=CheckPointerParameters()) | |
| Constructor generating a checkpointer. | |
| virtual const char * | myClassName () const |
| print class name | |
| bool | willWrite (const TimeProviderBase &tp) const |
| returns true if data will be written on next write call | |
| virtual void | writeBinaryData (const double time) const |
| write binary data | |
| void | consistentSaveStep (const TimeProviderBase &tp) const |
| 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 | |
| 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 | |
| void | write (const TimeProviderBase &tp) const |
| write given data to disc, evaluates parameter savecount and savestep | |
| void | writeData (double sequenceStamp, const std::string &outstring) const |
| write data with a given sequence stamp and outstring | |
| void | writeData (double sequenceStamp) const |
| write data with a given sequence stamp | |
| 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 GridType * | restoreGrid (const std::string checkFile, const int givenRank=-1, const CheckPointerParameters ¶meter=CheckPointerParameters()) |
| restore grid from previous runs | |
| static void | restoreData (const GridType &grid, const std::string checkFile, const int rank=-1) |
| restores data, assumes that all objects have been created and inserted to PersistenceManager before this method is called | |
| static void | writeSingleCheckPoint (const GridType &grid, const double time, const bool storePersistenceManager, const int writeStep=0) |
| static std::string | defaultGridKey (int dimension, bool check=true) |
| return FEM key for macro grid reading | |
| static std::string | defaultGridKey (int dimension, const ParameterReader ¶meter, 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 ¶meter, bool check=true) |
| return FEM key for macro grid reading | |
| static void | createPath (const std::string &path) |
| create given path in combination with rank | |
| 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 | 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 | |
| static std::string | copyPathToFilename (const std::string &path) |
| static std::string | createRecoverPath (const std::string &pathPrefix, const int rank, const std::string &dataPrefix, const int step, const bool alsoUseRankPath=true) |
Protected Types | |
| typedef GridImp | GridType |
| used grid type | |
| typedef DofManager< GridType > | DofManagerType |
| typedef DataWriter< GridImp, DataImp > | BaseType |
| type of base class | |
| typedef CheckPointer< GridImp > | ThisType |
| type of this class | |
| typedef DataImp | OutPutDataType |
| used data tuple | |
| typedef GridPersistentObject | PersistentGridObjectType |
Protected Member Functions | |
| void | initialize (const CheckPointerParameters ¶meter) |
| CheckPointer (const GridType &grid, const int myRank, const char *checkFile, const bool takeCareOfPersistenceManager=true, const int writeStep=0) | |
| Constructor generating a checkpointer to restore data. | |
| std::string | restorePersistentData () |
| restores data, assumes that all objects have been created before this method is called | |
| template<class InputTuple > | |
| void | restoreUserData (InputTuple &data) |
| void | restoreData () |
| bool | readCheckPoint (const bool warn=true) |
| read checkpoint file | |
| void | writeCheckPoint (const std::string &path, const double time, const int savestep) const |
| std::string | writeMyBinaryData (const double sequenceStamp, const int step, OutputTuple &data) const |
| auto | getGridPart () const |
| auto | getGridPart (std::integral_constant< bool, false >) const |
| auto | getGridPart (std::integral_constant< bool, true >) const |
| std::string | writeGnuPlotOutput () const |
| virtual void | display () const |
| display data with grape | |
| template<class OutputTupleType > | |
| void | grapeDisplay (OutputTupleType &data) const |
| display data with grape | |
Protected Attributes | |
| OutPutDataType | fakeData_ |
| std::unique_ptr< PersistentGridObjectType > | persistentGridObject_ |
| OutPutDataType * | dataPtr_ |
| const int | checkPointStep_ |
| const int | maxCheckPointNumber_ |
| int | myRank_ |
| std::string | checkPointFile_ |
| bool | takeCareOfPersistenceManager_ |
| std::stringstream | macroGrid_ |
| const bool | separateRankPath_ |
| const GridType & | grid_ |
| type of this class | |
| OutPutDataType | data_ |
| std::string | path_ |
| std::string | datapref_ |
| bool | grapeDisplay_ |
| int | writeStep_ |
| int | writeCalls_ |
| double | saveTime_ |
| double | saveStep_ |
| int | saveCount_ |
| OutputFormat | outputFormat_ |
| bool | conformingOutput_ |
| std::unique_ptr< FileWriter > | sequence_ |
| std::unique_ptr< PVDWriter > | pvd_ |
| std::unique_ptr< const DataOutputParameters > | param_ |
Detailed Description
class Dune::Fem::CheckPointer< GridImp >
Implementation of the IOInterface. This class manages checkpointing.
All data that was registered to PersistenceManager will be stored in binary output format. The derivation from DataWriter is simply to use the writeStep method. The binary output of DataWriter is not used anymore and does not work for checkpointing.
Member Typedef Documentation
◆ BaseType
|
protected |
type of base class
◆ DofManagerType
|
protected |
◆ GridType
|
protected |
used grid type
◆ OutPutDataType
|
protected |
used data tuple
◆ PersistentGridObjectType
|
protected |
◆ ThisType
|
protected |
type of this class
Member Enumeration Documentation
◆ OutputFormat
|
inherited |
Constructor & Destructor Documentation
◆ CheckPointer() [1/3]
|
inline |
Constructor generating a checkpointer.
- Parameters
-
grid corresponding grid parameter structure for tuning the behavior of the Dune::CheckPointer defaults to Dune::CheckPointerParameters
◆ CheckPointer() [2/3]
|
inline |
Constructor generating a checkpointer.
- Parameters
-
grid corresponding grid data Tuple containing discrete functions to write tp a time provider to set time (e.g. for restart) parameter structure for tuning the behavior of the Dune::CheckPointer defaults to Dune::CheckPointerParameters
◆ CheckPointer() [3/3]
|
inlineprotected |
Constructor generating a checkpointer to restore data.
- Parameters
-
grid corresponding grid myRank rank of process data Tuple containing discrete functions to write checkFile filename for restoring state of program from previous runs takeCareOfPersistenceManager flag whether to keep persistent values by PersistenceManager (default true) writeStep initial counter value, default 0
- Note
- In Addition to the parameters read by the DataWriter this class reads the following parameters:
write checkpoint every ‘CheckPointStep’ time step
fem.io.checkpointstep: 500
store checkpoint information to file ‘CheckPointFile’
fem.io.checkpointfile: checkpoint
Member Function Documentation
◆ consistentSaveStep()
|
inlineinherited |
◆ copyPathToFilename()
|
inlinestaticinherited |
◆ createGlobalPath()
|
inlinestaticinherited |
create global path for data output
◆ createPath() [1/2]
|
inlinestaticinherited |
◆ createPath() [2/2]
|
inlinestaticinherited |
create given path in combination with rank
◆ createPathName()
|
inlinestaticinherited |
create given path in combination with rank
◆ createRecoverPath()
|
inlinestaticinherited |
◆ defaultGridKey() [1/4]
|
inlinestaticinherited |
return FEM key for macro grid reading
◆ defaultGridKey() [2/4]
|
inlinestaticinherited |
◆ defaultGridKey() [3/4]
|
inlinestaticinherited |
◆ defaultGridKey() [4/4]
|
inlinestaticinherited |
return FEM key for macro grid reading
◆ display()
|
inlineprotectedvirtualinherited |
display data with grape
◆ getGridPart() [1/3]
|
inlineprotectedinherited |
◆ getGridPart() [2/3]
|
inlineprotectedinherited |
◆ getGridPart() [3/3]
|
inlineprotectedinherited |
◆ grapeDisplay()
|
inlineprotectedinherited |
display data with grape
◆ initialize()
|
inlineprotected |
◆ myClassName()
|
inlinevirtual |
print class name
Reimplemented from Dune::Fem::DataWriter< GridImp, std::tuple<> >.
◆ path()
|
inlineinherited |
return output path name
◆ readCheckPoint()
|
inlineprotected |
read checkpoint file
◆ readPath()
|
inlinestaticinherited |
standard path reading and creation method rank is added to output path
◆ restoreData() [1/2]
|
inlineprotected |
◆ restoreData() [2/2]
|
inlinestatic |
restores data, assumes that all objects have been created and inserted to PersistenceManager before this method is called
- Parameters
-
grid Grid the data belong to checkFile check point file
◆ restoreGrid()
|
inlinestatic |
restore grid from previous runs
- Parameters
-
[in] checkFile checkPoint filename [in] givenRank number of my process (defaults to MPIManager :: rank() ) [in] parameter Parameterclass which provides informations about the checkpoint
- Returns
- Pointer to restored grid instance
◆ restorePersistentData()
|
inlineprotected |
restores data, assumes that all objects have been created before this method is called
◆ restoreUserData()
|
inlineprotected |
◆ saveTime()
|
inlineinherited |
return save time
◆ willWrite() [1/2]
|
inlinevirtualinherited |
returns true if data will be written on next write call
◆ willWrite() [2/2]
|
inlinevirtual |
returns true if data will be written on next write call
Reimplemented from Dune::Fem::DataOutput< GridImp, DataImp >.
◆ write() [1/4]
|
inlinevirtualinherited |
write given data to disc, evaluates parameter savecount
Implements Dune::Fem::IOInterface.
◆ write() [2/4]
|
inlineinherited |
write given data to disc, evaluates parameter savecount
- Parameters
-
outstring pass additional string for naming
◆ write() [3/4]
|
inlinevirtualinherited |
write given data to disc, evaluates parameter savecount and savestep
- Parameters
-
tp time provider for time and step
Implements Dune::Fem::IOInterface.
◆ write() [4/4]
|
inlineinherited |
write given data to disc, evaluates parameter savecount and savestep
- Parameters
-
tp time provider for time and step outstring pass additional string for naming
◆ writeBinaryData()
|
inlinevirtual |
write binary data
Reimplemented from Dune::Fem::DataWriter< GridImp, std::tuple<> >.
◆ writeCalls()
|
inlineinherited |
return write calls
◆ writeCheckPoint()
|
inlineprotected |
◆ writeData() [1/2]
|
inlinevirtualinherited |
write data with a given sequence stamp
- Parameters
-
sequenceStamp stamp for the data set
Implements Dune::Fem::IOInterface.
◆ writeData() [2/2]
|
inlineinherited |
write data with a given sequence stamp and outstring
- Parameters
-
sequenceStamp stamp for the data set outstring pass additional string for naming
◆ writeGnuPlotOutput()
|
inlineprotectedinherited |
◆ writeMyBinaryData()
|
inlineprotectedinherited |
◆ writeSingleCheckPoint()
|
inlinestatic |
◆ writeStep()
|
inlineinherited |
return write step
Member Data Documentation
◆ checkPointFile_
|
protected |
◆ checkPointStep_
|
protected |
◆ conformingOutput_
|
protectedinherited |
◆ data_
|
protectedinherited |
◆ datapref_
|
protectedinherited |
◆ dataPtr_
|
protected |
◆ fakeData_
|
protected |
◆ grapeDisplay_
|
protectedinherited |
◆ grid_
|
protectedinherited |
type of this class
◆ macroGrid_
|
mutableprotectedinherited |
◆ maxCheckPointNumber_
|
protected |
◆ myRank_
|
protected |
◆ outputFormat_
|
protectedinherited |
◆ param_
|
protectedinherited |
◆ path_
|
protectedinherited |
◆ persistentGridObject_
|
protected |
◆ pvd_
|
protectedinherited |
◆ saveCount_
|
protectedinherited |
◆ saveStep_
|
protectedinherited |
◆ saveTime_
|
mutableprotectedinherited |
◆ separateRankPath_
|
protectedinherited |
◆ sequence_
|
protectedinherited |
◆ takeCareOfPersistenceManager_
|
protected |
◆ writeCalls_
|
mutableprotectedinherited |
◆ writeStep_
|
mutableprotectedinherited |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8