pymor.discretizers.builtin.list

Module Contents

Classes

ConvertToNumpyListVectorArrayRules

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

Functions

convert_to_numpy_list_vector_array

Use NumpyListVectorArrayMatrixOperator instead of NumpyMatrixOperator.

pymor.discretizers.builtin.list.convert_to_numpy_list_vector_array(obj)[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.

Returns

The converted Operator or Model.

class pymor.discretizers.builtin.list.ConvertToNumpyListVectorArrayRules[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_recurse(self, op)[source]
action_NumpyMatrixOperator(self, op)[source]
action_VectorArrayOperator(self, op)[source]