Extension: Geometries
#include "dg/geometries/geometries.h"
dg::geo::FluxSurfaceIntegral< container > Struct Template Reference

Flux surface integral of the form \( \int dR dZ f(R,Z) \delta(\psi_p(R,Z)-\psi_0) g(R,Z) \). More...

Public Member Functions

 FluxSurfaceIntegral (const dg::Grid2d &g2d, const TokamakMagneticField &mag, double width_factor=1.)
 Construct from a grid and a magnetic field f and g are default initialized to 1. More...
 
double get_deltapsi () const
 
void set_left (const container &f)
 Set the left function to integrate. More...
 
void set_right (const container &g)
 Set the right function to integrate. More...
 
double operator() (double psip0)
 Calculate the Flux Surface Integral. More...
 

Detailed Description

template<class container>
struct dg::geo::FluxSurfaceIntegral< container >

Flux surface integral of the form \( \int dR dZ f(R,Z) \delta(\psi_p(R,Z)-\psi_0) g(R,Z) \).

where for the width of the Gaussian shaped delta function we use the maximum of 0.5*h*GradPsip where h is the cell size in the grid

Constructor & Destructor Documentation

◆ FluxSurfaceIntegral()

template<class container >
dg::geo::FluxSurfaceIntegral< container >::FluxSurfaceIntegral ( const dg::Grid2d g2d,
const TokamakMagneticField mag,
double  width_factor = 1. 
)
inline

Construct from a grid and a magnetic field f and g are default initialized to 1.

Parameters
g2dgrid
magcontains psip, psipR and psipZ
width_factorcan be used to tune the width of the numerical delta function (width = 0.5*h*GradPsi*width_factor)

Member Function Documentation

◆ get_deltapsi()

template<class container >
double dg::geo::FluxSurfaceIntegral< container >::get_deltapsi ( ) const
inline

◆ operator()()

template<class container >
double dg::geo::FluxSurfaceIntegral< container >::operator() ( double  psip0)
inline

Calculate the Flux Surface Integral.

Parameters
psip0the actual psi value of the flux surface
Returns
Int_psip0 (f,g)

◆ set_left()

template<class container >
void dg::geo::FluxSurfaceIntegral< container >::set_left ( const container &  f)
inline

Set the left function to integrate.

Parameters
fthe container containing the discretized function

◆ set_right()

template<class container >
void dg::geo::FluxSurfaceIntegral< container >::set_right ( const container &  g)
inline

Set the right function to integrate.

Parameters
gthe container containing the discretized function

The documentation for this struct was generated from the following file: