dune-pdelab  2.0.0
Public Member Functions | Protected Attributes | List of all members
Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time > Class Template Reference

MultiStepCachePolicy for VectorWave operators. More...

#include <dune/pdelab/localoperator/vectorwave.hh>

Inheritance diagram for Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >:
Inheritance graph

Public Member Functions

 CachePolicy (const Params &params_)
 construct a CachePolicy object More...
 
virtual bool isAffine (std::size_t order, Step step) const
 All component operators are affine. More...
 
virtual bool isComposedAffine (Step step) const
 The composed operator is affine. More...
 
virtual bool hasPureLinearAlpha (std::size_t order, Step step) const
 All local operators have pure linear alpha_*() More...
 
virtual bool canReuseJacobian (std::size_t order, Step requested, Step available) const
 Whether a jacobian can be reused. More...
 
virtual bool canReuseZeroResidual (std::size_t order, Step requested, Step available) const
 Whether a zero-residual can be reused. More...
 
virtual bool canReuseComposedJacobian (Step requested, Step available) const
 Whether a composed jacobian can be reused. More...
 
methods to determine what to cache
virtual bool cacheResidualValue (std::size_t order, Step step) const
 whether to cache residual evaluations More...
 
virtual bool cacheJacobian (std::size_t order, Step step) const
 whether to cache jacobians (only relevant for affine operators) More...
 
virtual bool cacheZeroResidual (std::size_t order, Step step) const
 whether to cache zero-residuals (only relevant for affine operators) More...
 
virtual bool cacheComposedJacobian (Step step) const
 whether to cache composed jacobians (only relevant for affine operators) More...
 
methods for pre-/post-processing
virtual void preStep (Step step, Step stepsOfScheme_, Time endTime_, Time dt_)
 method called before starting to compute a step More...
 
virtual void postStep ()
 called after the new values for a time step have been computed More...
 
methods to determine stale items
virtual bool canEvictResidualValue (std::size_t order, Step step) const
 determine whether a residual value can be removed More...
 
virtual bool canEvictJacobian (std::size_t order, Step step) const
 determine whether a Jacobian can be removed More...
 
virtual bool canEvictZeroResidual (std::size_t order, Step step) const
 determine whether a zero-residual can be removed More...
 
virtual bool canEvictUnknowns (Step step) const
 determine whether a vector of unknowns can be removed More...
 
virtual bool canEvictComposedJacobian (Step step) const
 determine whether a composed Jacobian can be removed More...
 

Protected Attributes

Step stepsOfScheme
 The number of steps in the scheme, set by preStep(). More...
 
Step currentStep
 The number of the step set via preStep(). More...
 
Time endTime
 The end-time of the step set via preStep(). More...
 
Time dt
 Time step size. More...
 

Detailed Description

template<class Params, class Step = int, class Time = double>
class Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >

MultiStepCachePolicy for VectorWave operators.

Constructor & Destructor Documentation

template<class Params , class Step = int, class Time = double>
Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::CachePolicy ( const Params &  params_)
inline

construct a CachePolicy object

Member Function Documentation

template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::cacheComposedJacobian ( Step  step) const
inlinevirtualinherited

whether to cache composed jacobians (only relevant for affine operators)

Returns true by default

template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::cacheJacobian ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited

whether to cache jacobians (only relevant for affine operators)

Returns true by default

template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::cacheResidualValue ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited

whether to cache residual evaluations

Returns true by default

template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::cacheZeroResidual ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited

whether to cache zero-residuals (only relevant for affine operators)

Returns true by default

template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictComposedJacobian ( Step  step) const
inlinevirtualinherited
template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictJacobian ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited
template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictResidualValue ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited
template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictUnknowns ( Step  step) const
inlinevirtualinherited
template<class Step = int, class Time = double>
virtual bool Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictZeroResidual ( std::size_t  order,
Step  step 
) const
inlinevirtualinherited
template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseComposedJacobian ( Step  requested,
Step  available 
) const
inlinevirtual
template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseJacobian ( std::size_t  order,
Step  requested,
Step  available 
) const
inlinevirtual
template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseZeroResidual ( std::size_t  order,
Step  requested,
Step  available 
) const
inlinevirtual

Whether a zero-residual can be reused.

Returns false by default

Reimplemented from Dune::PDELab::MultiStepCachePolicy< Step, Time >.

template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::hasPureLinearAlpha ( std::size_t  order,
Step  step 
) const
inlinevirtual

All local operators have pure linear alpha_*()

Reimplemented from Dune::PDELab::MultiStepCachePolicy< Step, Time >.

template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::isAffine ( std::size_t  order,
Step  step 
) const
inlinevirtual

All component operators are affine.

Reimplemented from Dune::PDELab::MultiStepCachePolicy< Step, Time >.

template<class Params , class Step = int, class Time = double>
virtual bool Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::isComposedAffine ( Step  step) const
inlinevirtual

The composed operator is affine.

Reimplemented from Dune::PDELab::MultiStepCachePolicy< Step, Time >.

template<class Step = int, class Time = double>
virtual void Dune::PDELab::MultiStepCachePolicy< Step, Time >::postStep ( )
inlinevirtualinherited

called after the new values for a time step have been computed

does nothing by default.

template<class Step = int, class Time = double>
virtual void Dune::PDELab::MultiStepCachePolicy< Step, Time >::preStep ( Step  step,
Step  stepsOfScheme_,
Time  endTime_,
Time  dt_ 
)
inlinevirtualinherited

method called before starting to compute a step

Parameters
stepNumber of the step that will be computed, i.e. when $u_n$ is computed, then $n=$step.
stepsOfScheme_Number of steps in the scheme: the oldest required value is $u_{\text{\tt step}-\text{\tt stepsOfScheme}}$.
endTime_$t_n$, the time at step step.
dt_Time step size, i.e. $t_n-t_{n-1}$.

The default implementation saves the parameters step, stepsOfScheme_, endTime_ and dt_ in the protected member variables currentStep, stepsOfScheme, endTime and dt, respectively.

References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, Dune::PDELab::MultiStepCachePolicy< Step, Time >::dt, Dune::PDELab::MultiStepCachePolicy< Step, Time >::endTime, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.

Member Data Documentation

template<class Step = int, class Time = double>
Step Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep
protectedinherited
template<class Step = int, class Time = double>
Time Dune::PDELab::MultiStepCachePolicy< Step, Time >::dt
protectedinherited

Time step size.

After preStep(), this denotes the size of the step currently being computed. After postStep(), this denotes the size of the step that has just been computed.

Referenced by Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseComposedJacobian(), Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseJacobian(), and Dune::PDELab::MultiStepCachePolicy< Step, Time >::preStep().

template<class Step = int, class Time = double>
Time Dune::PDELab::MultiStepCachePolicy< Step, Time >::endTime
protectedinherited

The end-time of the step set via preStep().

After preStep(), this denotes the end-time of the step currently being computed. After postStep(), this denotes the end-time of the step that has just been computed.

Referenced by Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseComposedJacobian(), Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseJacobian(), and Dune::PDELab::MultiStepCachePolicy< Step, Time >::preStep().

template<class Step = int, class Time = double>
Step Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme
protectedinherited

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