72 void BoundValues (
double *v,
double x1,
double x2,
double x3,
double t);
75 void Init (
double *us,
double x1,
double x2,
double x3)
99 double t, dt, vb[256];
102 #if GEOMETRY == CARTESIAN
104 EXPAND(d->
Vc[
VX1][k][j][i] = 0.0; ,
105 d->
Vc[
VX2][k][j][i] = 0.0; ,
106 d->
Vc[
VX3][k][j][i] = 0.0;)
107 #if ENTROPY_SWITCH == YES
125 for (nv =
NVAR; nv--; ) d->
Vc[nv][k][j][i] = vb[nv];
158 void BoundValues (
double *v,
double x1,
double x2,
double x3,
double t)
167 double eta_x, eta_y, eta_z, st;
175 #if GEOMETRY == CARTESIAN
176 x = x1; y = x2; z = x3;
177 #elif GEOMETRY == POLAR
178 x = x1*cos(x2) - 5.0;
179 y = x1*sin(x2) - 5.0;
181 #elif GEOMETRY == SPHERICAL
182 x = x1*cos(x3)*sin(x2) - 5.0;
183 y = x1*sin(x3)*sin(x2) - 5.0;
184 z = x1*cos(x2) - 5.0;
186 #error geometry not valid
193 #if EOS != ISOTHERMAL
210 Bx = exp(-0.25*y*y/(eta_z*t))/st;
211 By = exp(-0.25*x*x/(eta_z*t))/st;
212 Bz = exp(-0.25*x*x/(eta_y*t))*exp(-0.25*y*y/(eta_x*t))/t;
213 #elif DIMENSIONS == 3
214 Bx = exp(-0.25*y*y/(eta_z*t))*exp(-0.25*z*z/(eta_y*t))/t;
215 By = exp(-0.25*x*x/(eta_z*t))*exp(-0.25*z*z/(eta_x*t))/t;
216 Bz = exp(-0.25*x*x/(eta_y*t))*exp(-0.25*y*y/(eta_x*t))/t;
223 #if GEOMETRY == CARTESIAN
227 #elif GEOMETRY == POLAR
228 v[
BX1] = cos(x2)*Bx + sin(x2)*By;
229 v[
BX2] = -sin(x2)*Bx + cos(x2)*By;
231 #elif GEOMETRY == SPHERICAL
232 v[
BX1] = cos(x3)*sin(x2)*Bx + sin(x3)*sin(x2)*By + cos(x2)*Bz;
233 v[
BX2] = cos(x3)*cos(x2)*Bx + sin(x3)*cos(x2)*By - sin(x2)*Bz;
234 v[
BX3] = -sin(x3)*Bx + cos(x3)*By;
236 print1 (
"! BoundValues: GEOMETRY not defined\n");
#define X3_BEG
Boundary region at X3 beg.
#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)
void print1(const char *fmt,...)
int vpos
Location of the variable inside the cell.
void BoundValues(double *v, double x1, double x2, double x3, double t)
#define BOX_LOOP(B, k, j, i)
double **** Vc
The main four-index data array used for cell-centered primitive variables.
#define X1_END
Boundary region at X1 end.
unsigned char *** flag
Pointer to a 3D array setting useful integration flags that are retrieved during integration.
#define TOT_LOOP(k, j, i)
#define FLAG_ENTROPY
Update pressure using entropy equation.
#define X2_END
Boundary region at X2 end.
double g_inputParam[32]
Array containing the user-defined parameters.
#define X3_END
Boundary region at X3 end.
double g_time
The current integration time.
#define X2_BEG
Boundary region at X2 beg.
#define QUIT_PLUTO(e_code)
void Analysis(const Data *d, Grid *grid)
void Init(double *v, double x1, double x2, double x3)