pymor.algorithms.lincomb
¶
Module Contents¶
- class pymor.algorithms.lincomb.AssembleLincombRules(coefficients, solver_options, name)[source]¶
Bases:
pymor.algorithms.rules.RuleTable
RuleTable
for theassemble_lincomb
algorithm.Parameters
- coefficients
Tuple of coefficients.
- solver_options
solver_options
for the assembled operator.- name
Name of the assembled operator.
Methods
- pymor.algorithms.lincomb.assemble_lincomb(operators, coefficients, solver_options=None, name=None)[source]¶
Try to assemble a linear combination of the given operators.
Returns a new
Operator
which represents the sumc_1*O_1 + ... + c_N*O_N
where
O_i
areOperators
andc_i
scalar coefficients.This function is called in the
assemble
method ofLincombOperator
and is not intended to be used directly.To form the linear combination of backend
Operators
(containing actual matrix data),_assemble_lincomb
will be called on the firstOperator
in the linear combination.Parameters
- operators
List of
Operators
O_i
whose linear combination is formed.- coefficients
List of the corresponding linear coefficients
c_i
.- solver_options
solver_options
for the assembled operator.- name
Name of the assembled operator.
Returns
The assembled
Operator
.