Opm::Simulator< TypeTag > Class Template Reference Manages the initializing and running of time dependent problems. More...
Detailed Descriptiontemplate<class TypeTag> class Opm::Simulator< TypeTag > Manages the initializing and running of time dependent problems. This class instantiates the grid, the model and the problem to be simlated and runs the simulation loop. The time axis is treated as a sequence of "episodes" which are defined as time intervals for which the problem exhibits boundary conditions and source terms that do not depend on time. Constructor & Destructor Documentation◆ Simulator() [1/3]
template<class TypeTag >
◆ Simulator() [2/3]
template<class TypeTag >
◆ Simulator() [3/3]
template<class TypeTag >
References Opm::gatherStrings(), Opm::Timer::start(), and Opm::Timer::stop(). Member Function Documentation◆ deserialize()
template<class TypeTag >
template<class Restarter >
Read the time manager's state from a restart file.
Referenced by Opm::Simulator< TypeTag >::run(). ◆ endTime()
template<class TypeTag >
Returns the number of (simulated) seconds which the simulation runs. Referenced by Opm::Simulator< TypeTag >::finished(), Opm::Simulator< TypeTag >::maxTimeStepSize(), and Opm::Simulator< TypeTag >::willBeFinished(). ◆ episodeIndex()
template<class TypeTag >
Returns the index of the current episode. The first episode has the index 0. Referenced by Opm::Simulator< TypeTag >::run(). ◆ episodeIsOver()
template<class TypeTag >
Returns true if the current episode is finished at the current time. References Opm::Simulator< TypeTag >::episodeLength(), Opm::Simulator< TypeTag >::startTime(), and Opm::Simulator< TypeTag >::time(). Referenced by Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), and Opm::Simulator< TypeTag >::run(). ◆ episodeLength()
template<class TypeTag >
Returns the length of the current episode in simulated time Referenced by Opm::Simulator< TypeTag >::episodeIsOver(), Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), Opm::Simulator< TypeTag >::episodeWillBeOver(), and Opm::Simulator< TypeTag >::startNextEpisode(). ◆ episodeMaxTimeStepSize()
template<class TypeTag >
Aligns the time step size to the episode boundary if the current time step crosses the boundary of the current episode. References Opm::Simulator< TypeTag >::episodeIsOver(), Opm::Simulator< TypeTag >::episodeLength(), Opm::Simulator< TypeTag >::episodeStartTime(), Opm::Simulator< TypeTag >::startTime(), and Opm::Simulator< TypeTag >::time(). Referenced by Opm::Simulator< TypeTag >::maxTimeStepSize(). ◆ episodeStarts()
template<class TypeTag >
Returns true if the current episode has just been started at the current time. References Opm::Simulator< TypeTag >::startTime(), and Opm::Simulator< TypeTag >::time(). ◆ episodeStartTime()
template<class TypeTag >
Returns the absolute time when the current episode started Referenced by Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), and Opm::Simulator< TypeTag >::startNextEpisode(). ◆ episodeWillBeOver()
template<class TypeTag >
Returns true if the current episode will be finished after the current time step. References Opm::Simulator< TypeTag >::episodeLength(), Opm::Simulator< TypeTag >::startTime(), Opm::Simulator< TypeTag >::time(), and Opm::Simulator< TypeTag >::timeStepSize(). ◆ executionTimer() [1/2]
template<class TypeTag >
◆ executionTimer() [2/2]
template<class TypeTag >
Returns a reference to the timer object which measures the time needed to run the simulation. ◆ finished()
template<class TypeTag >
Returns true if the simulation is finished. This is the case if either setFinished(true) has been called or if the end time is reached. References Opm::Simulator< TypeTag >::endTime(), Opm::Simulator< TypeTag >::time(), and Opm::Simulator< TypeTag >::timeStepSize(). Referenced by Opm::Simulator< TypeTag >::maxTimeStepSize(), and Opm::Simulator< TypeTag >::run(). ◆ gridView()
template<class TypeTag >
Return the grid view for which the simulation is done. Referenced by Opm::Restart::deserializeBegin(), Opm::FvBaseLinearizer< TypeTag >::init(), Opm::FvBaseLinearizer< TypeTag >::linearizeAuxiliaryEquations(), Opm::TpfaLinearizer< TypeTag >::linearizeAuxiliaryEquations(), Opm::TpfaLinearizer< TypeTag >::linearizeDomain(), Opm::FvBaseLinearizer< TypeTag >::linearizeDomain(), Opm::Simulator< TypeTag >::serialize(), and Opm::Restart::serializeBegin(). ◆ humanReadableTime()
template<class TypeTag >
Given a time step size in seconds, return it in a format which is more easily parsable by humans. e.g. 874000.0 will become "10.12 days" Referenced by Opm::FvBaseProblem< TypeTag >::finalize(), and Opm::Simulator< TypeTag >::run(). ◆ linearizeTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed for linarizing the solutions. ◆ maxTimeStepSize()
template<class TypeTag >
Aligns the time step size to the episode boundary and to the end time of the simulation. References Opm::Simulator< TypeTag >::endTime(), Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), Opm::Simulator< TypeTag >::finished(), and Opm::Simulator< TypeTag >::time(). Referenced by Opm::Simulator< TypeTag >::run(). ◆ model() [1/2]
template<class TypeTag >
Return the physical model used in the simulation. Referenced by Opm::Simulator< TypeTag >::run(). ◆ model() [2/2]
template<class TypeTag >
Return the physical model used in the simulation. ◆ prePostProcessTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed for pre- and postprocessing of the solutions. ◆ problem() [1/2]
template<class TypeTag >
Return the object which specifies the pysical setup of the simulation. Referenced by Opm::Restart::deserializeBegin(), Opm::Restart::serializeBegin(), and Opm::TpfaLinearizer< TypeTag >::updateFlowsInfo(). ◆ problem() [2/2]
template<class TypeTag >
Return the object which specifies the pysical setup of the simulation. ◆ registerParameters()
template<class TypeTag >
Registers all runtime parameters used by the simulation. ◆ run()
template<class TypeTag >
Runs the simulation using a given problem class. This method makes sure that time steps sizes are aligned to episode boundaries, amongst other stuff. References Opm::Simulator< TypeTag >::deserialize(), Opm::Restart::deserializeBegin(), Opm::Restart::deserializeEnd(), Opm::Simulator< TypeTag >::episodeIndex(), Opm::Simulator< TypeTag >::episodeIsOver(), EWOMS_CATCH_PARALLEL_EXCEPTIONS_FATAL, Opm::Restart::fileName(), Opm::Simulator< TypeTag >::finished(), Opm::Simulator< TypeTag >::humanReadableTime(), Opm::Simulator< TypeTag >::maxTimeStepSize(), Opm::Simulator< TypeTag >::model(), Opm::Timer::realTimeElapsed(), Opm::Simulator< TypeTag >::serialize(), Opm::Simulator< TypeTag >::setTimeStepSize(), Opm::Timer::start(), Opm::Timer::stop(), Opm::Simulator< TypeTag >::time(), Opm::Simulator< TypeTag >::timeStepIndex(), and Opm::Simulator< TypeTag >::timeStepSize(). ◆ serialize() [1/2]
template<class TypeTag >
This method writes the complete state of the simulation to the harddisk. The file will start with the prefix returned by the name() method, has the current time of the simulation clock in it's name and uses the extension References Opm::Simulator< TypeTag >::gridView(), Opm::Simulator< TypeTag >::serialize(), Opm::Restart::serializeBegin(), and Opm::Simulator< TypeTag >::timeStepSize(). Referenced by Opm::Simulator< TypeTag >::run(), and Opm::Simulator< TypeTag >::serialize(). ◆ serialize() [2/2]
template<class TypeTag >
template<class Restarter >
Write the time manager's state to a restart file.
◆ serializeOp()
template<class TypeTag >
template<class Serializer >
◆ setEndTime()
template<class TypeTag >
Set the time of simulated seconds at which the simulation runs.
◆ setEpisodeIndex()
template<class TypeTag >
Sets the index of the current episode. Use this method with care! ◆ setEpisodeLength()
template<class TypeTag >
Sets the length in seconds of the current episode. Use this method with care! ◆ setFinished()
template<class TypeTag >
Specify whether the simulation is finished.
◆ setStartTime()
template<class TypeTag >
Set the time of the start of the simulation.
◆ setTime() [1/2]
template<class TypeTag >
Set the current simulated time, don't change the current time step index.
◆ setTime() [2/2]
template<class TypeTag >
Set the current simulated time and the time step index.
◆ setTimeStepIndex()
template<class TypeTag >
Set the current time step index to a given value.
◆ setTimeStepSize()
template<class TypeTag >
Set the current time step size to a given value. If the step size would exceed the length of the current episode, the timeStep() method will take care that the step size won't exceed the episode or the end of the simulation, though.
Referenced by Opm::Simulator< TypeTag >::run(). ◆ setupTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed to set up and initialize the simulation. ◆ solveTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed by the solver. ◆ startNextEpisode() [1/2]
template<class TypeTag >
Change the current episode of the simulation.
References Opm::Simulator< TypeTag >::episodeLength(), and Opm::Simulator< TypeTag >::episodeStartTime(). ◆ startNextEpisode() [2/2]
template<class TypeTag >
Start the next episode, but don't change the episode identifier.
◆ startTime()
template<class TypeTag >
Return the time of the start of the simulation. Referenced by Opm::Simulator< TypeTag >::episodeIsOver(), Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), Opm::Simulator< TypeTag >::episodeStarts(), and Opm::Simulator< TypeTag >::episodeWillBeOver(). ◆ time()
template<class TypeTag >
Return the number of seconds of simulated time which have elapsed since the start time. To get the time after the time integration, you have to add timeStepSize() to time(). Referenced by Opm::Simulator< TypeTag >::episodeIsOver(), Opm::Simulator< TypeTag >::episodeMaxTimeStepSize(), Opm::Simulator< TypeTag >::episodeStarts(), Opm::Simulator< TypeTag >::episodeWillBeOver(), Opm::Simulator< TypeTag >::finished(), Opm::Simulator< TypeTag >::maxTimeStepSize(), Opm::Simulator< TypeTag >::run(), Opm::Restart::serializeBegin(), and Opm::Simulator< TypeTag >::willBeFinished(). ◆ timeStepIndex()
template<class TypeTag >
Returns number of time steps which have been executed since the beginning of the simulation. Referenced by Opm::Simulator< TypeTag >::run(). ◆ timeStepSize()
template<class TypeTag >
Returns the time step length Referenced by Opm::Simulator< TypeTag >::episodeWillBeOver(), Opm::Simulator< TypeTag >::finished(), Opm::Simulator< TypeTag >::run(), and Opm::Simulator< TypeTag >::serialize(). ◆ updateTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed to the solutions of the non-linear system of equations. ◆ vanguard() [1/2]
template<class TypeTag >
Return a reference to the grid manager of simulation. ◆ vanguard() [2/2]
template<class TypeTag >
Return a reference to the grid manager of simulation. ◆ willBeFinished()
template<class TypeTag >
Returns true if the simulation is finished after the time level is incremented by the current time step size. References Opm::Simulator< TypeTag >::endTime(), and Opm::Simulator< TypeTag >::time(). ◆ writeTimer()
template<class TypeTag >
Returns a reference to the timer object which measures the time needed to write the visualization output. The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||