Operations on B-series¶
-
pybs.series.operations.
composition
(a, b)[source]¶ Composition of methods, b after a.
Return the composition \(a \circ b\). The returned object is a
BseriesRule
if \(a(\emptyset) = 1\) and aForestRule
otherwise.
-
pybs.series.operations.
inverse
(a)[source]¶ Return the inverse of a in the Butcher group.
The returned BseriesRule is calculated as \(\left(a \circ S\right)(\tau)\), where \(S\) denotes the antipode.
-
pybs.series.operations.
adjoint
(a)[source]¶ The adjoint is the inverse with reversed time step.
Returns a BseriesRule.
-
pybs.series.operations.
composition_ssa
(a, b)[source]¶ Same as
composition()
, except that it halves the stepsize afterwards.Equivalent to
stepsize_adjustment(composition(a,b),Fraction(1, 2))
.
-
pybs.series.operations.
hf_composition
(a)[source]¶ The composition \(a b\), where \(b\) is the B-series representing the vector field corresponding to the exact solution.
That is \(b = \delta_{\circ}\).
-
pybs.series.operations.
series_commutator
(a, b)[source]¶ Corresponds to tree commutator, just for series.
-
pybs.series.operations.
conjugate
(a, c)[source]¶ The conjugate of
a
with change of coordinatesc
.Calculated with compositions and inverse.
-
pybs.series.operations.
conjugate_by_commutator
(a, c)[source]¶ The conjugate of
a
with change of coordinatesc
.Calculated using the commutator.
-
pybs.series.operations.
lie_derivative
(c, b, truncate=False)[source]¶ The Lie-derivative of
c
with respect tob
as a newseries.Bseries.BseriesRule
.
-
pybs.series.operations.
modified_equation
(a, quadratic_vectorfield=False)[source]¶ The modified equation. Mostely equivalent to
log()
.
-
pybs.series.operations.
log
(a, quadratic_vectorfield=False)[source]¶ The logarithm.
If
a
is the B-series rule for a numerical method, it returns the rule for the modified equation.Note
Much slower than
modified_equation()
.
-
pybs.series.operations.
exp
(a, quadratic_vectorfield=False)[source]¶ The exponential.
If
a
is the rule for the B-serie of some modified equation, it returns the B-series rule for the numerical method.