Extension: Geometries
#include "dg/geometries/geometries.h"
|
Flux surface average (differential volume average) over quantity \( \langle f\rangle(\psi_0) = \frac{1}{A} \int dR dZ \delta(\psi_p(R,Z)-\psi_0) f(R,Z)H(R,Z) \). More...
Public Member Functions | |
FluxSurfaceAverage (const dg::Grid2d &g2d, const TokamakMagneticField &mag, const container &f, container weights, double width_factor=1.) | |
Construct from a field and a grid. More... | |
double | get_deltapsi () const |
void | set_container (const container &f) |
Reset the function to average. More... | |
double | operator() (double psip0) |
Calculate the Flux Surface Average. More... | |
Flux surface average (differential volume average) over quantity \( \langle f\rangle(\psi_0) = \frac{1}{A} \int dR dZ \delta(\psi_p(R,Z)-\psi_0) f(R,Z)H(R,Z) \).
with \( A = \int dRdZ \delta(\psi_p(R,Z)-\psi_0)H(R,Z)\) where H
is a weight function that can be used to e.g. cut away parts of the domain below the X-point or contain a volume form
|
inline |
Construct from a field and a grid.
g2d | 2d grid |
mag | contains psip, psipR and psipZ |
f | the function to take the average over (until set_container() is called) |
weights | Weight function H (can be used to cut away parts of the domain e.g. below the X-point and/or contain a volume form without dg weights) |
width_factor | can be used to tune the width of the numerical delta function (width = h*GradPsi*width_factor ) |
|
inline |
|
inline |
|
inline |
Reset the function to average.
f | the container containing the discretized function |