sarkas.time_evolution.integrators.Integrator
sarkas.time_evolution.integrators.Integrator#
- class sarkas.time_evolution.integrators.Integrator[source]#
Class used to assign integrator type.
- Variables
dt (float) – Timestep.
kB (float) – Boltzmann constant.
magnetized (bool) – Magnetized simulation flag.
species_num (numpy.ndarray) – Number of particles of each species.
species_plasma_frequencies (numpy.ndarray) – Plasma frequency of each species.
box_lengths (numpy.ndarray) – Length of each box side.
pbox_lengths (numpy.ndarray) – Initial particle box sides’ lengths.
verbose (bool) – Verbose output flag.
type (str) – Integrator type.
Methods
Integrator.absorbing_bc
(ptcls)Applies absorbing boundary conditions by calling enforce_abc
Integrator.copy_params
(params)Copy necessary parameters.
Integrator.cyclotronic
(ptcls)Update particles' class using the cyclotronic algorithm in the case of a constant magnetic field along the \(z\) axis.
Integrator.cyclotronic_zdir
(ptcls)Update particles' class using the cyclotronic algorithm in the case of a constant magnetic field along the \(z\) axis.
Integrator.from_dict
(input_dict)Update attributes from input dictionary.
Integrator.langevin
(ptcls)Update particles class using the velocity verlet algorithm and Langevin damping.
Integrator.magnetic_boris
(ptcls)Update particles' class using the Boris algorithm in the case of a constant magnetic field along the \(z\) axis.
Update particles' class using the Boris algorithm in the case of a constant magnetic field along the \(z\) axis.
Integrator.magnetic_helpers
(coefficient)Calculate the trigonometric functions of the magnetic integrators.
Update particles' class based on position verlet method in the case of an arbitrary direction of the constant magnetic field.
Update particles' class based on position verlet method in the case of a constant magnetic field along the \(z\) axis.
Integrator.magnetic_verlet
(ptcls)Update particles' class based on velocity verlet method in the case of an arbitrary direction of the constant magnetic field.
Update particles' class based on velocity verlet method in the case of a constant magnetic field along the \(z\) axis.
Integrator.open_bc
(ptcls)Applies open boundary conditions.
Integrator.periodic_bc
(ptcls)Applies periodic boundary conditions by calling enforce_pbc
Integrator.pot_acc_setup
(potential)Link the
update_accelerations()
method depending on the potential algorithm.Print integrator and thermostat information in a user-friendly way.
Integrator.reflecting_bc
(ptcls)Applies reflective boundary conditions by calling enforce_rbc
Integrator.setup
(params, potential)Assign attributes from simulation's parameters and classes.
Assign attributes from simulation's parameters.
Integrator.thermostate
(ptcls)Update particles' velocities according to the chosen thermostat
Integrator.type_setup
(int_type)- Parameters
int_type (str) -- Integrator type to use.
Integrator.verlet
(ptcls)Update particles' class based on velocity verlet algorithm.