pymor.reductors.dwr¶
Module Contents¶
- class pymor.reductors.dwr.CorrectedOutputFunctional(output_functional, dual_models, dual_projected_primal_residuals)[source]¶
Bases:
pymor.operators.interface.OperatorOperatorrepresenting 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
VectorArrayof vectors to which the operator is applied.- mu
The
parameter valuesfor which to evaluate the operator.
Returns
VectorArrayof the operator evaluations.
- class pymor.reductors.dwr.DWRCoerciveRBEstimator(primal_estimator, dual_estimators, dual_models)[source]¶
Bases:
pymor.core.base.ImmutableObjectInstantiated 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.BasicObjectReduced Basis reductor for
StationaryModelswith coercive linear operator.This class can be used as a replacement for
CoerciveRBReductorto 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
Modelwhich is to be reduced.- dual_foms
List of the dual
Modelsthat correspond to each dimension of the output_functional. Ifdual_fomsisNone, the default dual models are constructed bycreate_dual_model, assuming a fully discrete perspective.- primal_RB
VectorArraycontaining the reduced basis on which to project the fom.- dual_RBs
List of
VectorArrayscontaining the reduced bases on which to project thedual_foms, where each entry of the list corresponds to the dimensions of the output functional. Ifdual_basesisNone, 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
Modelfor which to construct the dual model- dim
The dimension of the
fom.output_functionalfor which the dual model is to be built.
Returns
A
Modelwith the adjoint operator and the corresponding right-hand side