choreo.segm.ODE.ImplicitSymplecticIVP#

ImplicitSymplecticIVP(fun, gun, (double, double) t_span, double[::1] x0=None, double[::1] v0=None, ImplicitRKTable rk_x=default_implicit_rk, ImplicitRKTable rk_v=default_implicit_rk, bool vector_calls=False, grad_fun=None, grad_gun=None, double[:, ::1] grad_x0=None, double[:, ::1] grad_v0=None, Py_ssize_t nint=1, Py_ssize_t keep_freq=-1, double[:, ::1] reg_x0=None, double[:, ::1] reg_v0=None, Py_ssize_t reg_init_freq=-1, bool keep_init=False, bool DoEFT=True, double eps=np.finfo(np.float64).eps, Py_ssize_t maxiter=50)#

Implicit symplectic integration of a partitionned initial value problem.

Follows closely the implementation tips detailled in chapter VIII of [1]

Cited:

Parameters:
  • fun (callable or scipy.LowLevelCallable) – Function defining the IVP.

  • gun (callable or scipy.LowLevelCallable) – Function defining the IVP.

  • t_span (tuple (numpy.float64, numpy.float64)) – Initial and final time of integration.

  • x0 (numpy.ndarray(shape = (n), dtype = np.float64), optional) – Initial value for x. Overriden by reg_x0 if provided. By default, None.

  • v0 (numpy.ndarray(shape = (n), dtype = np.float64), optional) – Initial value for v. Overriden by reg_x0 if provided. By default, None.

  • rk_x (ImplicitRKTable, optional) – Runge-Kutta tables for the integration of the IVP. By default, choreo.segm.multiprec_tables.ComputeImplicitRKTable().

  • rk_v (ImplicitRKTable, optional) – Runge-Kutta tables for the integration of the IVP. By default, choreo.segm.multiprec_tables.ComputeImplicitRKTable().

  • vector_calls (bool, optional) – Whether to call functions on multiple inputs at once or not, by default False.

  • grad_fun (callable or scipy.LowLevelCallable, optional) – Gradient of the function defining the IVP, by default None.

  • grad_gun (callable or scipy.LowLevelCallable, optional) – Gradient of the function defining the IVP, by default None.

  • nint (int, optional) – Number of integration steps, by default 1.

  • keep_freq (int, optional) – Number of integration steps to be taken before saving output, by default -1.

  • reg_x0 (numpy.ndarray(shape = (nreg, n), dtype = np.float64)) – Array of initial values for x for regular reset.

  • reg_v0 (numpy.ndarray(shape = (nreg, n), dtype = np.float64)) – Array of initial values for v for regular reset.

  • reg_init_freq (int, optional) – Number of timesteps before resetting initial values for x and v. Non-positive values disable the reset, by default -1.

  • keep_init (bool, optional) – Whether to save the initial values, by default False.

  • DoEFT (bool, optional) – Whether to use an error-free transformation for summation, by default True.

  • eps (numpy:numpy.float64, optional) – Tolerence on the error of each implicit problem, by default np.finfo(np.float64).eps.

  • maxiter (int, optional) – Maximum number of iterations to solve each implicit problem, by default 50.

Returns:

Arrays containing the computed approximation of the solution to the IVP at evaluation points.

Return type:

tuple of numpy.ndarray.