57 real(real64) :: charge(1)
69 procedure charged_particle_constructor
80 class(charged_particle_t),
pointer :: sys
81 type(namespace_t),
intent(in) :: namespace
98 class(charged_particle_t),
intent(inout) :: this
99 type(namespace_t),
intent(in) :: namespace
117 this%quantities(
charge)%updated_on_demand = .false.
118 this%quantities(
charge)%always_available = .
true.
126 class(charged_particle_t),
target,
intent(inout) :: this
127 class(interaction_t),
intent(inout) :: interaction
131 select type (interaction)
133 call interaction%init(this%space%dim, 1, this%charge, this%pos)
135 call interaction%init(this%space%dim, 1, this%charge, this%pos, this%vel, this%namespace)
137 call this%classical_particle_t%init_interaction(interaction)
145 class(charged_particle_t),
intent(inout) :: this
149 call this%classical_particle_t%initial_conditions()
157 real(real64),
intent(in) :: tol
161 converged = this%classical_particle_t%is_tolerance_reached(tol)
169 integer,
intent(in) :: iq
180 call this%classical_particle_t%update_quantity(iq)
193 select type (interaction)
195 interaction%partner_np = 1
196 safe_allocate(interaction%partner_charge(1))
197 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1))
199 interaction%partner_np = 1
200 interaction%grid_based_partner = .false.
201 safe_allocate(interaction%partner_charge(1))
202 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1))
203 safe_allocate(interaction%partner_vel(1:partner%space%dim, 1))
206 call partner%classical_particle_t%init_interaction_as_partner(interaction)
219 select type (interaction)
221 interaction%partner_charge(1) = partner%charge(1)
222 interaction%partner_pos(:,1) = partner%pos(:, 1)
225 interaction%partner_charge(1) = partner%charge(1)
226 interaction%partner_pos(:,1) = partner%pos(:, 1)
227 interaction%partner_vel(:,1) = partner%vel(:, 1)
228 call interaction%do_mapping()
231 call partner%classical_particle_t%copy_quantities_to_interaction(interaction)
Prints out to iunit a message in the form: ["InputVariable" = value] where "InputVariable" is given b...
This module implements the basic elements defining algorithms.
subroutine charged_particle_update_quantity(this, iq)
subroutine charged_particle_init_interaction_as_partner(partner, interaction)
class(charged_particle_t) function, pointer charged_particle_constructor(namespace)
The factory routine (or constructor) allocates a pointer of the corresponding type and then calls the...
subroutine charged_particle_initial_conditions(this)
subroutine charged_particle_copy_quantities_to_interaction(partner, interaction)
subroutine charged_particle_init_interaction(this, interaction)
logical function charged_particle_is_tolerance_reached(this, tol)
subroutine, public charged_particle_init(this, namespace)
The init routine is a module level procedure This has the advantage that different classes can have d...
subroutine, public classical_particle_init(this, namespace)
The init routine is a module level procedure This has the advantage that different classes can have d...
real(real64), parameter, public m_one
integer, parameter, public lorentz_force
integer, parameter, public current_to_mxll_field
integer, parameter, public coulomb_force
This module defines the abstract interaction_t class, and some auxiliary classes for interactions.
This module implements the multisystem debug functionality.
This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system...
integer, parameter, public current
integer, parameter, public charge
This module implements the abstract system type.
class for a charged classical particle
class for a neutral classical particle
Coulomb interaction between two systems of particles.
Class to transfer a current to a Maxwell field.
surrogate interaction class to avoid circular dependencies between modules.
Lorenz force between a systems of particles and an electromagnetic field.