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 anOperator
,0 <= c_1, ..., c_M < L.range.dim
indices of interpolation DOFs and letb_1, ..., b_M in R^(L.range.dim)
be collateral basis vectors. If moreoverψ_j(U)
denotes the j-th component ofU
, the empirical interpolationL_EI
ofL
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
callsrestricted
to obtain a restricted version of the operator which is used to quickly obtain the required evaluations. If therestricted
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 DOFsc_1, ..., c_M
.- collateral_basis
VectorArray
containing the collateral basisb_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 the operator to a
VectorArray
.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.ProjectedEmpiciralInterpolatedOperator(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 the operator to a
VectorArray
.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.