pymor.operators.ei¶
Module Contents¶
Classes¶
Interpolate an |
|
A projected |
- class pymor.operators.ei.EmpiricalInterpolatedOperator(operator, interpolation_dofs, collateral_basis, triangular, solver_options=None, name=None)[source]¶
Bases:
pymor.operators.interface.OperatorInterpolate an
Operatorusing Empirical Operator Interpolation.Let
Lbe anOperator,0 <= c_1, ..., c_M < L.range.dimindices 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_EIofLw.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,
EmpiricalInterpolatedOperatorcallsrestrictedto obtain a restricted version of the operator which is used to quickly obtain the required evaluations. If therestrictedmethod, 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.eimodule.Parameters
- operator
The
Operatorto interpolate.- interpolation_dofs
List or 1D
NumPy arrayof the interpolation DOFsc_1, ..., c_M.- collateral_basis
VectorArraycontaining 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_optionsfor the operator.- name
Name of the operator.
- apply(self, U, 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.
- jacobian(self, U, mu=None)[source]¶
Return the operator’s Jacobian as a new
Operator.Parameters
- U
Length 1
VectorArraycontaining the vector for which to compute the Jacobian.- mu
The
parameter valuesfor which to compute the Jacobian.
Returns
Linear
Operatorrepresenting 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.OperatorA projected
EmpiricalInterpolatedOperator.- apply(self, U, 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.
- jacobian(self, U, mu=None)[source]¶
Return the operator’s Jacobian as a new
Operator.Parameters
- U
Length 1
VectorArraycontaining the vector for which to compute the Jacobian.- mu
The
parameter valuesfor which to compute the Jacobian.
Returns
Linear
Operatorrepresenting the Jacobian.