7 #include "sll_memory.h"
8 #include "sll_working_precision.h"
64 sll_real64,
intent(in) :: dt
67 call this%operatorT(0.5_f64*dt)
68 call this%charge_deposition()
69 call this%field_solver()
70 call this%operatorV(dt)
71 call this%operatorT(0.5_f64*dt)
83 sll_real64,
intent(in) :: dt
88 sll_real64 :: x_new(3), vi(3)
89 sll_real64 :: wi(this%particle_group%n_weights)
92 do i_part=1,this%particle_group%n_particles
93 x_new = this%particle_group%get_x(i_part) + dt * this%particle_group%get_v(i_part)
94 call this%particle_group%set_x(i_part, x_new)
96 if (this%particle_group%n_weights == 3)
then
97 vi = this%particle_group%get_v(i_part)
99 wi = this%particle_group%get_weights(i_part)
100 wi(3) = this%control_variate%update_df_weight( x_new(1:2), vi(1:2), 0.0_f64, wi(1), wi(2))
101 call this%particle_group%set_weights(i_part, wi)
112 sll_real64,
intent(in) :: dt
116 sll_real64 :: v_new(3)
117 sll_real64 :: efield(2)
120 sll_real64 :: wall(3)
124 qm = this%particle_group%species%q_over_m();
125 do i_part=1,this%particle_group%n_particles
127 xi = this%particle_group%get_x(i_part)
128 call this%pic_poisson%evaluate_field_single(xi(1:2), [1,2], efield)
129 v_new = this%particle_group%get_v(i_part)
130 v_new(1:2) = v_new(1:2) + dt * qm * efield
131 call this%particle_group%set_v(i_part, v_new)
134 if (this%particle_group%n_weights == 3)
then
136 wall = this%particle_group%get_weights(i_part)
137 wall(3) = this%control_variate%update_df_weight( xi(1:2), v_new(1:2), 0.0_f64, wall(1), wall(2))
138 call this%particle_group%set_weights(i_part, wall)
155 call this%pic_poisson%reset()
156 do i_part = 1, this%particle_group%n_particles
157 xi = this%particle_group%get_x(i_part)
158 wi = this%particle_group%get_charge(i_part, this%i_weight)
159 call this%pic_poisson%add_charge(xi(1:2), wi)
169 call this%pic_poisson%solve_fields()
185 sll_int32,
optional,
intent(in) :: i_weight
187 this%pic_poisson => pic_poisson
188 this%particle_group => particle_group
191 if(
present(i_weight)) this%i_weight = i_weight
192 if(
present(control_variate)) this%control_variate => control_variate
201 this%pic_poisson => null()
202 this%particle_group => null()
203 this%control_variate => null()
219 sll_int32,
optional,
intent(in) :: i_weight
226 select type( splitting )
228 call splitting%init(pic_poisson, particle_group,
control_variate, i_weight)
Combines values from all processes and distributes the result back to all processes.
type(sll_t_collective_t), pointer, public sll_v_world_collective
Control of subset assignment. Processes with the same color are in the same new communicator.
Particle pusher based on operator splitting for 2d2v Vlasov-Poisson.
subroutine charge_deposition_vp_2d2v(this)
subroutine strang_splitting_pic_vp_2d2v(this, dt)
initializer
subroutine, public sll_s_new_operator_splitting_pic_vp_2d2v(splitting, pic_poisson, particle_group, control_variate, i_weight)
Constructor for abstract type.
subroutine initialize_operator_splitting_pic_vp_2d2v(this, pic_poisson, particle_group, control_variate, i_weight)
Initialization function.
subroutine delete_operator_splitting_pic_vp_2d2v(this)
Destructor.
subroutine field_solver_vp_2d2v(this)
subroutine advection_v_pic_vp_2d2v(this, dt)
subroutine advection_x_pic_vp_2d2v(this, dt)
Push x.
Base class of operator splitting library. It is only used with particle-in-cell method.
Base class for Poisson solver for particle methods.
real(kind=f64) function, dimension(size(particle, 2)) control_variate(particle)
operator splitting object
Operator splitting type for 2d2v Vlasov-Poisson.
Basic type of Poisson solver for PIC simulations.