dune-fem  2.4.1-rc
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::TimeProviderBase Class Reference

general base for time providers More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/solver/timeprovider.hh>

Inheritance diagram for Dune::Fem::TimeProviderBase:
Inheritance graph

Public Member Functions

 TimeProviderBase (const ParameterReader &parameter=Parameter::container())
 
 TimeProviderBase (const double startTime, const ParameterReader &parameter=Parameter::container())
 
virtual ~TimeProviderBase ()
 
void backup () const
 backup persistent object More...
 
void restore ()
 restore persistent object More...
 
 TimeProviderBase (const ThisType &)=delete
 
ThisTypeoperator= (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_
 

Detailed Description

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.

Constructor & Destructor Documentation

Dune::Fem::TimeProviderBase::TimeProviderBase ( const ParameterReader parameter = Parameter::container())
inline

References initTimeStepEstimate().

Referenced by restore().

Dune::Fem::TimeProviderBase::TimeProviderBase ( const double  startTime,
const ParameterReader parameter = Parameter::container() 
)
inlineexplicit
virtual Dune::Fem::TimeProviderBase::~TimeProviderBase ( )
inlinevirtual
Dune::Fem::TimeProviderBase::TimeProviderBase ( const ThisType )
delete

Member Function Documentation

void Dune::Fem::TimeProviderBase::advance ( )
inlineprotected
void Dune::Fem::TimeProviderBase::backup ( ) const
inlinevirtual
double Dune::Fem::TimeProviderBase::deltaT ( ) const
inline

obtain the size of the current time step

Returns
the size of the current time step

References dt_, and timeStepValid().

Referenced by advance().

void Dune::Fem::TimeProviderBase::initTimeStepEstimate ( )
inlineprotected
virtual void Dune::Fem::PersistentObject::insertSubData ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProviderBase::invalidateTimeStep ( )
inline

count current time step a not valid

References valid_.

double Dune::Fem::TimeProviderBase::inverseDeltaT ( ) const
inline

obtain the size of the inverse of the current time step

Returns
the size of the inverse of the current time step

References invdt_, and timeStepValid().

ThisType& Dune::Fem::TimeProviderBase::operator= ( const ThisType )
delete
virtual void* Dune::Fem::PersistentObject::pointer ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProviderBase::provideTimeStepEstimate ( const double  dtEstimate)
inline

set time step estimate to minimum of given value and internal time step estiamte

Parameters
[in]dtEstimatetime step size estimate

References dtEstimate_, dtEstimateValid_, and Dune::Std::min().

void Dune::Fem::TimeProviderBase::provideTimeStepUpperBound ( const double  upperBound)
inline

set upper bound for time step to minimum of given value and internal bound

Parameters
[in]upperBoundtime step size estimate

References dtEstimateValid_, dtUpperBound_, and Dune::Std::min().

virtual void Dune::Fem::PersistentObject::removeSubData ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProviderBase::restore ( )
inlinevirtual
double Dune::Fem::TimeProviderBase::time ( ) const
inline
int Dune::Fem::TimeProviderBase::timeStep ( ) const
inline

obtain number of the current time step

Returns
the current time step counter

References timeStep_, and timeStepValid().

Referenced by Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore(), and Dune::Fem::CheckPointer< GridImp, DataImp >::willWrite().

double Dune::Fem::TimeProviderBase::timeStepEstimate ( ) const
inline

obtain current estimate on time step

Returns
the current estimate for the time step

References dtEstimate_.

bool Dune::Fem::TimeProviderBase::timeStepValid ( ) const
inline

return if this time step should be used

References valid_.

Referenced by advance(), deltaT(), inverseDeltaT(), Dune::Fem::FixedStepTimeProvider< CollectiveCommunication >::next(), and timeStep().

Member Data Documentation

double Dune::Fem::TimeProviderBase::dt_
protected
double Dune::Fem::TimeProviderBase::dtEstimate_
protected
bool Dune::Fem::TimeProviderBase::dtEstimateValid_
protected
double Dune::Fem::TimeProviderBase::dtUpperBound_
protected
double Dune::Fem::TimeProviderBase::invdt_
protected
ParameterReader Dune::Fem::TimeProviderBase::parameter_
protected
double Dune::Fem::TimeProviderBase::time_
protected
int Dune::Fem::TimeProviderBase::timeStep_
protected
bool Dune::Fem::TimeProviderBase::valid_
protected

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