pymor.algorithms.to_matrix

Module Contents

class pymor.algorithms.to_matrix.ToMatrixRules(format, mu)[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_AdjointOperator(self, op)[source]
action_BlockOperator(self, op)[source]
action_ComponentProjectionOperator(self, op)[source]
action_ConcatenationOperator(self, op)[source]
action_IdentityOperator(self, op)[source]
action_LincombOperator(self, op)[source]
action_LowRankOperator(self, op)[source]
action_LowRankUpdatedOperator(self, op)[source]
action_NumpyHankelOperator(self, op)[source]
action_NumpyMatrixOperator(self, op)[source]
action_VectorArrayOperator(self, op)[source]
action_ZeroOperator(self, op)[source]
action_as_array(self, op)[source]
pymor.algorithms.to_matrix.action_DuneXTMatrixOperator(self, op)[source]
pymor.algorithms.to_matrix.to_matrix(op, format=None, mu=None)[source]

Convert a linear Operator to a matrix.

Parameters

op

The Operator to convert.

format

Format of the resulting matrix: NumPy array if ‘dense’, otherwise the appropriate SciPy spmatrix. If None, a choice between dense and sparse format is automatically made.

mu

The parameter values for which to convert op.

Returns

res

The matrix equivalent to op.