|
|
| MultiStepCache (const shared_ptr< Policy > &policy_=shared_ptr< Policy >(new Policy)) |
|
shared_ptr< Policy > | getPolicy () |
|
shared_ptr< const Policy > | getPolicy () const |
|
void | setPolicy (const shared_ptr< Policy > &policy_) |
|
|
shared_ptr< const VectorV > | getResidualValue (std::size_t order, Step step) const |
| get residual value from the cache More...
|
|
void | setResidualValue (std::size_t order, Step step, const shared_ptr< const VectorV > &residualValue) |
| store a residual value in the cache More...
|
|
|
shared_ptr< const Matrix > | getJacobian (std::size_t order, Step step) |
| get a Jacobian from the cache More...
|
|
void | setJacobian (std::size_t order, Step step, const shared_ptr< const Matrix > &jacobian) |
| store a Jacobian in the cache More...
|
|
|
shared_ptr< const VectorV > | getZeroResidual (std::size_t order, Step step) const |
| get zero-residual from the cache More...
|
|
void | setZeroResidual (std::size_t order, Step step, const shared_ptr< const VectorV > &zeroResidual) |
| store a zero-residual in the cache More...
|
|
|
shared_ptr< const Matrix > | getComposedJacobian (Step step) |
| get a composed Jacobian from the cache More...
|
|
void | setComposedJacobian (Step step, const shared_ptr< const Matrix > &jacobian) |
| store a composed Jacobian in the cache More...
|
|
|
shared_ptr< const VectorU > | getUnknowns (Step step) const |
| get vector of unknowns from the cache More...
|
|
void | setUnknowns (Step step, const shared_ptr< const VectorU > &unknowns_) |
| store a vector of unknowns in the cache More...
|
|
|
void | flushAll () |
| Flush all cached values. More...
|
|
|
void | preStep (Step step, Step stepsOfScheme, Time endTime, Time dt) |
| Do some housekeeping before computing a time-step. More...
|
|
void | postStep () |
| Do some housekeeping after computing a time-step. More...
|
|
template<class VectorU, class VectorV, class Matrix, class Step = int, class Time = double>
struct Dune::PDELab::MultiStepCache< VectorU, VectorV, Matrix, Step, Time >
Cache for the CachedMultiStepGridOperatorSpace.
- Template Parameters
-
VectorU | Type of vectors for the unknowns. |
VectorV | Type of vectors for the residuals. |
Matrix | Type of the Jacobians. |
Step | Type of the step counters (should be integral). |
Time | Type of the temporal values (should be floating-point). |
The MultiStepCache caches four kinds of data:
- Residual values for a given time step and vector of unknowns:
. This is useful even for non-linear problems.
- Jacobian matrices of the local operators
. This is mostly useful for affine operators when the Jacobians can be reused.
- Zero-residuals of the local operators
. This is mostly useful for affine operators when the zero-residuals can be reused.
- Jacobian matrices of the composed system
. These are the matrices which are solved by the solver in the end. This is mostly useful for affine operators when the Jacobians can be reused.
In addition, there is one item which is store in the cache just like the cached items, but is present mostly because it is a convenient way for the user code to provide an manage that information:
- The old values of the unknown vectors
. This is not really a cache but a way for the user code to provide those values to the GridOperatorSpace.
It is always valid for the cache implementation to silently refuse to store a value (except for the vectors of unknowns). The grid operator space must never expect to be able to store a value and immediately be able to extract it again. The grid operator space must always be prepared to recompute a value that cannot be extracted from the cache, and should try to store that value in the cache afterwards.
- Note
- The cache keeps pointers to the values it stores. The user code must make sure that any value stored in the cache is not later modified, any such modification results in undefined behaviour.
template<class VectorU , class VectorV , class Matrix , class Step = int, class Time = double>