File div_ops.cxx#
Functions
-
const Field3D Div_par_diffusion_index(const Field3D &f, bool bndry_flux)#
Diffusion in index space
Similar to using Div_par_diffusion(SQ(mesh->dy)*mesh->g_22, f)
- Parameters:
The – [in] field to be differentiated
bndry_flux – [in] Are fluxes through the boundary calculated?
-
BoutReal minmod(BoutReal a, BoutReal b, BoutReal c)#
The minmod function returns the value with the minimum magnitude If the inputs have different signs then returns zero
-
const Field3D Div_n_bxGrad_f_B_XPPM(const Field3D &n, const Field3D &f, bool bndry_flux, bool poloidal, bool positive)#
-
const Field3D Div_Perp_Lap_FV_Index(const Field3D &as, const Field3D &fs)#
-
const Field3D Div_Z_FV_Index(const Field3D &as, const Field3D &fs)#
Z diffusion in index space.
-
const Field3D D4DX4_FV_Index(const Field3D &f, bool bndry_flux)#
-
const Field3D D4DZ4_Index(const Field3D &f)#
-
const Field2D Laplace_FV(const Field2D &k, const Field2D &f)#
*** USED *** X-Y diffusion
NOTE: Assumes g^12 = 0, so X and Y are orthogonal. Otherwise we would need the corner cell values to take Y derivatives along X edges
-
const Field3D Div_a_Grad_perp_flows(const Field3D &a, const Field3D &f, Field3D &flow_xlow, Field3D &flow_ylow)#
Perpendicular diffusion including X and Y directions Takes Div_a_Grad_perp from BOUT++ and adds flows
-
const Field3D Div_a_Grad_perp_upwind(const Field3D &a, const Field3D &f)#
WARNING: Causes checkerboarding in neutral_mixed integrated test.
Same but with upwinding WARNING: Causes checkerboarding in neutral_mixed integrated test
-
const Field3D Div_a_Grad_perp_upwind_flows(const Field3D &a, const Field3D &f, Field3D &flow_xlow, Field3D &flow_ylow)#
Div ( a Grad_perp(f) ) — diffusion
Returns the flows in the final arguments
Flows are always in the positive {x,y} direction i.e xlow(i,j) is the flow into cell (i,j) from the left, and the flow out of cell (i-1,j) to the right
ylow(i,j+1) ^ +—|—+ | | xlow(i,j) -> (i,j) -> xlow(i+1,j) | ^ | +—|—+ ylow(i,j)
WARNING: Causes checkerboarding in neutral_mixed integrated test
-
const Field3D Div_n_g_bxGrad_f_B_XZ(const Field3D &n, const Field3D &g, const Field3D &f, bool bndry_flux)#
This version has an extra coefficient ‘g’ that is linearly interpolated onto cell faces
-
const Field3D Div_par_K_Grad_par_mod(const Field3D &Kin, const Field3D &fin, Field3D &flow_ylow, bool bndry_flux)#
Version with energy flow diagnostic.
-
struct Stencil1D#