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_mesh_coupling_spline_strong_1d Module Reference

Description

Kernel smoother for 1d with splines of arbitrary degree placed on a uniform mesh. This version is for a formulation of the Maxwell's equation with strong Ampere.

Author
Katharina Kormann, IPP

Spline with index i starts at point i Reference: Campos Pinto, Kormann, Sonnendrücker: Variational Framework for Structure-Preserving Electromagnetic Particle-In-Cell Methods, arXiv 2101.09247, 2021.

Derived types and interfaces

type  sll_t_particle_mesh_coupling_spline_strong_1d
 Basic type of a kernel smoother used for PIC simulations. More...
 

Functions/Subroutines

subroutine helper_normalized_position (self, position, index, axi)
 
subroutine add_charge_single_spline_strong_1d (self, position, marker_charge, rho_dofs)
 Add charge of one particle. More...
 
subroutine add_current_update_v_spline_strong_1d_quadrature (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs)
 Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting). Implementation based on quadrature rather than the primitive. More...
 
subroutine current_v_local (self, upper, lower, box, marker_charge, qoverm, vi, j_dofs, bfield_dofs)
 
subroutine add_current_update_v_spline_strong_1d (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs)
 Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting) More...
 
subroutine evaluate_field_single_spline_strong_1d (self, position, field_dofs, field_value)
 
subroutine add_current_evaluate_spline_strong_1d_quadrature (self, position_old, position_new, marker_charge, vbar, field_dofs, j_dofs, field)
 Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting). Implementation based on quadrature rather than the primitive. More...
 
subroutine current_eval_local (self, upper, lower, box, marker_charge, field, j_dofs, field_dofs)
 
subroutine add_current_evaluate_spline_strong_1d (self, position_old, position_new, marker_charge, vbar, field_dofs, j_dofs, field)
 
subroutine init_spline_strong_1d (self, domain, n_cells, spline_degree, integ, eval_grid_points)
 Constructor. More...
 
subroutine free_spline_strong_1d (self)
 Destructor. More...
 
subroutine add_particle_mass_spline_strong_1d (self, position, marker_charge, particle_mass)
 Add charge of one particle. More...
 
subroutine evaluate_multiple_spline_strong_1d (self, position, components, field_dofs, field_value)
 Evaluate several fields at position position. More...
 
subroutine evaluate_field_single_spline_strong_pp_1d (self, position, field_dofs_pp, field_value)
 
subroutine add_current_spline_strong_1d (self, position_old, position_new, marker_charge, j_dofs)
 Add current with integration over x. More...
 
subroutine add_current_update_v_pp_spline_strong_1d (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs)
 Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting) More...
 
subroutine, public sll_s_new_particle_mesh_coupling_spline_strong_1d (smoother, domain, n_cells, spline_degree, integ, eval_grid_points)
 

Function/Subroutine Documentation

◆ add_charge_single_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_charge_single_spline_strong_1d ( class( sll_t_particle_mesh_coupling_spline_strong_1d ), intent(inout)  self,
dimension(self%dim), intent(in)  position,
intent(in)  marker_charge,
dimension(self%n_dofs), intent(inout)  rho_dofs 
)
private

Add charge of one particle.

Parameters
[in,out]selfkernel smoother object

Definition at line 128 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ add_current_evaluate_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_evaluate_spline_strong_1d ( class( sll_t_particle_mesh_coupling_spline_strong_1d ), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
intent(in)  vbar,
dimension(self%n_dofs), intent(in)  field_dofs,
dimension(self%n_dofs), intent(inout)  j_dofs,
intent(out)  field 
)
private
Parameters
[in,out]selfkernel smoother object

Definition at line 480 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ add_current_evaluate_spline_strong_1d_quadrature()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_evaluate_spline_strong_1d_quadrature ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
intent(in)  vbar,
dimension(self%n_dofs), intent(in)  field_dofs,
dimension(self%n_dofs), intent(inout)  j_dofs,
intent(out)  field 
)
private

Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting). Implementation based on quadrature rather than the primitive.

Parameters
[in,out]selfkernel smoother object

Definition at line 392 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ add_current_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_spline_strong_1d ( class( sll_t_particle_mesh_coupling_spline_strong_1d ), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
dimension(self%n_dofs), intent(inout)  j_dofs 
)
private

Add current with integration over x.

Parameters
[in,out]selfkernel smoother object

Definition at line 745 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

◆ add_current_update_v_pp_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_update_v_pp_spline_strong_1d ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
intent(in)  qoverm,
dimension(self%n_dofs), intent(in)  bfield_dofs,
dimension(:), intent(inout)  vi,
dimension(self%n_dofs), intent(inout)  j_dofs 
)
private

Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting)

Parameters
[in,out]selfkernel smoother object

Definition at line 758 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

◆ add_current_update_v_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_update_v_spline_strong_1d ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
intent(in)  qoverm,
dimension(:), intent(in)  bfield_dofs,
dimension(:), intent(inout)  vi,
dimension(:), intent(inout)  j_dofs 
)
private

Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting)

Parameters
[in,out]selfkernel smoother object

