pymor.discretizers.builtin.list

Module Contents

class pymor.discretizers.builtin.list.ConvertToNumpyListVectorArrayRules(space)[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_NumpyMatrixOperator(op)[source]
action_only_range(op)[source]
action_only_source(op)[source]
action_recurse(op)[source]
pymor.discretizers.builtin.list.convert_to_numpy_list_vector_array(obj, space=None)[source]

Use NumpyListVectorArrayMatrixOperator instead of NumpyMatrixOperator.

This simple function recursively converts NumpyMatrixOperators to corresponding NumpyListVectorArrayMatrixOperators.

Parameters

obj

Either an Operator, e.g. NumpyMatrixOperator or a LincombOperator of NumpyMatrixOperators, or an entire Model that is to be converted.

space

The VectorSpace that is to be converted.

Returns

The converted Operator or Model.