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

Apply the operator to a VectorArray.

linear = False[source]
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.

estimate_error(U, mu, m)[source]
estimate_output_error(U, mu, m, return_vector=False)[source]
restricted_to_subbasis(dual_roms, primal_dim, dual_dims, m)[source]
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 also 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. If dual_foms is None, the default dual models are constructed by create_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 the dual_foms, where each entry of the list corresponds to the dimensions of the output functional. If dual_bases is None, the primal basis are used.

product

See CoerciveRBReductor.

coercivity_estimator

See CoerciveRBReductor.

check_orthonormality

See ProjectionBasedReductor.

check_tol

See ProjectionBasedReductor.

Methods

assemble_error_estimator_for_subbasis

create_dual_model

Return dual model with the output as right hand side.

extend_basis

reconstruct

Reconstruct high-dimensional vector from reduced vector u.

reduce

assemble_error_estimator_for_subbasis(dual_roms, primal_dim, dual_dims)[source]
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

extend_basis(U, Ps, method='gram_schmidt', copy=True)[source]
reconstruct(u)[source]

Reconstruct high-dimensional vector from reduced vector u.

reduce(primal_dim=None, dual_dims=None)[source]