Definition at line 255 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ add_current_update_v_spline_strong_1d_quadrature()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_current_update_v_spline_strong_1d_quadrature ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position_old,
dimension(self%dim), intent(in)  position_new,
intent(in)  marker_charge,
intent(in)  qoverm,
dimension(:), intent(in)  bfield_dofs,
dimension(:), intent(inout)  vi,
dimension(:), intent(inout)  j_dofs 
)
private

Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting). Implementation based on quadrature rather than the primitive.

Parameters
[in,out]selfkernel smoother object

Definition at line 171 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ add_particle_mass_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::add_particle_mass_spline_strong_1d ( class( sll_t_particle_mesh_coupling_spline_strong_1d ), intent(inout)  self,
dimension(self%dim), intent(in)  position,
intent(in)  marker_charge,
dimension(:,:), intent(inout)  particle_mass 
)
private

Add charge of one particle.

Parameters
[in,out]selfkernel smoother object

Definition at line 708 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

◆ current_eval_local()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::current_eval_local ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
intent(in)  upper,
intent(in)  lower,
intent(in)  box,
intent(in)  marker_charge,
intent(inout)  field,
dimension(self%n_dofs), intent(inout)  j_dofs,
dimension(self%n_dofs), intent(in)  field_dofs 
)
private
Parameters
[in,out]selftime splitting object

Definition at line 434 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the caller graph for this function:

◆ current_v_local()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::current_v_local ( class(sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
intent(in)  upper,
intent(in)  lower,
intent(in)  box,
intent(in)  marker_charge,
intent(in)  qoverm,
intent(inout)  vi,
dimension(self%n_dofs), intent(inout)  j_dofs,
dimension(self%n_dofs), intent(in)  bfield_dofs 
)
private
Parameters
[in,out]selftime splitting object

Definition at line 209 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the caller graph for this function:

◆ evaluate_field_single_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::evaluate_field_single_spline_strong_1d ( class (sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position,
dimension(self%n_dofs), intent(in)  field_dofs,
intent(out)  field_value 
)
private
Parameters
[in,out]selfKernel smoother object

Definition at line 343 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ evaluate_field_single_spline_strong_pp_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::evaluate_field_single_spline_strong_pp_1d ( class (sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position,
dimension(:,:), intent(in)  field_dofs_pp,
intent(out)  field_value 
)
private
Parameters
[in,out]selfKernel smoother object

Definition at line 733 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

◆ evaluate_multiple_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::evaluate_multiple_spline_strong_1d ( class (sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(self%dim), intent(in)  position,
dimension(:), intent(in)  components,
dimension(:,:), intent(in)  field_dofs,
dimension(:), intent(out)  field_value 
)
private

Evaluate several fields at position position.

Parameters
[in,out]selfKernel smoother object

Definition at line 721 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

◆ free_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::free_spline_strong_1d ( class (sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self)
private

Destructor.

Parameters
[in,out]selfParticle mesh coupling object

Definition at line 688 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ helper_normalized_position()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::helper_normalized_position ( class( sll_t_particle_mesh_coupling_spline_strong_1d ), intent(inout)  self,
dimension(self%dim), intent(in)  position,
intent(out)  index,
dimension(self%dim), intent(out)  axi 
)
private
Parameters
[in,out]selfkernel smoother object

Definition at line 82 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the caller graph for this function:

◆ init_spline_strong_1d()

subroutine sll_m_particle_mesh_coupling_spline_strong_1d::init_spline_strong_1d ( class (sll_t_particle_mesh_coupling_spline_strong_1d), intent(inout)  self,
dimension(2), intent(in)  domain,
intent(in)  n_cells,
intent(in)  spline_degree,
logical, intent(in)  integ,
logical, intent(in)  eval_grid_points 
)
private

Constructor.

Parameters
[in,out]selfParticle mesh coupling object

Now, we have to check the various options If we evaluate the integral, we use the following formula int_{x_i-h}^{x_i} N_{x_p}^{p-1}(x) d x = N_{x_p}^p (x_i - h/2) (Note that if we have the formula for N_j instead of N_{x_p} we evaluate at the upper bound but N_j^{p-1} and N_j^{p} start at the same point, i.e. the center is shifted by -h/2 which here appears in the argument instead). Hence, we need to evaluate at the grid point i instead of the midpoint i and at the mid point i-1 instead of the grid point i if we evaluate the integral. Now we compute the index shift that we have in each case from the index i we the particle is located. Note that in the case of eval_same = .false. the shift depends on whether the particle is located in the first or second half of the cell. The index shift is for the case that it is in the first half. Otherwise, we have to add one.

Definition at line 562 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

Here is the call graph for this function:

◆ sll_s_new_particle_mesh_coupling_spline_strong_1d()

subroutine, public sll_m_particle_mesh_coupling_spline_strong_1d::sll_s_new_particle_mesh_coupling_spline_strong_1d ( class( sll_c_particle_mesh_coupling_1d), intent(out), allocatable  smoother,
dimension(2), intent(in)  domain,
intent(in)  n_cells,
intent(in)  spline_degree,
logical, intent(in)  integ,
logical, intent(in)  eval_grid_points 
)
Parameters
[out]smootherkernel smoother object

Definition at line 775 of file sll_m_particle_mesh_coupling_spline_strong_1d.F90.

    Report Typos and Errors