Checks on B-series¶
-
pybs.series.checks.
convergence_order
(a)[source]¶ Return the convergence order of a B-series representing a flow.
Compares the input to the exact solution.
-
pybs.series.checks.
symmetric_up_to_order
(a, max_order=None)[source]¶ Return the order up to which
a
, a B-series representing a flow, is symmetric.Calculated by finding the adjoint and comparing. If
max_order
is given, the check stops atmax_order
and returnsmax_order
. This is useful if a is completely symmetric, or if symmetry up to some given order is all that matters.
-
pybs.series.checks.
symplectic_up_to_order
(a, max_order=None)[source]¶ Check to what order the character
a
is symplectic.
-
pybs.series.checks.
hamiltonian_up_to_order
(a, max_order=None)[source]¶ Check to what order an infinitesimal character is Hamiltonian.
-
pybs.series.checks.
subspace_hamiltonian_up_to_order
(a, max_order=None)[source]¶ Does the same as
hamiltonian_up_to_order()
, but the subspace approach.
-
pybs.series.checks.
energy_preserving_upto_order
(a, max_order=None)[source]¶ Check what order an infinitesimal character is symmetric up to.
Uses the method of subspaces.
-
pybs.series.checks.
conjugate_to_symplectic
(a, max_order=inf, quadratic_vectorfield=False)[source]¶ Checks to what order a character
a
is conjugate to symplectic.
The following functions are used by the above. Some of them might be useful on their own, while others are probably not:
-
pybs.series.checks.
equal_up_to_order
(a, b, max_order=None)[source]¶ Checks that
a
andb
give the exact same answer for all trees. Returns the largest order for which this is true.
-
pybs.series.checks.
satisfied_for_tree_pairs_of_order
(condition, order)[source]¶ Used in
hamiltonian_up_to_order()
andsymplectic_up_to_order()
.Checks all relevant pairs of trees for the two tests using it.
-
pybs.series.checks.
symplecticity_condition
(a, tree1, tree2)[source]¶ Symmetric function in
tree1
,tree2
.
-
pybs.series.checks.
is_energy_preserving_of_order
(a, order)[source]¶ Does the heavy lifting for
energy_preserving_upto_order()
.