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

Description

Kernel smoother for 2d with splines of arbitrary degree placed on a uniform mesh.

Author
Katharina Kormann, IPP

Spline with index i starts at point i

Derived types and interfaces

type  sll_t_particle_mesh_coupling_spline_2d
 Spline kernel smoother in 2d. More...
 

Functions/Subroutines

subroutine compute_shape_factor_spline_2d (self, position, indices)
 Helper function computing shape factor. More...
 
subroutine add_charge_single_spline_pp_2d (self, position, marker_charge, rho_dofs)
 Add charge of single particle. More...
 
subroutine add_charge_single_spline_2d (self, position, marker_charge, rho_dofs)
 Add charge of single particle. More...
 
subroutine add_current_spline_2d (self, position_old, position_new, marker_charge, j_dofs)
 Add current with integration over x. More...
 
subroutine add_current_evaluate_spline_2d (self, position_old, position_new, marker_charge, vbar, field_dofs, j_dofs, field)
 Add current with integration over x. More...
 
subroutine add_current_update_v_spline_2d (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs)
 Add current and update v for single particle. More...
 
subroutine add_particle_mass_spline_2d (self, position, marker_charge, particle_mass)
 
subroutine add_current_update_v_spline_pp_2d (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs)
 Add current and update v for single particle. More...
 
subroutine evaluate_field_single_spline_pp_2d (self, position, field_dofs_pp, field_value)
 Evaluate field at at position position using horner scheme. More...
 
subroutine evaluate_field_single_spline_2d (self, position, field_dofs, field_value)
 Evaluate field with given dofs at position position. More...
 
subroutine evaluate_multiple_spline_2d (self, position, components, field_dofs, field_value)
 Evaluate multiple fields at position position. More...
 
subroutine free_spline_2d (self)
 Destructor. More...
 
subroutine init_spline_2d (self, domain, n_grid, no_particles, spline_degree, smoothing_type)
 
subroutine, public sll_s_new_particle_mesh_coupling_spline_2d_ptr (smoother, domain, n_grid, no_particles, spline_degree, smoothing_type)
 Constructor for abstract type (pointer) More...
 
subroutine, public sll_s_new_particle_mesh_coupling_spline_2d (smoother, domain, n_grid, no_particles, spline_degree, smoothing_type)
 Constructor for abstract type (allocatable) More...
 
integer(kind=i32) function index_1dto2d_column_major (self, index1d)
 

Function/Subroutine Documentation

◆ add_charge_single_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_charge_single_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), dimension(self%n_dofs ), intent(inout)  rho_dofs 
)
private

Add charge of single particle.

Parameters
[in,out]selfkernel smoother object
[in]positionParticle position
[in]marker_chargeParticle weight times charge
[in,out]rho_dofsspline coefficient of accumulated density

Definition at line 133 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ add_charge_single_spline_pp_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_charge_single_spline_pp_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), dimension(self%n_dofs ), intent(inout)  rho_dofs 
)
private

Add charge of single particle.

Parameters
[in,out]selfkernel smoother object
[in]positionParticle position
[in]marker_chargeParticle weight times charge
[in,out]rho_dofsspline coefficient of accumulated density

Definition at line 99 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ add_current_evaluate_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_current_evaluate_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d ), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position_old,
real(kind=f64), dimension(self%dim), intent(in)  position_new,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), intent(in)  vbar,
real(kind=f64), dimension(self%n_dofs), intent(in)  field_dofs,
real(kind=f64), dimension(self%n_dofs), intent(inout)  j_dofs,
real(kind=f64), intent(out)  field 
)
private

Add current with integration over x.

Parameters
[in,out]selfkernel smoother object
[in]position_oldPosition of the particle
[in]position_newPosition of the particle
[in]marker_chargeParticle weight times charge
[in]vbarParticle weights time charge
[in]field_dofsCoefficient vector of the current density
[in,out]j_dofsCoefficient vector of the charge distribution
[out]fieldEfield

