dune-pdelab
2.0.0
|
Policy class for the MultiStepCache. More...
#include <dune/pdelab/multistep/cache.hh>
Public Member Functions | |
virtual | ~MultiStepCachePolicy () |
any virtual base needs a virtual destructor 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... | |
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 to determine properties of the operators | |
virtual bool | isAffine (std::size_t order, Step step) const |
Whether the operator is affine. More... | |
virtual bool | isComposedAffine (Step step) const |
Whether the composed operator is affine. More... | |
virtual bool | hasPureLinearAlpha (std::size_t order, Step step) const |
Whether the operator has purely linear alpha_*() methods. 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 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... | |
Policy class for the MultiStepCache.
Step | Type used for step number. May be signed or unsigned integral. If it is unsigned, no negative step number may occur, ever. |
Time | Type used for temporal values. Should be floating-point. |
This is a virtual base class. However, in addition to being a base class it can also be used as-is, and will provide safe behaviour in this case: cache everything, but don't assume any affine behaviour and cache-items will be evicted once they are older than the number of steps given in the contructor.
|
inlinevirtual |
any virtual base needs a virtual destructor
|
inlinevirtual |
whether to cache composed jacobians (only relevant for affine operators)
Returns true
by default
|
inlinevirtual |
whether to cache jacobians (only relevant for affine operators)
Returns true
by default
|
inlinevirtual |
whether to cache residual evaluations
Returns true
by default
|
inlinevirtual |
whether to cache zero-residuals (only relevant for affine operators)
Returns true
by default
|
inlinevirtual |
determine whether a composed Jacobian can be removed
References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.
|
inlinevirtual |
determine whether a Jacobian can be removed
References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.
|
inlinevirtual |
determine whether a residual value can be removed
References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.
|
inlinevirtual |
determine whether a vector of unknowns can be removed
References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.
|
inlinevirtual |
determine whether a zero-residual can be removed
References Dune::PDELab::MultiStepCachePolicy< Step, Time >::currentStep, and Dune::PDELab::MultiStepCachePolicy< Step, Time >::stepsOfScheme.
|
inlinevirtual |
Whether a composed jacobian can be reused.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
Whether a jacobian can be reused.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
Whether a zero-residual can be reused.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
Whether the operator has purely linear alpha_*() methods.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
Whether the operator is affine.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
Whether the composed operator is affine.
Returns false
by default
Reimplemented in Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >.
|
inlinevirtual |
called after the new values for a time step have been computed
does nothing by default.
|
inlinevirtual |
method called before starting to compute a step
step | Number of the step that will be computed, i.e. when ![]() ![]() step . |
stepsOfScheme_ | Number of steps in the scheme: the oldest required value is ![]() |
endTime_ | ![]() step . |
dt_ | Time step size, i.e. ![]() |
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.
|
protected |
The number of the step set via preStep().
After preStep(), this denotes the number of the step currently being computed. After postStep(), this denotes the number of the step that has just been computed.
Referenced by Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictComposedJacobian(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictJacobian(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictResidualValue(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictUnknowns(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictZeroResidual(), Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseComposedJacobian(), Dune::PDELab::VectorWave::CachePolicy< Params, Step, Time >::canReuseJacobian(), and Dune::PDELab::MultiStepCachePolicy< Step, Time >::preStep().
|
protected |
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().
|
protected |
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().
|
protected |
The number of steps in the scheme, set by preStep().
This means to compute value , the scheme will need the next
stepsOfScheme
old values, back to (and including) .
Referenced by Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictComposedJacobian(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictJacobian(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictResidualValue(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictUnknowns(), Dune::PDELab::MultiStepCachePolicy< Step, Time >::canEvictZeroResidual(), and Dune::PDELab::MultiStepCachePolicy< Step, Time >::preStep().