PLUTO
4.4-patch2
|
Loop on the computational cells to assign initial conditions. More...
#include "pluto.h"
Functions | |
double | FieldAverage (double, double, Grid *, int, int) |
This function is called anyway, even if restart from file is enabled. This is useful to initialized a number of global variables and/or user-defined parameters by calling Init().
double FieldAverage | ( | double | bp, |
double | bm, | ||
Grid * | grid, | ||
int | dir, | ||
int | l | ||
) |
For central-type discretizaions (no CONSTRAINED_TRANSPORT), computes the volume-averaged magnetic fields from the face values.
[in] | bp | B component at right staggered face (e.g. Bx[i, j, k]) |
[in] | bm | B component at left staggered face (e.g. Bx[i-1, j, k]) |
[in] | grid | PLUTO grid structure. |
[in] | dir | direction of staggered. options: IDIR, JDIR, KDIR |
[in] | l | integer for cell along direction of staggered |