Definition at line 176 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ add_current_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_current_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d ), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position_old,
real(kind=f64), dimension(self%dim), intent(in)  position_new,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), dimension(self%n_dofs), intent(inout)  j_dofs 
)
private

Add current with integration over x.

Parameters
[in,out]selfkernel smoother object
[in]position_oldPosition of the particle
[in]position_newPosition of the particle
[in]marker_chargeParticle weights time charge
[in,out]j_dofsCoefficient vector of the current density

Definition at line 161 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ add_current_update_v_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_current_update_v_spline_2d ( class(sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position_old,
real(kind=f64), dimension(self%dim), intent(in)  position_new,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), intent(in)  qoverm,
real(kind=f64), dimension(:), intent(in)  bfield_dofs,
real(kind=f64), dimension(:), intent(inout)  vi,
real(kind=f64), dimension(:), intent(inout)  j_dofs 
)
private

Add current and update v for single particle.

Parameters
[in,out]selfkernel smoother object
[in]position_oldPosition at time t
[in]position_newPosition at time t+\Delta t
[in]marker_chargeParticle weight time charge
[in]qovermCharge over mass ratio
[in]bfield_dofsCoefficient of B-field expansion
[in,out]viVelocity of the particle
[in,out]j_dofsCoefficient of current expansion

Definition at line 192 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ add_current_update_v_spline_pp_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_current_update_v_spline_pp_2d ( class(sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position_old,
real(kind=f64), dimension(self%dim), intent(in)  position_new,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), intent(in)  qoverm,
real(kind=f64), dimension(:), intent(in)  bfield_dofs,
real(kind=f64), dimension(:), intent(inout)  vi,
real(kind=f64), dimension(:), intent(inout)  j_dofs 
)
private

Add current and update v for single particle.

Parameters
[in,out]selfkernel smoother object
[in]position_oldPosition at time t
[in]position_newPosition at time t+\Delta t
[in]marker_chargeParticle weight time charge
[in]qovermCharge over mass ratio
[in]bfield_dofsCoefficient of B-field expansion
[in,out]viVelocity of the particle
[in,out]j_dofsCoefficient of current expansion

Definition at line 220 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ add_particle_mass_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::add_particle_mass_spline_2d ( class (sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), dimension(:,:), intent(inout)  particle_mass 
)
private
Parameters
[in,out]selfKernel smoother object
[in]positionPosition of the particle
[in]marker_chargeParticle weight times charge
[in,out]particle_massCoefficient vector of the charge distribution

Definition at line 207 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ compute_shape_factor_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::compute_shape_factor_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(2), intent(in)  position,
integer(kind=i32), dimension(2), intent(out)  indices 
)
private

Helper function computing shape factor.

Parameters
[in,out]selfkernel smoother object

Definition at line 76 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the caller graph for this function:

◆ evaluate_field_single_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::evaluate_field_single_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
real(kind=f64), dimension(self%n_dofs), intent(in)  field_dofs,
real(kind=f64), intent(out)  field_value 
)
private

Evaluate field with given dofs at position position.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition where to evaluate
[in]field_dofsDegrees of freedom in kernel representation.
[out]field_valueValue of the field

Definition at line 300 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ evaluate_field_single_spline_pp_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::evaluate_field_single_spline_pp_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
real(kind=f64), dimension(:,:), intent(in)  field_dofs_pp,
real(kind=f64), intent(out)  field_value 
)
private

Evaluate field at at position position using horner scheme.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition where to evaluate
[in]field_dofs_ppDegrees of freedom in kernel representation.
[out]field_valueValue of the field

Definition at line 279 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ evaluate_multiple_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::evaluate_multiple_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self,
real(kind=f64), dimension(self%dim), intent(in)  position,
integer(kind=i32), dimension(:), intent(in)  components,
real(kind=f64), dimension(:,:), intent(in)  field_dofs,
real(kind=f64), dimension(:), intent(out)  field_value 
)
private

