pymor.operators.ei

Module Contents

class pymor.operators.ei.EmpiricalInterpolatedOperator(operator, interpolation_dofs, collateral_basis, triangular, solver_options=None, name=None)[source]

Bases: pymor.operators.interface.Operator

Interpolate an Operator using Empirical Operator Interpolation.

Let L be an Operator, 0 <= c_1, ..., c_M < L.range.dim indices of interpolation DOFs and let b_1, ..., b_M in R^(L.range.dim) be collateral basis vectors. If moreover ψ_j(U) denotes the j-th component of U, the empirical interpolation L_EI of L w.r.t. the given data is given by

|                M
|   L_EI(U, μ) = ∑ b_i⋅λ_i     such that
|               i=1
|
|   ψ_(c_i)(L_EI(U, μ)) = ψ_(c_i)(L(U, μ))   for i=0,...,M

Since the original operator only has to be evaluated at the given interpolation DOFs, EmpiricalInterpolatedOperator calls restricted to obtain a restricted version of the operator which is used to quickly obtain the required evaluations. If the restricted method, is not implemented, the full operator will be evaluated (which will lead to the same result, but without any speedup).

The interpolation DOFs and the collateral basis can be generated using the algorithms provided in the pymor.algorithms.ei module.

Parameters

operator

The Operator to interpolate.

interpolation_dofs

List or 1D NumPy array of the interpolation DOFs c_1, ..., c_M.

collateral_basis

VectorArray containing the collateral basis b_1, ..., b_M.

triangular

If True, assume that ψ_(c_i)(b_j) = 0 for i < j, which means that the interpolation matrix is triangular.

solver_options

The solver_options for the operator.

name

Name of the operator.

Methods

apply

Apply the operator to a VectorArray.

jacobian

Return the operator's Jacobian as a new Operator.

apply(U, 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.

jacobian(U, mu=None)[source]

Return the operator’s Jacobian as a new Operator.

Parameters

U

Length 1 VectorArray containing the vector for which to compute the Jacobian.

mu

The parameter values for which to compute the Jacobian.

Returns

Linear Operator representing the Jacobian.

class pymor.operators.ei.ProjectedEmpiricalInterpolatedOperator(restricted_operator, interpolation_matrix, source_basis_dofs, projected_collateral_basis, triangular, solver_options=None, name=None)[source]

Bases: pymor.operators.interface.Operator

A projected EmpiricalInterpolatedOperator.

Methods

apply

Apply the operator to a VectorArray.

jacobian

Return the operator's Jacobian as a new Operator.

with_cb_dim

apply(U, 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.

jacobian(U, mu=None)[source]

Return the operator’s Jacobian as a new Operator.

Parameters

U

Length 1 VectorArray containing the vector for which to compute the Jacobian.

mu

The parameter values for which to compute the Jacobian.

Returns

Linear Operator representing the Jacobian.

with_cb_dim(dim)[source]