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

Description

Particle mesh coupling for 3d with splines of arbitrary degree placed on a uniform tensor product mesh.

Author
Benedikt Perse, IPP

Spline with index i starts at point i

Derived types and interfaces

type  sll_t_particle_mesh_coupling_spline_cl_3d_feec
 Particle mesh coupling in 3d based on (arbitrary degree) spline on a tensor product uniform mesh. More...
 
type  vector
 Destructor. More...
 

Functions/Subroutines

subroutine add_charge_single_spline_cl_3d_feec (self, position, marker_charge, degree, rho_dofs)
 Add charge of one particle. More...
 
subroutine add_particle_mass_spline_cl_3d_feec (self, position, marker_charge, degree, particle_mass)
 Add the contribution of one particle to the diagonal parts fo the approximate mass matrix. More...
 
subroutine add_particle_mass_od_spline_cl_3d_feec (self, position, marker_charge, degree1, degree2, particle_mass)
 Add the contribution of one particle to the off-diagonal parts of the approximate mass matrix. More...
 
subroutine evaluate_field_single_spline_cl_3d_feec (self, position, degree, field_dofs, field_value)
 Evaluate field at at position position. More...
 
subroutine evaluate_multiple_spline_cl_3d_feec (self, position, components, field_dofs, field_value)
 Evaluate several fields at position position. More...
 
subroutine add_current_evaluate (self, position_old, position_new, xdot, efield_dofs, j_dofs, efield_val)
 Add current with integration over x and evaluate the electric field. More...
 
subroutine point_add_eval (self, box_in, xbox, field_dofs, weight, j_dofs, field_value)
 Helper function for add_current_evaluate. More...
 
subroutine add_current_cl_3d (self, position_old, position_new, xdot, j_dofs)
 Add current with integration over x. More...
 
subroutine integrate_spline_cl_3d (self, box_in, xbox, weight, j_dofs)
 Helper function for add_current. More...
 
subroutine add_current_update_v_component1_spline_3d_feec (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 add_current_update_v_component2_spline_3d_feec (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 add_current_update_v_component3_spline_3d_feec (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 add_current_1d (self, component, r_old, index_old, r_new, index_new, marker_charge, bfield_dofs, start1, start2, stride, vi, j_dofs)
 Helper function for add_current_update_v. More...
 
subroutine update_jv (self, component, lower, upper, index, marker_charge, sign, bfield_dofs, start1, start2, stride, vi, j_dofs)
 Helper function for add_current_update_v. More...
 
integer(kind=i32) function convert_index_3d_to_1d (index3d, n_cells, degree)
 
subroutine convert_x_to_xbox (self, position, xi, box)
 
subroutine convert_x_to_xbox_1d (self, component, position, xi, box)
 
subroutine box_index (self, box, comp)
 
subroutine, public sll_s_uniform_bsplines_eval_basis_clamped (spline, n_cells, degree, xi, box, spline_val)
 Helper function to evaluate uniform clamped basis splines. More...
 
subroutine init_spline_cl_3d_feec (self, n_cells, domain, spline_degree, boundary, no_particles)
 Initializer. More...
 
subroutine free_spline_cl_3d_feec (self)
 Finalizer. More...
 

Function/Subroutine Documentation

◆ add_charge_single_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_charge_single_spline_cl_3d_feec ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
integer(kind=i32), dimension(3), intent(in)  degree,
real(kind=f64), dimension(:), intent(inout)  rho_dofs 
)
private

Add charge of one particle.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition of the particle
[in]marker_chargeParticle weights time charge
[in]degreeSpline degree along each dimension
[in,out]rho_dofsCoefficient vector of the charge distribution

Definition at line 98 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_current_1d()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_1d ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
integer(kind=i32), intent(in)  component,
real(kind=f64), intent(in)  r_old,
integer(kind=i32), intent(in)  index_old,
real(kind=f64), intent(in)  r_new,
integer(kind=i32), intent(in)  index_new,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), dimension(self%n_total0+self%n_total1*2), intent(in)  bfield_dofs,
integer(kind=i32), intent(in)  start1,
integer(kind=i32), intent(in)  start2,
integer(kind=i32), dimension(2), intent(in)  stride,
real(kind=f64), dimension(2), intent(inout)  vi,
real(kind=f64), dimension(:), intent(inout)  j_dofs 
)
private

Helper function for add_current_update_v.

Parameters
[in,out]selfkernel smoother object

Definition at line 970 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_current_cl_3d()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_cl_3d ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position_old,
real(kind=f64), dimension(3), intent(in)  position_new,
real(kind=f64), dimension(3), intent(in)  xdot,
real(kind=f64), dimension(:), 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]xdotvelocity
[in,out]j_dofscurrent dofs

