Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines
sll_m_particle_group_1d2v Module Reference

Description

Simple particle group type for 1d2v.

Author
Katharina Kormann, IPP

...

Derived types and interfaces

type  sll_t_particle_group_1d2v
 Simple version of a PIC particle group in 1d2v. More...
 

Functions/Subroutines

subroutine delete_particle_group_1d2v (self)
 Destructor. More...
 
subroutine initialize_particle_group_1d2v (self, n_particles, n_total_particles, charge, mass, n_weights)
 Initialization of the particle group. More...
 
subroutine, public sll_s_new_particle_group_1d2v_ptr (particle_group, n_particles, n_total_particles, charge, mass, n_weights)
 Constructor for pointer. More...
 
subroutine, public sll_s_new_particle_group_1d2v (particle_group, n_particles, n_total_particles, charge, mass, n_weights)
 Constructor for allocatable. More...
 
pure real(kind=f64) function, dimension(3) get_x_1d2v (self, i)
 Get position. More...
 
pure real(kind=f64) function, dimension(3) get_v_1d2v (self, i)
 Get velocities. More...
 
pure real(kind=f64) function get_charge_1d2v (self, i, i_weight)
 Get charge of particle (q * particle_weight) More...
 
pure real(kind=f64) function get_mass_1d2v (self, i, i_weight)
 Get mass of particle (m * particle_weight) More...
 
pure real(kind=f64) function, dimension(self%n_weights) get_weights_1d2v (self, i)
 Get particle weights. More...
 
pure real(kind=f64) function get_common_weight_1d2v (self)
 Set the common weight. More...
 
subroutine set_x_1d2v (self, i, x)
 Set position of particle i. More...
 
subroutine set_v_1d2v (self, i, x)
 Set velocity of particle i. More...
 
subroutine set_weight_1d2v (self, i, x)
 Set weights of particle i. More...
 
subroutine set_common_weight_1d2v (self, x)
 Set the common weight. More...
 
subroutine print_particle_group_1d2v (self, filename)
 Print particle array to file. More...
 
subroutine read_particle_group_1d2v (self, filename)
 Read particle array from file. More...
 

Function/Subroutine Documentation

◆ delete_particle_group_1d2v()

subroutine sll_m_particle_group_1d2v::delete_particle_group_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self)
private

Destructor.

Parameters
[in,out]selfparticle group

Definition at line 62 of file sll_m_particle_group_1d2v.F90.

◆ get_charge_1d2v()

pure real(kind=f64) function sll_m_particle_group_1d2v::get_charge_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
integer(kind=i32), intent(in)  i,
integer(kind=i32), intent(in), optional  i_weight 
)
private

Get charge of particle (q * particle_weight)

Parameters
[in]selfparticle group
[in]ino. of the particle
[in]i_weightindex of weight to be used (default: 1)
Returns
charges(s) of particle i

Definition at line 185 of file sll_m_particle_group_1d2v.F90.

◆ get_common_weight_1d2v()

pure real(kind=f64) function sll_m_particle_group_1d2v::get_common_weight_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self)
private

Set the common weight.

Parameters
[in]selfparticle group
Returns
common weight

Definition at line 229 of file sll_m_particle_group_1d2v.F90.

◆ get_mass_1d2v()

pure real(kind=f64) function sll_m_particle_group_1d2v::get_mass_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
integer(kind=i32), intent(in)  i,
integer(kind=i32), intent(in), optional  i_weight 
)
private

Get mass of particle (m * particle_weight)

Parameters
[in]selfparticle group
[in]ino. of the particle
[in]i_weightindex of weight to be used (default: 1)
Returns
masses(s) of particle i

Definition at line 202 of file sll_m_particle_group_1d2v.F90.

◆ get_v_1d2v()

pure real(kind=f64) function, dimension(3) sll_m_particle_group_1d2v::get_v_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
integer(kind=i32), intent(in)  i 
)
private

Get velocities.

Parameters
[in]selfparticle group
[in]ino. of the particle

Definition at line 172 of file sll_m_particle_group_1d2v.F90.

◆ get_weights_1d2v()

pure real(kind=f64) function, dimension(self%n_weights) sll_m_particle_group_1d2v::get_weights_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
integer(kind=i32), intent(in)  i 
)
private

Get particle weights.

Parameters
[in]selfparticle group
[in]ino. of the particle
Returns
weight(s) of particle i

Definition at line 218 of file sll_m_particle_group_1d2v.F90.

◆ get_x_1d2v()

pure real(kind=f64) function, dimension(3) sll_m_particle_group_1d2v::get_x_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
integer(kind=i32), intent(in)  i 
)
private

Get position.

Parameters
[in]selfparticle group
[in]ino. of the particle
Returns
position of particle i

Definition at line 160 of file sll_m_particle_group_1d2v.F90.

◆ initialize_particle_group_1d2v()

subroutine sll_m_particle_group_1d2v::initialize_particle_group_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
integer(kind=i32), intent(in)  n_particles,
integer(kind=i32), intent(in)  n_total_particles,
real(kind=f64), intent(in)  charge,
real(kind=f64), intent(in)  mass,
integer(kind=i32), intent(in)  n_weights 
)
private

Initialization of the particle group.

Parameters
[in,out]selfparticle group
[in]n_particlesnumber of particles local to the processor
[in]n_total_particlesnumber of particles in total simulation
[in]chargecharge of the particle species
[in]massmass of the particle species(self, n_particles)
[in]n_weightsnumber of weights

Definition at line 71 of file sll_m_particle_group_1d2v.F90.

◆ print_particle_group_1d2v()

subroutine sll_m_particle_group_1d2v::print_particle_group_1d2v ( class( sll_t_particle_group_1d2v ), intent(in)  self,
character(len=*), intent(in)  filename 
)
private

Print particle array to file.

Parameters
[in]selfparticle group
[in]filenamename of output file

Definition at line 284 of file sll_m_particle_group_1d2v.F90.

◆ read_particle_group_1d2v()

subroutine sll_m_particle_group_1d2v::read_particle_group_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
character(len=*), intent(in)  filename 
)
private

Read particle array from file.

Parameters
[in,out]selfparticle group
[in]filenamename of output file

Definition at line 324 of file sll_m_particle_group_1d2v.F90.

◆ set_common_weight_1d2v()

subroutine sll_m_particle_group_1d2v::set_common_weight_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
real(kind=f64), intent(in)  x 
)
private

Set the common weight.

Parameters
[in,out]selfparticle group
[in]xcommon weight

Definition at line 273 of file sll_m_particle_group_1d2v.F90.

◆ set_v_1d2v()

subroutine sll_m_particle_group_1d2v::set_v_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
integer(kind=i32), intent(in)  i,
real(kind=f64), dimension(3), intent(in)  x 
)
private

Set velocity of particle i.

Parameters
[in,out]selfparticle group
[in]ino. of the particle
[in]xfirst two components hold the values of the velocity to be set

Definition at line 250 of file sll_m_particle_group_1d2v.F90.

◆ set_weight_1d2v()

subroutine sll_m_particle_group_1d2v::set_weight_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
integer(kind=i32), intent(in)  i,
real(kind=f64), dimension(self%n_weights), intent(in)  x 
)
private

Set weights of particle i.

Parameters
[in,out]selfparticle group
[in]ino. of the particle
[in]xparticle weight(s)

Definition at line 261 of file sll_m_particle_group_1d2v.F90.

◆ set_x_1d2v()

subroutine sll_m_particle_group_1d2v::set_x_1d2v ( class( sll_t_particle_group_1d2v ), intent(inout)  self,
integer(kind=i32), intent(in)  i,
real(kind=f64), dimension(3), intent(in)  x 
)
private

Set position of particle i.

Parameters
[in,out]selfparticle group
[in]ino. of the particle
[in]xfirst component holds the value of the position to be set

Definition at line 239 of file sll_m_particle_group_1d2v.F90.

◆ sll_s_new_particle_group_1d2v()

subroutine, public sll_m_particle_group_1d2v::sll_s_new_particle_group_1d2v ( class( sll_c_particle_group_base ), intent(out), allocatable  particle_group,
integer(kind=i32), intent(in)  n_particles,
integer(kind=i32), intent(in)  n_total_particles,
real(kind=f64), intent(in)  charge,
real(kind=f64), intent(in)  mass,
integer(kind=i32), intent(in)  n_weights 
)

Constructor for allocatable.

Parameters
[out]particle_groupabstract particle group
[in]n_particlesnumber of particles local to the processor
[in]n_total_particlesnumber of particles in total simulation
[in]chargecharge of the particle species
[in]massmass of the particle species
[in]n_weightsnumber of weights

Definition at line 132 of file sll_m_particle_group_1d2v.F90.

◆ sll_s_new_particle_group_1d2v_ptr()

subroutine, public sll_m_particle_group_1d2v::sll_s_new_particle_group_1d2v_ptr ( class( sll_c_particle_group_base ), intent(out), pointer  particle_group,
integer(kind=i32), intent(in)  n_particles,
integer(kind=i32), intent(in)  n_total_particles,
real(kind=f64), intent(in)  charge,
real(kind=f64), intent(in)  mass,
integer(kind=i32), intent(in)  n_weights 
)

Constructor for pointer.

Parameters
[out]particle_groupabstract particle group
[in]n_particlesnumber of particles local to the processor
[in]n_total_particlesnumber of particles in total simulation
[in]chargecharge of the particle species
[in]massmass of the particle species
[in]n_weightsnumber of weights

Definition at line 104 of file sll_m_particle_group_1d2v.F90.

    Report Typos and Errors