pymor.reductors.dwr
¶
Module Contents¶
- class pymor.reductors.dwr.CorrectedOutputFunctional(output_functional, dual_models, dual_projected_primal_residuals)[source]¶
Bases:
pymor.operators.interface.Operator
Operator
representing the corrected output functional from [Haa17] (Definition 2.31).Parameters
- output_functional
Original output functional.
- dual_models
Dual models for the corrected output, see
create_dual_model
.- dual_projected_primal_residuals
The primal residuals projected on the dual space (in the first argument) and on the primal space (in the second argument).
Methods
Apply the operator to a
VectorArray
.- apply(solution, mu=None)[source]¶
Apply the operator to a
VectorArray
.Parameters
- U
VectorArray
of vectors to which the operator is applied.- mu
The
parameter values
for which to evaluate the operator.
Returns
VectorArray
of the operator evaluations.
- class pymor.reductors.dwr.DWRCoerciveRBEstimator(primal_estimator, dual_estimators, dual_models)[source]¶
Bases:
pymor.core.base.ImmutableObject
Instantiated by
DWRCoerciveRBReductor
.Not to be used directly.
- class pymor.reductors.dwr.DWRCoerciveRBReductor(fom, dual_foms=None, primal_RB=None, dual_RBs=None, product=None, coercivity_estimator=None, check_orthonormality=None, check_tol=None)[source]¶
Bases:
pymor.core.base.BasicObject
Reduced Basis reductor for
StationaryModels
with coercive linear operator.This class can be used as a replacement for
CoerciveRBReductor
to obtain a corrected reduced output functional with the DWR approach (see [Haa17] (Definition 2.31, Proposition 2.32)). This also implements a DWR-based error estimator for the corrected output functional. The DWR approach requires the reduction of a dual problem for every dimension of the output functional. Each dual problem is defined by the dual operator and the corresponding component of the output functional as right-hand side. See alsocreate_dual_model
.Parameters
- fom
The
Model
which is to be reduced.- dual_foms
List of the dual
Models
that correspond to each dimension of the output_functional. Ifdual_foms
isNone
, the default dual models are constructed bycreate_dual_model
, assuming a fully discrete perspective.- primal_RB
VectorArray
containing the reduced basis on which to project the fom.- dual_RBs
List of
VectorArrays
containing the reduced bases on which to project thedual_foms
, where each entry of the list corresponds to the dimensions of the output functional. Ifdual_bases
isNone
, the primal basis are used.- product
See
CoerciveRBReductor
.- coercivity_estimator
See
CoerciveRBReductor
.- check_orthonormality
- check_tol
Methods
Return dual model with the output as right hand side.
Reconstruct high-dimensional vector from reduced vector
u
.- classmethod create_dual_model(model, dim=0)[source]¶
Return dual model with the output as right hand side.
The dual equation is defined as to find the solution \(p\) such that
\[a(q, p) = - l_d(q),\qquad\text{for all }q,\]where \(l_d\) denotes the \(d\)-th component of the output functional \(l\). See [Haa17] (Definition 2.31).
Parameters
- model
The
Model
for which to construct the dual model- dim
The dimension of the
fom.output_functional
for which the dual model is to be built.
Returns
A
Model
with the adjoint operator and the corresponding right-hand side