Definition at line 543 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_current_evaluate()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_evaluate ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position_old,
real(kind=f64), dimension(3), intent(in)  position_new,
real(kind=f64), dimension(3), intent(in)  xdot,
real(kind=f64), dimension(:), intent(in)  efield_dofs,
real(kind=f64), dimension(:), intent(inout)  j_dofs,
real(kind=f64), dimension(3), intent(out)  efield_val 
)
private

Add current with integration over x and evaluate the electric field.

Parameters
[in,out]selfkernel smoother object
[in]position_oldPosition of the particle
[in]position_newPosition of the particle
[in]xdotvelocity
[in]efield_dofselectric field dofs
[in,out]j_dofscurrent dofs
[out]efield_valelectric field value

Definition at line 361 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_current_update_v_component1_spline_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_update_v_component1_spline_3d_feec ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position_old,
real(kind=f64), 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(3), intent(inout)  vi,
real(kind=f64), 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
[in]position_oldPosition at time t
[in]position_newPosition at time t + \Delta t
[in]marker_chargeParticle weight time charge
[in]qovermcharge to mass ration
[in]bfield_dofsCoefficient of B-field expansion
[in,out]viVelocity of the particles
[in,out]j_dofsCoefficients of current expansion

Definition at line 702 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_current_update_v_component2_spline_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_update_v_component2_spline_3d_feec ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position_old,
real(kind=f64), 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(3), intent(inout)  vi,
real(kind=f64), 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
[in]position_oldPosition at time t
[in]position_newPosition at time t + \Delta t
[in]marker_chargeParticle weight time charge
[in]qovermcharge to mass ration
[in]bfield_dofsCoefficient of B-field expansion
[in,out]viVelocity of the particles
[in,out]j_dofsCoefficients of current expansion

Definition at line 782 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_current_update_v_component3_spline_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_current_update_v_component3_spline_3d_feec ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position_old,
real(kind=f64), 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(3), intent(inout)  vi,
real(kind=f64), 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
[in]position_oldPosition at time t
[in]position_newPosition at time t + \Delta t
[in]marker_chargeParticle weight time charge
[in]qovermcharge to mass ration
[in]bfield_dofsCoefficient of B-field expansion
[in,out]viVelocity of the particles
[in,out]j_dofsCoefficients of current expansion

Definition at line 878 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_particle_mass_od_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_particle_mass_od_spline_cl_3d_feec ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
integer(kind=i32), dimension(3), intent(in)  degree1,
integer(kind=i32), dimension(3), intent(in)  degree2,
real(kind=f64), dimension(:,:), intent(inout)  particle_mass 
)
private

Add the contribution of one particle to the off-diagonal parts of the approximate mass matrix.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition of the particle
[in]marker_chargeParticle weights time charge
[in]degree2Spline degree along each dimension
[in,out]particle_massCoefficient vector of the charge distribution

Definition at line 216 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ add_particle_mass_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::add_particle_mass_spline_cl_3d_feec ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position,
real(kind=f64), intent(in)  marker_charge,
integer(kind=i32), dimension(3), intent(in)  degree,
real(kind=f64), dimension(:,:), intent(inout)  particle_mass 
)
private

Add the contribution of one particle to the diagonal parts fo the approximate mass matrix.

Parameters
[in,out]selfkernel smoother object
[in]positionPosition of the particle
[in]marker_chargeParticle weights time charge
[in]degreeSpline degree along each dimension
[in,out]particle_massCoefficient vector of the charge distribution

Definition at line 147 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ box_index()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::box_index ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
integer(kind=i32), intent(in)  box,
integer(kind=i32), intent(in)  comp 
)
private
Parameters
[in,out]selfkernel smoother object

Definition at line 1160 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the caller graph for this function:

◆ convert_index_3d_to_1d()

integer(kind=i32) function sll_m_particle_mesh_coupling_spline_cl_3d_feec::convert_index_3d_to_1d ( integer(kind=i32), dimension(3), intent(in)  index3d,
integer(kind=i32), dimension(3), intent(in)  n_cells,
integer(kind=i32)  degree 
)
private

◆ convert_x_to_xbox()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::convert_x_to_xbox ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position,
real(kind=f64), dimension(3), intent(out)  xi,
integer(kind=i32), dimension(3), intent(out)  box 
)
private
Parameters
[in,out]selfkernel smoother object
[in]positionPosition of the particle
[out]xiPosition of the particle
[out]boxPosition of the particle

Definition at line 1107 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the caller graph for this function:

◆ convert_x_to_xbox_1d()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::convert_x_to_xbox_1d ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
integer(kind=i32), intent(in)  component,
real(kind=f64), intent(in)  position,
real(kind=f64), intent(out)  xi,
integer(kind=i32), intent(out)  box 
)
private
Parameters
[in,out]selfkernel smoother object
[in]positionPosition of the particle
[out]xiPosition of the particle
[out]boxPosition of the particle

Definition at line 1136 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the caller graph for this function:

