Home-made deterministic integrators#
Implements homemade integrators for deterministic systems, that is, not taking into acount diffusion due to photon scattering.
- class atomsmltr.simulation.simulator.deterministic.CustomSimulationBase(config: Configuration = None)[source]#
Bases:
SimulationA Base for home-made deterministic simulations
Not meant to be used directly, just gathering common method
- get_force(u)[source]#
returns the force felt at a position/speed vector u
- Parameters:
u (array, shape (6,) or (n1, n2, .., 6)) – array of cartesian coordinates (position and speed) in the lab frame
- Returns:
force – the force at the coordinates given by
pos_speed_vector- Return type:
array, shape (3,) or (n1, n2, .., 3)
- class atomsmltr.simulation.simulator.deterministic.Euler(config: Configuration = None)[source]#
Bases:
CustomSimulationBaseA homemade simulator based on Euler’s method
- Parameters:
config (Configuration, optional) – the configuration to consider for the simulation
References
TODO: put here
- class atomsmltr.simulation.simulator.deterministic.RK4(config: Configuration = None)[source]#
Bases:
CustomSimulationBaseA homemade simulator based on fourth order Runge-Kutta method
- Parameters:
config (Configuration, optional) – the configuration to consider for the simulation
References
- class atomsmltr.simulation.simulator.deterministic.VelocityVerlet(config: Configuration = None)[source]#
Bases:
CustomSimulationBaseA homemade simulator based on velocity verlet method
- Parameters:
config (Configuration, optional) – the configuration to consider for the simulation
References
TODO: put here
- atomsmltr.simulation.simulator.deterministic.stop_position_event(u: ndarray, stop_position: list)[source]#
Implements ‘stop’ events for home-made simulators, based on atom’s position
- Parameters:
u (array, shape (n,m,...,6)) – position/speed vector, according to our vectorization convention
stop_position (list) – list of Zones objects targetting position with actions set to stop
- Returns:
res – whether to stop the simulation
- Return type:
bool
- atomsmltr.simulation.simulator.deterministic.stop_speed_event(u: ndarray, stop_speed: list)[source]#
Implements ‘stop’ events for home-made simulators, based on atom’s speed
- Parameters:
u (array, shape (n,m,...,6)) – position/speed vector, according to our vectorization convention
stop_speed (list) – list of Zones objects targetting speed with actions set to stop
- Returns:
res – whether to stop the simulation
- Return type:
bool