68 void Init (
double *v,
double x1,
double x2,
double x3)
75 double r, r0,
Bx, omega;
82 #if GEOMETRY == CARTESIAN
84 r =
D_EXPAND(x1*x1, + x2*x2, + x3*x3);
96 v[
VX1] = -omega*x2/r0;
103 #elif GEOMETRY == POLAR
111 v[
BX2] = -Bx*sin(x2);
120 v[
AX3] = - r*sin(x2)*
Bx;
#define X1_BEG
Boundary region at X1 beg.
double **** Vs
The main four-index data array used for face-centered staggered magnetic fields.
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
int vpos
Location of the variable inside the cell.
#define BOX_LOOP(B, k, j, i)
double **** Vc
The main four-index data array used for cell-centered primitive variables.
D_EXPAND(tot/[n]=(double) grid[IDIR].np_int_glob;, tot/[n]=(double) grid[JDIR].np_int_glob;, tot/[n]=(double) grid[KDIR].np_int_glob;)
long int IBEG
Lower grid index of the computational domain in the the X1 direction for the local processor...
void Analysis(const Data *d, Grid *grid)
void Init(double *v, double x1, double x2, double x3)