Evaluate multiple fields at position position.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition where to evaluate
[in]componentsComponents of the field that shall be evaluated
[in]field_dofsDegrees of freedom in kernel representation.
[out]field_valueValue of the field

Definition at line 332 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ free_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::free_spline_2d ( class (sll_t_particle_mesh_coupling_spline_2d), intent(inout)  self)
private

Destructor.

Parameters
[in,out]selfKernel smoother object

Definition at line 365 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ index_1dto2d_column_major()

integer(kind=i32) function sll_m_particle_mesh_coupling_spline_2d::index_1dto2d_column_major ( class( sll_t_particle_mesh_coupling_spline_2d), intent(in)  self,
integer(kind=i32), dimension(2), intent(inout)  index1d 
)
private
Parameters
[in]selfKernel smoother object.
[in,out]index1d2d array with indices along each of the two directions (start counting with zero).
Returns
Corresponding index in 1d array representing 2d data (start counting with one).

Definition at line 464 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the caller graph for this function:

◆ init_spline_2d()

subroutine sll_m_particle_mesh_coupling_spline_2d::init_spline_2d ( class( sll_t_particle_mesh_coupling_spline_2d), intent(out)  self,
real(kind=f64), dimension(2,2), intent(in)  domain,
integer(kind=i32), dimension(2), intent(in)  n_grid,
integer(kind=i32), intent(in)  no_particles,
integer(kind=i32), intent(in)  spline_degree,
integer(kind=i32), intent(in)  smoothing_type 
)
private
Parameters
[in]n_gridno. of spline coefficients
[in]domainlower and upper bounds of the domain
[in]no_particlesno. of particles
[in]spline_degreeDegree of smoothing kernel spline
[in]smoothing_typeDefine if Galerkin or collocation smoothing for right scaling in accumulation routines

Definition at line 377 of file sll_m_particle_mesh_coupling_spline_2d.F90.

Here is the call graph for this function:

◆ sll_s_new_particle_mesh_coupling_spline_2d()

subroutine, public sll_m_particle_mesh_coupling_spline_2d::sll_s_new_particle_mesh_coupling_spline_2d ( class( sll_c_particle_mesh_coupling_1d), intent(out), allocatable  smoother,
real(kind=f64), dimension(2,2), intent(in)  domain,
integer(kind=i32), dimension(2), intent(in)  n_grid,
integer(kind=i32), intent(in)  no_particles,
integer(kind=i32), intent(in)  spline_degree,
integer(kind=i32), intent(in)  smoothing_type 
)

Constructor for abstract type (allocatable)

Parameters
[out]smootherkernel smoother object
[in]n_gridno. of spline coefficients
[in]domainlower and upper bounds of the domain
[in]no_particlesno. of particles
[in]spline_degreeDegree of smoothing kernel spline
[in]smoothing_typeDefine if Galerkin or collocation smoothing for right scaling in accumulation routines

Definition at line 442 of file sll_m_particle_mesh_coupling_spline_2d.F90.

◆ sll_s_new_particle_mesh_coupling_spline_2d_ptr()

subroutine, public sll_m_particle_mesh_coupling_spline_2d::sll_s_new_particle_mesh_coupling_spline_2d_ptr ( class( sll_c_particle_mesh_coupling_1d), intent(out), pointer  smoother,
real(kind=f64), dimension(2,2), intent(in)  domain,
integer(kind=i32), dimension(2), intent(in)  n_grid,
integer(kind=i32), intent(in)  no_particles,
integer(kind=i32), intent(in)  spline_degree,
integer(kind=i32), intent(in)  smoothing_type 
)

Constructor for abstract type (pointer)

Parameters
[in]n_gridno. of spline coefficients
[in]domainlower and upper bounds of the domain
[in]no_particlesno. of particles
[in]spline_degreeDegree of smoothing kernel spline
[in]smoothing_typeDefine if Galerkin or collocation smoothing for right scaling in accumulation routines

Definition at line 421 of file sll_m_particle_mesh_coupling_spline_2d.F90.

    Report Typos and Errors