◆ evaluate_field_single_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::evaluate_field_single_spline_cl_3d_feec ( class (sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
real(kind=f64), dimension(3), intent(in)  position,
integer(kind=i32), dimension(3), intent(in)  degree,
real(kind=f64), dimension(:), intent(in)  field_dofs,
real(kind=f64), intent(out)  field_value 
)
private

Evaluate field at at position position.

Parameters
[in,out]selfKernel smoother object
[in]positionPosition of the particle
[in]degreeSpline degree of the various components
[in]field_dofsCoefficient vector for the field DoFs
[out]field_valueValue(s) of the electric fields at given position

Definition at line 301 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ evaluate_multiple_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::evaluate_multiple_spline_cl_3d_feec ( class (sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
real(kind=f64), dimension(3), 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 several fields at position position.

Parameters
[in,out]selfKernel smoother object
[in]positionPosition of the particle
[in]componentsComponents of field_dofs that shall be updated
[in]field_dofsCoefficient vector for the field DoFs
[out]field_valueValue(s) of the electric fields at given position

Definition at line 346 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

◆ free_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::free_spline_cl_3d_feec ( class (sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self)
private

Finalizer.

Parameters
[in,out]selfKernel smoother object

Definition at line 1269 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ init_spline_cl_3d_feec()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::init_spline_cl_3d_feec ( class (sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(out)  self,
integer(kind=i32), dimension(3), intent(in)  n_cells,
real(kind=f64), dimension(3,2), intent(in)  domain,
integer(kind=i32), dimension(3), intent(in)  spline_degree,
integer(kind=i32), dimension(3), intent(in)  boundary,
integer(kind=i32), intent(in), optional  no_particles 
)
private

Initializer.

Parameters
[out]selfKernel smoother object
[in]n_cellsnumber of DoFs (spline coefficients)
[in]domainx_min and x_max of the domain
[in]spline_degreeDegree of smoothing kernel spline
[in]boundaryspline boundary conditions
[in]no_particlesnumber of particles

Definition at line 1203 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:

◆ integrate_spline_cl_3d()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::integrate_spline_cl_3d ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
integer(kind=i32), dimension(3), intent(in)  box_in,
real(kind=f64), dimension(3), intent(in)  xbox,
real(kind=f64), dimension(3), intent(in)  weight,
real(kind=f64), dimension(:), intent(inout)  j_dofs 
)
private

Helper function for add_current.

Parameters
[in,out]selfkernel smoother object

Definition at line 621 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ point_add_eval()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::point_add_eval ( class( sll_t_particle_mesh_coupling_spline_cl_3d_feec ), intent(inout)  self,
integer(kind=i32), dimension(3), intent(in)  box_in,
real(kind=f64), dimension(3), intent(in)  xbox,
real(kind=f64), dimension(:), intent(in)  field_dofs,
real(kind=f64), dimension(3), intent(in)  weight,
real(kind=f64), dimension(:), intent(inout)  j_dofs,
real(kind=f64), dimension(3), intent(out)  field_value 
)
private

Helper function for add_current_evaluate.

Parameters
[in,out]selfkernel smoother object

Definition at line 448 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sll_s_uniform_bsplines_eval_basis_clamped()

subroutine, public sll_m_particle_mesh_coupling_spline_cl_3d_feec::sll_s_uniform_bsplines_eval_basis_clamped ( type(sll_t_spline_pp_1d), intent(in)  spline,
integer(kind=i32), intent(in)  n_cells,
integer(kind=i32), intent(in)  degree,
real(kind=f64), intent(in)  xi,
integer(kind=i32), intent(in)  box,
real(kind=f64), dimension(:), intent(out)  spline_val 
)

Helper function to evaluate uniform clamped basis splines.

Definition at line 1174 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_jv()

subroutine sll_m_particle_mesh_coupling_spline_cl_3d_feec::update_jv ( class(sll_t_particle_mesh_coupling_spline_cl_3d_feec), intent(inout)  self,
integer(kind=i32), intent(in)  component,
real(kind=f64), intent(in)  lower,
real(kind=f64), intent(in)  upper,
integer(kind=i32), intent(in)  index,
real(kind=f64), intent(in)  marker_charge,
real(kind=f64), intent(in)  sign,
real(kind=f64), dimension(self%n_total0+self%n_total1*2), intent(in)  bfield_dofs,
integer(kind=i32), intent(in)  start1,
integer(kind=i32), intent(in)  start2,
integer(kind=i32), dimension(2), intent(in)  stride,
real(kind=f64), dimension(2), intent(inout)  vi,
real(kind=f64), dimension(:), intent(inout)  j_dofs 
)
private

Helper function for add_current_update_v.

Parameters
[in,out]selftime splitting object

Definition at line 1020 of file sll_m_particle_mesh_coupling_spline_cl_3d_feec.F90.

Here is the call graph for this function:
Here is the caller graph for this function:
    Report Typos and Errors