Bases: object
Base abstract class for defining the integration method of the ordinary differential equation like Runge Kutta or Euler method, the user must overide the method __step__
Example (Euler method):
import numpy as np
import pyparticles.ode.ode_solver as os
class EulerSolver( os.OdeSolver ) :
def __init__( self , force , p_set , dt ):
super(EulerSolver,self).__init__( force , p_set , dt )
def __step__( self , dt ):
self.force.update_force( self.pset )
self.pset.V[:] = self.pset.V + self.force.A * dt
self.pset.X[:] = self.pset.X + self.pset.V * dt
self.pset.update_boundary()
Constructor:
Parameters: |
|
---|
get and set the delta time of the step
get and set the used force model
get the reference to the SimTime object, used for storing and sharing the current simulation time
Perform an integration step. If the dt is not given (reccomended) it uses the stored dt. You must alway use this method for executing a step.
return the count of the performed steps
get and set the current simulation time
Bases: pyparticles.ode.ode_solver.OdeSolver
returns a reference to the current positionals constraints
set the new positionals contraints
get and set the current positionals constraints
Bases: object
Class used for storing the current simulation time:
Constructor
Parameters: | controller – a reference to the object that control the simulation time |
---|
get the reference to the time controller
Get a reference to the simulation time controller, normally an ODE solver
:returns the reference to the ODE solver object
get the current time
set the current time
get and set the current simulation time
Bases: pyparticles.ode.ode_solver_constrained.OdeSolverConstrained
get and set the current positionals constraints
Bases: pyparticles.ode.ode_solver_constrained.OdeSolverConstrained
get and set the current positionals constraints
Bases: pyparticles.ode.ode_solver_constrained.OdeSolverConstrained
get and set the current positionals constraints
Bases: pyparticles.ode.ode_solver_constrained.OdeSolverConstrained
get and set the current positionals constraints
Bases: pyparticles.ode.ode_solver_constrained.OdeSolverConstrained
get and set the current positionals constraints