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

Description

Control variate.

Author
Katharina Kormann, IPP

This base class gives an abstract interface to the basic functions for accumulation of charge and current densities as well as the evaluation of a function at particle positions.

Derived types and interfaces

type  sll_t_control_variate
 Control variate object. More...
 
type  sll_t_control_variates
 
interface  sll_i_control_variate
 1d real function, abstract interface for function defining the control variate More...
 

Functions/Subroutines

real(kind=f64) function update_df_weight (self, xi, vi, time, weight_ff, g0)
 Update the delta f weights. More...
 
subroutine init_control_variate (self, control_function, parameters, distribution_params)
 Initialization. More...
 
subroutine free_control_variate (self)
 Destructor. More...
 

Function/Subroutine Documentation

◆ free_control_variate()

subroutine sll_m_control_variate::free_control_variate ( class(sll_t_control_variate), intent(inout)  self)
private

Destructor.

Parameters
[in,out]selfControl variate object

Definition at line 95 of file sll_m_control_variate.F90.

◆ init_control_variate()

subroutine sll_m_control_variate::init_control_variate ( class(sll_t_control_variate), intent(out)  self,
procedure(sll_i_control_variate control_function,
real(kind=f64), dimension(:), intent(in), optional, target  parameters,
class(sll_c_distribution_params), intent(in), optional, target  distribution_params 
)
private

Initialization.

Parameters
[out]selfControl variate object
control_functionFunction defining the control variate
[in]parametersParameter values needed in control variate function

Definition at line 78 of file sll_m_control_variate.F90.

◆ update_df_weight()

real(kind=f64) function sll_m_control_variate::update_df_weight ( class(sll_t_control_variate self,
real(kind=f64), dimension(:), intent(in)  xi,
real(kind=f64), dimension(:), intent(in)  vi,
real(kind=f64), intent(in)  time,
real(kind=f64), intent(in)  weight_ff,
real(kind=f64), intent(in)  g0 
)

Update the delta f weights.

Parameters
selfControl variate object
[in]xiparticle position
[in]viparticle velocity
[in]timecurrent time
[in]weight_ffparticle weight for full f
[in]g0initial sampling distribution at particle coordinates at time zero
Returns
particle weight for delta f

Definition at line 64 of file sll_m_control_variate.F90.

    Report Typos and Errors