pymor.algorithms.simplify¶
Module Contents¶
- class pymor.algorithms.simplify.ContractRules[source]¶
- class pymor.algorithms.simplify.ExpandRules[source]¶
Bases:
pymor.algorithms.rules.RuleTableRuleTablefor theexpandalgorithm.Methods
- pymor.algorithms.simplify.contract(obj)[source]¶
Contract linear combinations and concatenations of
Operators.To any given
OperatororModel, the following transformations are applied recursively:Concatenationsof non-parametric linearOperatorsare contracted into a singleOperatorwhen possible. Products of sparse matrices are not computed, however.Non-parametric
linear combinationsof non-parametric operators are merged.
- 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 singleLincombOperator.ConcatenationOperatorsinsideConcatenationOperatorsare merged into a singleConcatenationOperator.AdjointsofLincombOperatorsare distributed over the linear combination(∑ c_i A_i)^* = ∑ conj(c_i) A_i^*.
ConcatenationOperatorsinsideAdjointOperatorsare reversed(A @ B @ C)^* = C^* @ B^* @ A^*.
BlockOperatorsare expanded block-wise. Further,LincombOperatorblocks are expanded into a singleLincombOperatorofBlockOperators.