pyoculus 0.1.1
Loading...
Searching...
No Matches
pyoculus.integrators.base_integrator.BaseIntegrator Class Reference

Class that used to setup the ODE integrator. More...

Inheritance diagram for pyoculus.integrators.base_integrator.BaseIntegrator:
pyoculus.integrators.rk_integrator.RKIntegrator

Public Member Functions

 __init__ (self, params)
 Set up the ODE solver.
 
 set_initial_value (self, t, x)
 Set up the initial value for the ODE solver.
 
 integrate (self, tend)
 Integrate the ODE until tend
 
 get_solution (self)
 Get the solution at current time.
 
 copy (self)
 Return a copy of self, to use if want to compute in parallel.
 

Public Attributes

 t = t
 
 x = x
 

Protected Attributes

 _params = dict(params)
 

Detailed Description

Class that used to setup the ODE integrator.

This is an abstract class, should never be used as an instance.

All integrators derived from BaseIntegrator should contain the following member functions

  • set_initial_value – Set up initial value for the ODE solver
  • integrate – Solve the ODE until a given time

Optional:

  • copy – make a copy of the integrator as a new instance

Constructor & Destructor Documentation

◆ __init__()

pyoculus.integrators.base_integrator.BaseIntegrator.__init__ ( self,
params )

Set up the ODE solver.

Parameters
paramsdict, the parameters used in the ODE solver

Reimplemented in pyoculus.integrators.rk_integrator.RKIntegrator.

Member Function Documentation

◆ copy()

pyoculus.integrators.base_integrator.BaseIntegrator.copy ( self)

Return a copy of self, to use if want to compute in parallel.

Returns
a copy of self

Reimplemented in pyoculus.integrators.rk_integrator.RKIntegrator.

◆ get_solution()

pyoculus.integrators.base_integrator.BaseIntegrator.get_solution ( self)

Get the solution at current time.

Returns
the solution

◆ integrate()

pyoculus.integrators.base_integrator.BaseIntegrator.integrate ( self,
tend )

Integrate the ODE until tend

Parameters
tendthe target end time
Returns
the new value of x

Reimplemented in pyoculus.integrators.rk_integrator.RKIntegrator.

◆ set_initial_value()

pyoculus.integrators.base_integrator.BaseIntegrator.set_initial_value ( self,
t,
x )

Set up the initial value for the ODE solver.

Parameters
tthe start of time
xthe start of coordinates

Reimplemented in pyoculus.integrators.rk_integrator.RKIntegrator.

Member Data Documentation

◆ _params

pyoculus.integrators.base_integrator.BaseIntegrator._params = dict(params)
protected

◆ t

pyoculus.integrators.base_integrator.BaseIntegrator.t = t

◆ x

pyoculus.integrators.base_integrator.BaseIntegrator.x = x

The documentation for this class was generated from the following file: