Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Particle mesh coupling for 3d with splines of arbitrary degree placed on a uniform tensor product mesh.
Spline with index i starts at point i
Derived types and interfaces | |
type | sll_t_particle_mesh_coupling_spline_3d_feec |
Particle mesh coupling in 3d based on (arbitrary degree) spline on a tensor product uniform mesh. More... | |
type | vector |
Evaluates the integral int_{poisition_old}^{position_new} field(x) d x and the integrated current. More... | |
Functions/Subroutines | |
subroutine | add_charge_single_spline_3d_feec (self, position, marker_charge, degree, rho_dofs) |
Add charge of one particle. More... | |
subroutine | add_charge_single_spline_pp_3d_feec (self, position, marker_charge, degree, rho_dofs) |
Add charge of one particle. More... | |
subroutine | add_particle_mass_spline_3d_feec (self, position, marker_charge, degree, particle_mass) |
Add charge of one particle. More... | |
subroutine | add_particle_mass_od_spline_3d_feec (self, position, marker_charge, degree1, degree2, particle_mass) |
Add charge of one particle. More... | |
subroutine | evaluate_field_single_spline_3d_feec (self, position, degree, field_dofs, field_value) |
Evaluate field at at position position. More... | |
subroutine | evaluate_field_single_spline_pp_3d_feec (self, position, degree, field_dofs_pp, field_value) |
Evaluate field at at position position. More... | |
subroutine | evaluate_multiple_spline_3d_feec (self, position, components, field_dofs, field_value) |
Evaluate several fields at position position. More... | |
pure integer(kind=i32) function | convert_index_3d_to_1d (index3d, n_cells) |
Convert 3d index to 1d index (first dimension without stride) More... | |
subroutine | convert_x_to_xbox (self, position, xi, box) |
Identify the box in which the particle is located and its normalized position within the box. More... | |
subroutine | convert_x_to_xbox_1d (self, component, position, xi, box) |
Identify the box in which the particle is located and its normalized position within the box (only along the dimension component) More... | |
subroutine | box_index (self, box, comp) |
Sets the index of the splines that are involved in computations that concern splines from index box. More... | |
subroutine | add_current_evaluate (self, position_old, position_new, xdot, efield_dofs, j_dofs, efield_val) |
Add current via line integral and evaluate spline. More... | |
subroutine | point_add_eval (self, box_in, xbox, field_dofs, weight, j_dofs, field_value) |
Helper function for add_current_evaluate that takes care of the per-cell computations. More... | |
subroutine | add_current_3d (self, position_old, position_new, xdot, j_dofs) |
Add current via line integral (when x changes along all three directions) More... | |
subroutine | integrate_spline_3d (self, box_in, xbox, weight, j_dofs) |
Helper function for add_current_3d, takes care of the per box computations. More... | |
subroutine | add_current_spline_3d_feec (self, position_old, position_new, marker_charge, qoverm, bfield_dofs, vi, j_dofs) |
Add current for one particle. More... | |
subroutine | add_current_update_v_primitive_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), version based on primitive function. More... | |
subroutine | add_current_update_v_primitive_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_p2 part in Hamiltonian splitting), version based on primitive function. More... | |
subroutine | add_current_update_v_primitive_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_p3 part in Hamiltonian splitting), version based on primitive function. 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), version based on quadrature. 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_p2 part in Hamiltonian splitting), version based on quadrature. 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_p3 part in Hamiltonian splitting), version based on quadrature. 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) |
Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting) 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... | |
subroutine | init_spline_3d_feec (self, n_cells, domain, spline_degree, no_particles) |
Constructor. More... | |
subroutine | free_spline_3d_feec (self) |
Destructor. More... | |
subroutine | add_current_evaluate_int (self, position_old, position_new, vbar, bfield_dofs, j_dofs, bfield_val) |
Evaluates the integral int_{poisition_old}^{position_new} field(x) d x and the integrated current. More... | |
subroutine | point_add_eval_subcyc (self, box_in, xbox, field_dofs, weight, j_dofs, field_value) |
Helper function for add_current_evaluate_int, takes care of per cell computations. More... | |
|
private |
Add charge of one particle.
[in,out] | self | kernel smoother object |
[in] | position | Position of the particle |
[in] | marker_charge | Particle weights time charge |
[in] | degree | Spline degree along each dimension |
[in,out] | rho_dofs | Coefficient vector of the charge distribution |
Definition at line 100 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add charge of one particle.
[in,out] | self | kernel smoother object |
[in] | position | Position of the particle |
[in] | marker_charge | Particle weights time charge |
[in] | degree | Spline degree along each dimension |
[in,out] | rho_dofs | Coefficient vector of the charge distribution |
Definition at line 154 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting)
[in,out] | self | kernel smoother object |
[in] | marker_charge | Particle weight time charge |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in] | start1 | Index where B-field component starts that updates vi(1) |
[in] | start2 | Index where B-field component starts that updates vi(2) |
[in] | stride | Stride for index of B-field |
[in,out] | vi | Velocity of the particles to be updated |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1551 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current via line integral (when x changes along all three directions)
[in,out] | self | kernel smoother object |
[in] | position_old | Position of the particle |
[in] | position_new | Position of the particle |
[in] | xdot | velocity |
[in,out] | j_dofs | current dofs |
Definition at line 665 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current via line integral and evaluate spline.
[in,out] | self | kernel smoother object |
[in] | position_old | Position of the particle |
[in] | position_new | Position of the particle |
[in] | xdot | velocity |
[in] | efield_dofs | electric field dofs |
[in,out] | j_dofs | current dofs |
[out] | efield_val | electric field value |
Definition at line 487 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Evaluates the integral int_{poisition_old}^{position_new} field(x) d x and the integrated current.
[in,out] | self | kernel smoother object |
[in] | position_old | Position of the particle |
[in] | position_new | Position of the particle |
Definition at line 1759 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 825 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting), version based on quadrature.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1271 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p2 part in Hamiltonian splitting), version based on quadrature.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1364 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p3 part in Hamiltonian splitting), version based on quadrature.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1461 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p1 part in Hamiltonian splitting), version based on primitive function.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 905 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p2 part in Hamiltonian splitting), version based on primitive function.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1029 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add current for one particle and update v (according to H_p3 part in Hamiltonian splitting), version based on primitive function.
[in,out] | self | kernel smoother object |
[in] | position_old | Position at time t |
[in] | position_new | Position at time t + \Delta t |
[in] | marker_charge | Particle weight time charge |
[in] | qoverm | charge to mass ration |
[in] | bfield_dofs | Coefficient of B-field expansion |
[in,out] | vi | Velocity of the particles |
[in,out] | j_dofs | Coefficients of current expansion |
Definition at line 1151 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add charge of one particle.
[in,out] | self | kernel smoother object |
[in] | position | Position of the particle |
[in] | marker_charge | Particle weights time charge |
[in] | degree2 | Spline degree along each dimension |
[in,out] | particle_mass | Coefficient vector of the charge distribution |
Definition at line 277 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Add charge of one particle.
[in,out] | self | kernel smoother object |
[in] | position | Position of the particle |
[in] | marker_charge | Particle weights time charge |
[in] | degree | Spline degree along each dimension |
[in,out] | particle_mass | Coefficient vector of the charge distribution |
Definition at line 207 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Sets the index of the splines that are involved in computations that concern splines from index box.
[in,out] | self | kernel smoother object |
Definition at line 473 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Convert 3d index to 1d index (first dimension without stride)
Definition at line 435 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Identify the box in which the particle is located and its normalized position within the box.
[in,out] | self | kernel smoother object |
[in] | position | Position of the particle |
[out] | xi | Position of the particle |
[out] | box | Position of the particle |
Definition at line 445 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Identify the box in which the particle is located and its normalized position within the box (only along the dimension component)
[in,out] | self | kernel smoother object |
[in] | component | direction along which the position is given |
[in] | position | Position of the particle |
[out] | xi | Position of the particle |
[out] | box | Position of the particle |
Definition at line 458 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Evaluate field at at position position.
[in,out] | self | Kernel smoother object |
[in] | position | Position of the particle |
[in] | degree | Spline degree of the various components |
[in] | field_dofs | Coefficient vector for the field DoFs |
[out] | field_value | Value(s) of the fields at given position |
Definition at line 355 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Evaluate field at at position position.
[in,out] | self | Kernel smoother object |
[in] | position | Position of the particle |
[in] | degree | Spline degree of the various components |
[in] | field_dofs_pp | Coefficient vector for the field DoFs |
[out] | field_value | Value(s) of the fields at given position |
Definition at line 403 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Evaluate several fields at position position.
[in,out] | self | Kernel smoother object |
[in] | position | Position of the particle |
[in] | components | Components of field_dofs that shall be updated |
[in] | field_dofs | Coefficient vector for the field DoFs |
[out] | field_value | Value(s) of the electric fields at given position |
Definition at line 423 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Destructor.
[in,out] | self | Kernel smoother object |
Definition at line 1730 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Constructor.
[out] | self | Kernel smoother object |
[in] | n_cells | number of DoFs (spline coefficients) |
[in] | domain | x_min and x_max of the domain |
[in] | spline_degree | Degree of smoothing kernel spline |
[in] | no_particles | number of particles |
Definition at line 1658 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Helper function for add_current_3d, takes care of the per box computations.
[in,out] | self | kernel smoother object |
Definition at line 748 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Helper function for add_current_evaluate that takes care of the per-cell computations.
[in,out] | self | kernel smoother object |
Definition at line 575 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Helper function for add_current_evaluate_int, takes care of per cell computations.
[in,out] | self | kernel smoother object |
Definition at line 1848 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.
|
private |
Helper function for add_current_update_v.
[in,out] | self | time splitting object |
Definition at line 1604 of file sll_m_particle_mesh_coupling_spline_3d_feec.F90.