pymor.algorithms.simplify¶
Module Contents¶
Classes¶
Define algorithm by a table of match conditions and corresponding actions. |
Functions¶
Expand concatenations of LincombOperators. |
- pymor.algorithms.simplify.expand(obj)[source]¶
Expand concatenations of LincombOperators.
To any given
OperatororModel, the following transformations are applied recursively:ConcatenationsofLincombOperatorsare expanded. E.g.(O1 + O2) @ (O3 + O4)
becomes:
O1 @ O3 + O1 @ O4 + O2 @ O3 + O2 @ O4
LincombOperatorsinsideLincombOperatorsare merged into a singleLincombOperatorConcatenationOperatorsinsideConcatenationOperatorsare merged into a singleConcatenationOperator.
Parameters
Returns
The transformed object.
- class pymor.algorithms.simplify.ExpandRules[source]¶
Bases:
pymor.algorithms.rules.RuleTableDefine algorithm by a table of match conditions and corresponding actions.
RuleTablemanages a table ofrules, stored in therulesattributes, which can beappliedto given objects.A new table is created by subclassing
RuleTableand defining new methods which are decorated withmatch_class,match_genericor anotherrulesubclass. The order of the method definitions determines the order in which the definedrulesare applied.Parameters
- use_caching
If
True, cache results ofapply.