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 call this%quantities%add(
quantity_t(
"charge", updated_on_demand = .false., always_available = .
true.))
85 class(charged_particles_t),
intent(out) :: this
86 class(charged_particles_t),
intent(in) :: cp_in
91 safe_allocate_source_a(this%charge, cp_in%charge)
98 class(charged_particles_t),
target,
intent(inout) :: this
99 class(interaction_surrogate_t),
intent(inout) :: interaction
103 select type (interaction)
105 call interaction%init(this%space%dim, this%np, this%charge, this%pos)
107 call interaction%init(this%space%dim, this%np, this%charge, this%pos, this%vel, this%namespace)
118 class(charged_particles_t),
intent(inout) :: this
119 character(len=*),
intent(in) :: label
136 class(charged_particles_t),
intent(in) :: partner
137 class(interaction_surrogate_t),
intent(inout) :: interaction
141 select type (interaction)
143 interaction%partner_np = partner%np
144 safe_allocate(interaction%partner_charge(1:partner%np))
145 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1:partner%np))
148 interaction%partner_np = partner%np
149 interaction%grid_based_partner = .false.
150 safe_allocate(interaction%partner_charge(1:partner%np))
151 safe_allocate(interaction%partner_pos(1:partner%space%dim, 1:partner%np))
152 safe_allocate(interaction%partner_vel(1:partner%space%dim, 1:partner%np))
169 select type (interaction)
171 interaction%partner_charge = partner%charge
172 interaction%partner_pos = partner%pos
175 interaction%partner_charge = partner%charge
176 interaction%partner_pos = partner%pos
177 interaction%partner_vel = partner%vel
194 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, label)
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_update_quantity(this, label)
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_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...
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.
Systems (system_t) can expose quantities that can be used to calculate interactions with other system...