dune-fem
2.4.1-rc
|
general base for time providers More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/solver/timeprovider.hh>
Public Member Functions | |
TimeProviderBase (const ParameterReader ¶meter=Parameter::container()) | |
TimeProviderBase (const double startTime, const ParameterReader ¶meter=Parameter::container()) | |
virtual | ~TimeProviderBase () |
void | backup () const |
backup persistent object More... | |
void | restore () |
restore persistent object More... | |
TimeProviderBase (const ThisType &)=delete | |
ThisType & | operator= (const ThisType &)=delete |
double | time () const |
obtain the current time More... | |
int | timeStep () const |
obtain number of the current time step More... | |
double | deltaT () const |
obtain the size of the current time step More... | |
double | inverseDeltaT () const |
obtain the size of the inverse of the current time step More... | |
double | timeStepEstimate () const |
obtain current estimate on time step More... | |
void | provideTimeStepEstimate (const double dtEstimate) |
set time step estimate to minimum of given value and internal time step estiamte More... | |
void | provideTimeStepUpperBound (const double upperBound) |
set upper bound for time step to minimum of given value and internal bound More... | |
void | invalidateTimeStep () |
count current time step a not valid More... | |
bool | timeStepValid () const |
return if this time step should be used More... | |
Protected Member Functions | |
void | advance () |
void | initTimeStepEstimate () |
virtual void | insertSubData () |
insert possible sub data of object More... | |
virtual void | removeSubData () |
remove possible sub data of object More... | |
virtual void * | pointer () |
Protected Attributes | |
double | time_ |
int | timeStep_ |
double | dt_ |
double | invdt_ |
bool | valid_ |
bool | dtEstimateValid_ |
double | dtEstimate_ |
double | dtUpperBound_ |
ParameterReader | parameter_ |
general base for time providers
This class consists of the methods required for example in the ODE Solvers, e.g., provideTimeStepEstimate and provideTimeStepUpperBound. InvalidateTimeStep can be used to mark this time step as invalid. Furthermore, method for accessing the simulation time, the time step counter and the time step size are provided.
The derived class TimeProvider provides the additional method required for implementing a time loop.
|
inline |
References initTimeStepEstimate().
Referenced by restore().
|
inlineexplicit |
References initTimeStepEstimate().
|
inlinevirtual |
|
delete |
|
inlineprotected |
|
inlinevirtual |
backup persistent object
Implements Dune::Fem::PersistentObject.
Reimplemented in Dune::Fem::TimeProvider< CollectiveCommunication >, and Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >.
References Dune::Fem::PersistenceManager::backupValue(), dt_, dtEstimate_, time_, timeStep_, and valid_.
|
inline |
obtain the size of the current time step
References dt_, and timeStepValid().
Referenced by advance().
|
inlineprotected |
|
inlineprotectedvirtualinherited |
insert possible sub data of object
Reimplemented in Dune::Fem::DiscreteFunctionDefault< Impl >, Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >, Dune::Fem::DiscreteFunctionDefault< VectorDiscreteFunction< DiscreteFunctionSpace, Vector > >, Dune::Fem::DiscreteFunctionDefault< BlockVectorDiscreteFunction< DiscreteFunctionSpace, BlockVector > >, Dune::Fem::DiscreteFunctionDefault< ISTLBlockVectorDiscreteFunction< DiscreteFunctionSpace, Block > >, and Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >.
Referenced by Dune::Fem::PersistenceManager::insertObject().
|
inline |
count current time step a not valid
References valid_.
|
inline |
obtain the size of the inverse of the current time step
References invdt_, and timeStepValid().
|
inlineprotectedvirtualinherited |
Reimplemented in Dune::Fem::PersistenceManager::WrapObject< ObjectType, false >.
|
inline |
set time step estimate to minimum of given value and internal time step estiamte
[in] | dtEstimate | time step size estimate |
References dtEstimate_, dtEstimateValid_, and Dune::Std::min().
|
inline |
set upper bound for time step to minimum of given value and internal bound
[in] | upperBound | time step size estimate |
References dtEstimateValid_, dtUpperBound_, and Dune::Std::min().
|
inlineprotectedvirtualinherited |
remove possible sub data of object
Reimplemented in Dune::Fem::DiscreteFunctionDefault< Impl >, Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >, Dune::Fem::DiscreteFunctionDefault< VectorDiscreteFunction< DiscreteFunctionSpace, Vector > >, Dune::Fem::DiscreteFunctionDefault< BlockVectorDiscreteFunction< DiscreteFunctionSpace, BlockVector > >, Dune::Fem::DiscreteFunctionDefault< ISTLBlockVectorDiscreteFunction< DiscreteFunctionSpace, Block > >, and Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >.
Referenced by Dune::Fem::PersistenceManager::removeObject().
|
inlinevirtual |
restore persistent object
Implements Dune::Fem::PersistentObject.
Reimplemented in Dune::Fem::TimeProvider< CollectiveCommunication >, and Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >.
References dt_, dtEstimate_, dtEstimateValid_, invdt_, operator=(), Dune::Fem::PersistenceManager::restoreValue(), time_, TimeProviderBase(), timeStep_, and valid_.
|
inline |
obtain the current time
References time_.
Referenced by Dune::Fem::DataOutput< GridImp, DataImp >::consistentSaveStep(), Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore(), Dune::Fem::DataOutput< GridImp, DataImp >::willWrite(), and Dune::Fem::DataOutput< GridImp, DataImp >::write().
|
inline |
obtain number of the current time step
References timeStep_, and timeStepValid().
Referenced by Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore(), and Dune::Fem::CheckPointer< GridImp, DataImp >::willWrite().
|
inline |
obtain current estimate on time step
References dtEstimate_.
|
inline |
return if this time step should be used
References valid_.
Referenced by advance(), deltaT(), inverseDeltaT(), Dune::Fem::FixedStepTimeProvider< CollectiveCommunication >::next(), and timeStep().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by backup(), restore(), Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore(), and time().
|
protected |
|
protected |