102 void Init (
double *us,
double x1,
double x2,
double x3)
109 double r, theta, phi, B0;
112 r =
D_EXPAND(x1*x1, + x2*x2, + x3*x3);
126 us[
BX1] = B0*sin(theta)*cos(phi);
127 us[
BX2] = B0*sin(theta)*sin(phi);
128 us[
BX3] = B0*cos(theta);
131 #if GEOMETRY == CARTESIAN
135 #elif GEOMETRY == CYLINDRICAL
140 #if BACKGROUND_FIELD == YES
162 #if BACKGROUND_FIELD == YES
171 static int first_call = 1;
173 static double sth,cth,sphi,cphi;
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
void BackgroundField(double x1, double x2, double x3, double *B0)
double g_inputParam[32]
Array containing the user-defined parameters.
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;)
void Analysis(const Data *d, Grid *grid)
void Init(double *v, double x1, double x2, double x3)