pymor.operators.ei¶
Module Contents¶
- class pymor.operators.ei.EmpiricalInterpolatedOperator(operator, interpolation_dofs, collateral_basis, triangular, solver=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 – The
Solverfor 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 –
VectorArrayof vectors to which the operator is applied.mu – The
parameter valuesfor 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.If the operator has a
Solver, the JacobianOperatorwill be equipped with the solver’sjacobian_solver.- Parameters:
U – Length 1
VectorArraycontaining the vector for which to compute the Jacobian.mu – The
parameter valuesfor 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=None, name=None)[source]¶
Bases:
pymor.operators.interface.OperatorA 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 –
VectorArrayof vectors to which the operator is applied.mu – The
parameter valuesfor 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.If the operator has a
Solver, the JacobianOperatorwill be equipped with the solver’sjacobian_solver.- Parameters:
U – Length 1
VectorArraycontaining the vector for which to compute the Jacobian.mu – The
parameter valuesfor which to compute the Jacobian.
- Returns:
Linear |Operator| representing the Jacobian.