dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::GridTimeProvider< Grid > Class Template Reference

the same functionality as the Dune::TimeProvider. More...

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

Inheritance diagram for Dune::Fem::GridTimeProvider< Grid >:
Inheritance graph

Public Types

typedef Grid::Traits::CollectiveCommunication CollectiveCommunicationType
 

Public Member Functions

 GridTimeProvider (const Grid &grid)
 
 GridTimeProvider (const double startTime, const Grid &grid)
 
 GridTimeProvider (const double startTime, const double cfl, const Grid &grid)
 
virtual ~GridTimeProvider ()
 
void init ()
 init dt with time step estimate More...
 
void init (const double timeStep)
 init dt with provided time step More...
 
void next ()
 goto next time step More...
 
void next (const double timeStep)
 goto next time step More...
 
double factor () const
 return the global factor number More...
 
void restore (const double time, const int timeStep)
 restore time and timestep from outside (i.e. from former calculation) More...
 
virtual void restore ()
 restore persistent object More...
 
virtual void backup () const
 backup persistent object More...
 
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 initTimeStep (const double dtEstimate)
 
double getCflFactor () const
 
int getUpdateStep () const
 
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

const DofManagerTypedm_
 
int sequence_
 
const CollectiveCommunicationTypecomm_
 
const double cfl_
 
const int updateStep_
 
int counter_
 
double time_
 
int timeStep_
 
double dt_
 
double invdt_
 
bool valid_
 
bool dtEstimateValid_
 
double dtEstimate_
 
double dtUpperBound_
 
ParameterReader parameter_
 

Detailed Description

template<class Grid>
class Dune::Fem::GridTimeProvider< Grid >

the same functionality as the Dune::TimeProvider.

This implementation of a timeprovider takes the CollectiveCommunicate from a Dune::Grid instance.

Member Typedef Documentation

template<class Grid >
typedef Grid::Traits::CollectiveCommunication Dune::Fem::GridTimeProvider< Grid >::CollectiveCommunicationType

Constructor & Destructor Documentation

template<class Grid >
Dune::Fem::GridTimeProvider< Grid >::GridTimeProvider ( const Grid &  grid)
inlineexplicit
template<class Grid >
Dune::Fem::GridTimeProvider< Grid >::GridTimeProvider ( const double  startTime,
const Grid &  grid 
)
inline
template<class Grid >
Dune::Fem::GridTimeProvider< Grid >::GridTimeProvider ( const double  startTime,
const double  cfl,
const Grid &  grid 
)
inline
template<class Grid >
virtual Dune::Fem::GridTimeProvider< Grid >::~GridTimeProvider ( )
inlinevirtual

Member Function Documentation

void Dune::Fem::TimeProviderBase::advance ( )
inlineprotectedinherited
virtual void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::backup ( ) const
inlinevirtualinherited

backup persistent object

Reimplemented from Dune::Fem::TimeProviderBase.

References Dune::Fem::PersistentObject::backup().

double Dune::Fem::TimeProviderBase::deltaT ( ) const
inlineinherited

obtain the size of the current time step

Returns
the size of the current time step

References Dune::Fem::TimeProviderBase::dt_, and Dune::Fem::TimeProviderBase::timeStepValid().

Referenced by Dune::Fem::TimeProviderBase::advance().

double Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::factor ( ) const
inlineinherited

return the global factor number

Returns
time step factor
double Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::getCflFactor ( ) const
inlineprotectedinherited
int Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::getUpdateStep ( ) const
inlineprotectedinherited
void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::init ( )
inlineinherited

init dt with time step estimate

References Dune::Fem::TimeProviderBase::dtEstimate_.

void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::init ( const double  timeStep)
inlineinherited

init dt with provided time step

Parameters
[in]timeStepvalue of the first time step (is multiplied with factor)
template<class Grid >
void Dune::Fem::GridTimeProvider< Grid >::initTimeStep ( const double  dtEstimate)
inlineprotected
void Dune::Fem::TimeProviderBase::initTimeStepEstimate ( )
inlineprotectedinherited
virtual void Dune::Fem::PersistentObject::insertSubData ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProviderBase::invalidateTimeStep ( )
inlineinherited

count current time step a not valid

References Dune::Fem::TimeProviderBase::valid_.

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

obtain the size of the inverse of the current time step

Returns
the size of the inverse of the current time step

References Dune::Fem::TimeProviderBase::invdt_, and Dune::Fem::TimeProviderBase::timeStepValid().

void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::next ( )
inlineinherited

goto next time step

Sets the size of the next time step to the current time step estimate and sets the estimate to infinity.

References Dune::Fem::TimeProviderBase::advance(), Dune::Fem::TimeProviderBase::dtEstimate_, and Dune::Fem::TimeProviderBase::dtEstimateValid_.

void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::next ( const double  timeStep)
inlineinherited

goto next time step

Sets the size of the next time step to the provided time step value and sets the estimate to infinity.

Parameters
[in]timeStepvalue of the next time step (is multiplied with factor)

References Dune::Fem::TimeProviderBase::advance().

virtual void* Dune::Fem::PersistentObject::pointer ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProviderBase::provideTimeStepEstimate ( const double  dtEstimate)
inlineinherited

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

Parameters
[in]dtEstimatetime step size estimate

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

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

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

Parameters
[in]upperBoundtime step size estimate

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

virtual void Dune::Fem::PersistentObject::removeSubData ( )
inlineprotectedvirtualinherited
void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore ( const double  time,
const int  timeStep 
)
inlineinherited

restore time and timestep from outside (i.e. from former calculation)

Parameters
[in]timenew time
[in]timeStepnew time step counter

References Dune::Fem::TimeProviderBase::time(), Dune::Fem::TimeProviderBase::time_, Dune::Fem::TimeProviderBase::timeStep(), and Dune::Fem::TimeProviderBase::timeStep_.

virtual void Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::restore ( )
inlinevirtualinherited

restore persistent object

Reimplemented from Dune::Fem::TimeProviderBase.

References Dune::Fem::PersistentObject::restore().

double Dune::Fem::TimeProviderBase::time ( ) const
inlineinherited
int Dune::Fem::TimeProviderBase::timeStep ( ) const
inlineinherited
double Dune::Fem::TimeProviderBase::timeStepEstimate ( ) const
inlineinherited

obtain current estimate on time step

Returns
the current estimate for the time step

References Dune::Fem::TimeProviderBase::dtEstimate_.

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

Member Data Documentation

const double Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::cfl_
protectedinherited
const CollectiveCommunicationType& Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::comm_
protectedinherited
int Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::counter_
protectedinherited
template<class Grid >
const DofManagerType& Dune::Fem::GridTimeProvider< Grid >::dm_
protected
double Dune::Fem::TimeProviderBase::dt_
protectedinherited
double Dune::Fem::TimeProviderBase::dtEstimate_
protectedinherited
bool Dune::Fem::TimeProviderBase::dtEstimateValid_
protectedinherited
double Dune::Fem::TimeProviderBase::dtUpperBound_
protectedinherited
double Dune::Fem::TimeProviderBase::invdt_
protectedinherited
ParameterReader Dune::Fem::TimeProviderBase::parameter_
protectedinherited
template<class Grid >
int Dune::Fem::GridTimeProvider< Grid >::sequence_
protected
double Dune::Fem::TimeProviderBase::time_
protectedinherited
int Dune::Fem::TimeProviderBase::timeStep_
protectedinherited
const int Dune::Fem::TimeProvider< Grid::Traits::CollectiveCommunication >::updateStep_
protectedinherited
bool Dune::Fem::TimeProviderBase::valid_
protectedinherited

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