49 real(real64),
allocatable,
public :: charge(:)
66 class(charged_particles_t),
intent(inout) :: this
67 integer,
intent(in) :: np
72 safe_allocate(this%charge(1:np))
75 this%quantities(
charge)%updated_on_demand = .false.
76 this%quantities(
charge)%always_available = .
true.
86 class(charged_particles_t),
intent(out) :: this
87 class(charged_particles_t),
intent(in) :: cp_in
92 safe_allocate_source_a(this%charge, cp_in%charge)
99 class(charged_particles_t),
target,
intent(inout) :: this
100 class(interaction_surrogate_t),
intent(inout) :: interaction
104 select type (interaction)
106 call interaction%init(this%space%dim, this%np, this%charge, this%pos)
108 call interaction%init(this%space%dim, this%np, this%charge, this%pos, this%vel, this%namespace)
119 class(charged_particles_t),
intent(inout) :: this
120 integer,
intent(in) :: iq
125 assert(this%quantities(iq)%updated_on_demand)
140 class(charged_particles_t),
intent(in) :: partner
141 class(interaction_surrogate_t),
intent(inout) :: interaction
145 select type (interaction)
147 interaction%partner_np = partner%np
148 safe_allocate(interaction%partner_charge(1:partner%np))
149 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1:partner%np))
152 interaction%partner_np = partner%np
153 interaction%grid_based_partner = .false.
154 safe_allocate(interaction%partner_charge(1:partner%np))
155 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1:partner%np))
156 safe_allocate(interaction%partner_vel(1:partner%space%dim, 1:partner%np))
173 select type (interaction)
175 interaction%partner_charge = partner%charge
176 interaction%partner_pos = partner%pos
179 interaction%partner_charge = partner%charge
180 interaction%partner_pos = partner%pos
181 interaction%partner_vel = partner%vel
198 safe_deallocate_a(this%charge)
subroutine, public charged_particles_copy(this, cp_in)
subroutine, public charged_particles_init_interaction_as_partner(partner, interaction)
subroutine, public charged_particles_update_quantity(this, iq)
subroutine, public charged_particles_init_interaction(this, interaction)
subroutine, public charged_particles_copy_quantities_to_interaction(partner, interaction)
subroutine, public charged_particles_init(this, np)
The init routine is a module level procedure This has the advantage that different classes can have d...
subroutine, public charged_particles_end(this)
subroutine, public classical_particles_init_interaction_as_partner(partner, interaction)
subroutine, public classical_particles_end(this)
subroutine, public classical_particles_init(this, np)
The init routine is a module level procedure This has the advantage that different classes can have d...
subroutine, public classical_particles_copy(this, cp_in)
subroutine, public classical_particles_update_quantity(this, iq)
subroutine, public classical_particles_copy_quantities_to_interaction(partner, interaction)
subroutine, public classical_particles_init_interaction(this, interaction)
real(real64), parameter, public m_zero
integer, parameter, public lorentz_force
integer, parameter, public current_to_mxll_field
integer, parameter, public coulomb_force
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
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.