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 ofrules
, stored in therules
attributes, which can beapplied
to given objects.A new table is created by subclassing
RuleTable
and defining new methods which are decorated withmatch_class
,match_generic
or anotherrule
subclass. The order of the method definitions determines the order in which the definedrules
are applied.Parameters
- use_caching
If
True
, cache results ofapply
.
- 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 correspondingNumpyListVectorArrayMatrixOperators
.Parameters
- obj
Either an
Operator
, e.g.NumpyMatrixOperator
or aLincombOperator
ofNumpyMatrixOperators
, or an entireModel
that is to be converted.- space
The
VectorSpace
that is to be converted.