choreo.segm.ODE.ImplicitRKTable.is_symplectic_pair#
- ImplicitRKTable.is_symplectic_pair(self, ImplicitRKTable other, double tol=1e-12)#
Returns
True
if the pair of Runge-Kutta methods is symplectic.The pair of methods
(self, other)
is inferred symplectic if its symplecticity default falls under the specified tolerancetol
.Example
>>> import choreo >>> Radau_IA = choreo.segm.multiprec_tables.ComputeImplicitRKTable(method="Radau_IA") >>> Radau_IIA = choreo.segm.multiprec_tables.ComputeImplicitRKTable(method="Radau_IIA") >>> Radau_IA.is_symplectic_pair(Radau_IIA) False >>> Lobatto_IIIA = choreo.segm.multiprec_tables.ComputeImplicitRKTable(method="Lobatto_IIIA") >>> Lobatto_IIIB = choreo.segm.multiprec_tables.ComputeImplicitRKTable(method="Lobatto_IIIB") >>> Lobatto_IIIA.is_symplectic_pair(Lobatto_IIIB) True
See also
- Parameters:
other (
ImplicitRKTable
)tol (
numpy.float64
, optional) – Tolerance on symplecticity default, by default1e-12
.
- Returns:
Whether the method is symplectic given the tolerance
tol
.- Return type: