pymor.operators.list¶
Module Contents¶
- class pymor.operators.list.LinearComplexifiedListVectorArrayOperatorBase[source]¶
Bases:
ListVectorArrayOperatorBaseBase
Operatorfor complexifiedListVectorArrays.
- class pymor.operators.list.ListVectorArrayOperatorBase[source]¶
Bases:
pymor.operators.interface.OperatorBase
OperatorforListVectorArrays.Methods
Apply the operator to a
VectorArray.Apply the adjoint operator.
Apply the inverse operator.
Apply the inverse adjoint 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.
- apply_adjoint(V, mu=None)[source]¶
Apply the adjoint operator.
For any given linear
Operatorop,parameter valuesmuandVectorArraysU,Vin thesourceresp.rangewe have:op.apply_adjoint(V, mu).dot(U) == V.inner(op.apply(U, mu))
Thus, when
opis represented by a matrixM,apply_adjointis given by left-multiplication of (the complex conjugate of)MwithV.- Parameters:
V –
VectorArrayof vectors to which the adjoint operator is applied.mu – The
parameter valuesfor which to apply the adjoint operator.
- Returns:
|VectorArray| of the adjoint operator evaluations.
- apply_inverse(V, mu=None, initial_guess=None, least_squares=False)[source]¶
Apply the inverse operator.
- Parameters:
V –
VectorArrayof vectors to which the inverse operator is applied.mu – The
parameter valuesfor which to evaluate the inverse operator.initial_guess –
VectorArraywith the same length asVcontaining initial guesses for the solution. Some implementations ofapply_inversemay ignore this parameter. IfNonea solver-dependent default is used.least_squares –
If
True, solve the least squares problem:u = argmin ||op(u) - v||_2.
Since for an invertible operator the least squares solution agrees with the result of the application of the inverse operator, setting this option should, in general, have no effect on the result for those operators. However, note that when no appropriate
solver_optionsare set for the operator, most implementations will choose a least squares solver by default which may be undesirable.
- Returns:
|VectorArray| of the inverse operator evaluations.
- Raises:
InversionError – The operator could not be inverted.
- apply_inverse_adjoint(U, mu=None, initial_guess=None, least_squares=False)[source]¶
Apply the inverse adjoint operator.
- Parameters:
U –
VectorArrayof vectors to which the inverse adjoint operator is applied.mu – The
parameter valuesfor which to evaluate the inverse adjoint operator.initial_guess –
VectorArraywith the same length asUcontaining initial guesses for the solution. Some implementations ofapply_inverse_adjointmay ignore this parameter. IfNonea solver-dependent default is used.least_squares –
If
True, solve the least squares problem:v = argmin ||op^*(v) - u||_2.
Since for an invertible operator the least squares solution agrees with the result of the application of the inverse operator, setting this option should, in general, have no effect on the result for those operators. However, note that when no appropriate
solver_optionsare set for the operator, most operator implementations will choose a least squares solver by default which may be undesirable.
- Returns:
|VectorArray| of the inverse adjoint operator evaluations.
- Raises:
InversionError – The operator could not be inverted.
- class pymor.operators.list.NumpyListVectorArrayMatrixOperator(matrix, solver_options=None, name=None)[source]¶
Bases:
ListVectorArrayOperatorBase,pymor.operators.numpy.NumpyMatrixOperatorVariant of
NumpyMatrixOperatorusingListVectorArrayinstead ofNumpyVectorArray.This class is mainly intended for performance tests of
ListVectorArray. In generalNumpyMatrixOperatorshould be used instead of this class.- Parameters:
matrix – The
NumPy arraywhich is to be wrapped.solver_options – The
solver_optionsfor the operator.name – Name of the operator.
Methods
Apply the adjoint operator.
Apply the inverse adjoint operator.
- apply_adjoint(V, mu=None)[source]¶
Apply the adjoint operator.
For any given linear
Operatorop,parameter valuesmuandVectorArraysU,Vin thesourceresp.rangewe have:op.apply_adjoint(V, mu).dot(U) == V.inner(op.apply(U, mu))
Thus, when
opis represented by a matrixM,apply_adjointis given by left-multiplication of (the complex conjugate of)MwithV.- Parameters:
V –
VectorArrayof vectors to which the adjoint operator is applied.mu – The
parameter valuesfor which to apply the adjoint operator.
- Returns:
|VectorArray| of the adjoint operator evaluations.
- apply_inverse_adjoint(U, mu=None, initial_guess=None, least_squares=False)[source]¶
Apply the inverse adjoint operator.
- Parameters:
U –
VectorArrayof vectors to which the inverse adjoint operator is applied.mu – The
parameter valuesfor which to evaluate the inverse adjoint operator.initial_guess –
VectorArraywith the same length asUcontaining initial guesses for the solution. Some implementations ofapply_inverse_adjointmay ignore this parameter. IfNonea solver-dependent default is used.least_squares –
If
True, solve the least squares problem:v = argmin ||op^*(v) - u||_2.
Since for an invertible operator the least squares solution agrees with the result of the application of the inverse operator, setting this option should, in general, have no effect on the result for those operators. However, note that when no appropriate
solver_optionsare set for the operator, most operator implementations will choose a least squares solver by default which may be undesirable.
- Returns:
|VectorArray| of the inverse adjoint operator evaluations.
- Raises:
InversionError – The operator could not be inverted.