pymor.algorithms.lincomb

Module Contents

class pymor.algorithms.lincomb.AssembleLincombRules(coefficients, solver_options, name)[source]

Bases: pymor.algorithms.rules.RuleTable

Define algorithm by a table of match conditions and corresponding actions.

RuleTable manages a table of rules, stored in the rules attributes, which can be applied to given objects.

A new table is created by subclassing RuleTable and defining new methods which are decorated with match_class, match_generic or another rule subclass. The order of the method definitions determines the order in which the defined rules are applied.

Parameters

use_caching

If True, cache results of apply.

rules[source]

list of all defined rules.

action_BlockDiagonalOperator(ops)[source]
action_BlockOperatorBase(ops)[source]
action_BlockSpaceIdentityOperator(ops)[source]
action_IdentityOperator(ops)[source]
action_SecondOrderModelOperator(ops)[source]
action_VectorArrayOperator(ops)[source]
action_ZeroOperator(ops)[source]
action_call_assemble_lincomb_method(ops)[source]
action_merge_into_low_rank_updated_operator(ops)[source]
action_merge_low_rank_operators(ops)[source]
action_return_lincomb(ops)[source]
action_zero_coeff(ops)[source]
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 sum

c_1*O_1 + ... + c_N*O_N

where O_i are Operators and c_i scalar coefficients.

This function is called in the assemble method of LincombOperator 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 first Operator 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.