|
IFEM 90A354
|
Template class for transient simulator drivers. More...
#include <SIMSolver.h>


Public Member Functions | |
| SIMSolver (T1 &s1) | |
| The constructor initializes the reference to the actual solver. | |
| virtual | ~SIMSolver () |
| The destructor deletes the restart data handler. | |
| virtual bool | read (const char *file) |
| Reads solver data from the specified input file. | |
| const TimeStep & | getTimePrm () const |
| Returns a const reference to the time stepping information. | |
| bool | advanceStep () |
| Advances the time step one step forward. | |
| virtual int | solveProblem (char *infile, const char *heading=nullptr) |
| Solves the problem up to the final time. | |
| void | handleDataOutput (const std::string &hdf5file, const ProcessAdm &modelAdm, int saveInterval=1, int restartInterval=0) |
| Handles application data output. | |
| virtual bool | serialize (HDF5Restart::SerializeData &data) |
| Serialize internal state for restarting purposes. | |
| virtual bool | deSerialize (const HDF5Restart::SerializeData &data) |
| Set internal state from a serialized state. | |
| int | restart (const std::string &restartFile, int restartStep) |
| Handles application restarts by reading a serialized solver state. | |
Public Member Functions inherited from SIMSolverStat< T1 > | |
| SIMSolverStat (T1 &s1, const char *head=nullptr) | |
| The constructor initializes the reference to the actual solver. | |
| virtual | ~SIMSolverStat () |
| The destructor deletes the results data exporter object. | |
| void | handleDataOutput (const std::string &hdf5file, const ProcessAdm &modelAdm, int saveInterval=1) |
| Handles application data output. | |
Public Member Functions inherited from SIMadmin | |
| virtual | ~SIMadmin () |
| Empty destructor. | |
| virtual bool | preprocess (const IntVec &ignored={}, bool fixDup=false) |
| Performs some pre-processing tasks on the FE model. | |
| virtual bool | preprocessC (const IntVec &, bool, double=0.0) |
| Performs some pre-processing tasks on the FE model. | |
| const ProcessAdm & | getProcessAdm () const |
| Returns the parallel process administrator. | |
| int | getGlobalProcessID () const |
| Returns the global process ID. | |
| const std::string & | getHeading () const |
| Returns the simulator heading. | |
| void | setHeading (const std::string &heading) |
| Defines the simulator heading. | |
| void | printHeading (int &supStep) const |
| Prints the heading of this simulator, if any, to IFEM::cout. | |
Public Member Functions inherited from XMLInputBase | |
| bool | readXML (const char *fileName, bool verbose=true) |
| Reads an XML input file. | |
| bool | loadXML (const char *xml) |
| Loads data from an XML-formatted text string. | |
Protected Member Functions | |
| virtual bool | parse (char *keyw, std::istream &is) |
| Parses a data section from an input stream. | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML element. | |
| bool | saveState (int &geoBlk, int &nBlock, bool newMesh=false, char *infile=nullptr, bool saveRes=true) |
| Saves geometry and results to VTF and HDF5 for current time step. | |
Protected Member Functions inherited from SIMSolverStat< T1 > | |
| void | printHeading (const char *heading) |
| Writes an application-specific heading, if provided. | |
Protected Member Functions inherited from SIMadmin | |
| SIMadmin (const char *heading=nullptr) | |
| The default constructor initializes the process administrator. | |
| SIMadmin (SIMadmin &anotherSIM) | |
| Copy constructor. | |
Protected Member Functions inherited from XMLInputBase | |
| const tinyxml2::XMLElement * | loadFile (tinyxml2::XMLDocument &doc, const char *fileName, bool verbose=false) |
| Loads an XML input file into a tinyxml2::XMLDocument object. | |
| virtual const char ** | getPrioritizedTags () const |
| Returns a list of prioritized XML-tags. | |
Protected Attributes | |
| bool | dumpLog |
| Set to true, to print out dump time levels. | |
| TimeStep | tp |
| Time stepping information. | |
| HDF5Restart * | restartAdm |
| Administrator for restart output. | |
| ProcessAdm * | restartProcAdm |
| Process admin used for restart output. | |
| int | startRstLevel |
| Initial time level for the restart output. | |
Protected Attributes inherited from SIMSolverStat< T1 > | |
| T1 & | S1 |
| The actual solver. | |
| DataExporter * | exporter |
| Administrator for result output to HDF5 file. | |
| int | startExpLevel |
| Initial time level for the DataExporter. | |
Protected Attributes inherited from SIMadmin | |
| ProcessAdm | adm |
| Parallel administrator. | |
| int | myPid |
| Processor ID in parallel simulations. | |
| int | nProc |
| Number of processors in parallel simulations. | |
| std::string | myHeading |
| Heading written before reading the input file. | |
Private Attributes | |
| bool | saveDivergedSol |
| If true, save also the diverged solution to VTF. | |
Additional Inherited Members | |
Public Attributes inherited from SIMadmin | |
| SIMoptions & | opt |
| Simulation control parameters. | |
Static Public Attributes inherited from SIMadmin | |
| static int | msgLevel = 2 |
| Controls the console output amount during solving. | |
Protected Types inherited from SIMadmin | |
| using | IntVec = std::vector< int > |
| Convenience alias. | |
Template class for transient simulator drivers.
This template can be instantiated over any type implementing the ISolver interface. It provides a time stepping loop and restart in addition.
|
inlinevirtual |
Set internal state from a serialized state.
| [in] | data | Container for serialized data |
References TimeStep::deSerialize(), SIMSolverStat< T1 >::S1, and SIMSolver< T1 >::tp.
Referenced by SIMSolver< T1 >::restart().
|
inline |
Handles application data output.
| [in] | hdf5file | The file to save to |
| [in] | modelAdm | Process administrator to use |
| [in] | saveInterval | The stride in the output file |
| [in] | restartInterval | The stride in the restart file |
References SIMadmin::adm, ProcessAdm::dd, ProcessAdm::getProcId(), SIMSolverStat< T1 >::handleDataOutput(), DomainDecomposition::isPartitioned(), SIMSolver< T1 >::restartAdm, SIMSolver< T1 >::restartProcAdm, and SIMSolver< T1 >::startRstLevel.
|
inlineprotectedvirtual |
Parses a data section from an input stream.
Reimplemented from SIMadmin.
References TimeStep::parse(), and SIMSolver< T1 >::tp.
Referenced by SIMSolverTS< T1 >::parse().
|
inlineprotectedvirtual |
Parses a data section from an XML element.
Reimplemented from SIMadmin.
Reimplemented in SIMSolverTS< T1 >.
References SIMSolver< T1 >::dumpLog, TimeStep::parse(), SIMSolver< T1 >::saveDivergedSol, and SIMSolver< T1 >::tp.
Reads solver data from the specified input file.
Reimplemented from SIMSolverStat< T1 >.
Reimplemented in SIMSolverTS< T1 >.
References SIMadmin::read().
|
inline |
Handles application restarts by reading a serialized solver state.
| [in] | restartFile | File to read restart state from |
| [in] | restartStep | Index of the time level to read restart state for |
References SIMadmin::adm, IFEM::cout, ProcessAdm::dd, SIMSolver< T1 >::deSerialize(), DomainDecomposition::isPartitioned(), SIMSolverStat< T1 >::S1, and SIMSolver< T1 >::startRstLevel.
|
inlinevirtual |
Serialize internal state for restarting purposes.
| data | Container for serialized data |
Reimplemented in SIMSolverTS< T1 >.
References SIMSolverStat< T1 >::S1, TimeStep::serialize(), and SIMSolver< T1 >::tp.
Referenced by SIMSolver< T1 >::saveState(), and SIMSolverTS< T1 >::serialize().
|
inlinevirtual |
Solves the problem up to the final time.
Reimplemented from SIMSolverStat< T1 >.
Reimplemented in SIMSolverTS< T1 >.
References SIMSolver< T1 >::advanceStep(), TimeStep::multiSteps(), IFEM::pollControllerFifo(), SIMSolverStat< T1 >::printHeading(), SIMSolverStat< T1 >::S1, SIMSolver< T1 >::saveDivergedSol, SIMSolver< T1 >::saveState(), and SIMSolver< T1 >::tp.