PLUTO
init.c
Go to the documentation of this file.
1 #include "pluto.h"
2 
3 /* ********************************************************************* */
4 void Init (double *us, double x, double y, double z)
5 /*
6  *
7  *
8  *
9  *********************************************************************** */
10 {
11  double r, x0=1,y0=1,scrh;
12 
13  g_gamma = 1.4;
14 
15  r = sqrt( (x-x0)*(x-x0) + (y-y0)*(y-y0));
16  us[RHO] = 1.0;
17  us[VX1] = 0.0;
18  us[VX2] = 0.0;
19  us[VX3] = 0.0;
20  us[TRC] = 0.0;
21 
22  if (x<0.1){
23  us[PRS] = 1.e3;
24  }else if(x<0.9) {
25  us[PRS] = 1.e-2;
26  }else {
27  us[PRS] = 1.e2;
28  }
29 
30 }
31 
32 /* ********************************************************************* */
33 void Analysis (const Data *d, Grid *grid)
34 /*
35  *
36  *
37  *********************************************************************** */
38 {
39 
40 }
41 
42 /* ********************************************************************* */
43 void UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid)
44 /*!
45  * Assign user-defined boundary conditions.
46  *
47  * \param [in,out] d pointer to the PLUTO data structure containing
48  * cell-centered primitive quantities (d->Vc) and
49  * staggered magnetic fields (d->Vs, when used) to
50  * be filled.
51  * \param [in] box pointer to a RBox structure containing the lower
52  * and upper indices of the ghost zone-centers/nodes
53  * or edges at which data values should be assigned.
54  * \param [in] side specifies the boundary side where ghost zones need
55  * to be filled. It can assume the following
56  * pre-definite values: X1_BEG, X1_END,
57  * X2_BEG, X2_END,
58  * X3_BEG, X3_END.
59  * The special value side == 0 is used to control
60  * a region inside the computational domain.
61  * \param [in] grid pointer to an array of Grid structures.
62  *
63  *********************************************************************** */
64 { }
65 
double g_gamma
Definition: globals.h:112
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
Definition: init.c:98
#define VX2
Definition: mod_defs.h:29
#define RHO
Definition: mod_defs.h:19
tuple scrh
Definition: configure.py:200
#define TRC
Definition: pluto.h:581
#define VX1
Definition: mod_defs.h:28
Definition: structs.h:78
PLUTO main header file.
Definition: structs.h:30
#define VX3
Definition: mod_defs.h:30
Definition: structs.h:346
void Analysis(const Data *d, Grid *grid)
Definition: init.c:66
void Init(double *v, double x1, double x2, double x3)
Definition: init.c:17