PLUTO
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
scrh
;
12
13
if
(sqrt(x*x + y*y)<0.25){
14
us[
RHO
] = 10.0;
15
us[
VX1
] = 0.0;
16
us[
VX2
] = 0.0;
17
us[PRS] = 40.0/3.0;
18
}
else
{
19
us[
RHO
] = 1.0;
20
us[
VX1
] = 0.0;
21
us[
VX2
] = 0.0;
22
us[PRS] = 2.e-6/3.;
23
}
24
25
}
26
27
/* ********************************************************************* */
28
void
Analysis
(
const
Data
*d,
Grid
*grid)
29
/*
30
*
31
*
32
*********************************************************************** */
33
{
34
35
}
36
37
/* ********************************************************************* */
38
void
UserDefBoundary
(
const
Data
*d,
RBox
*box,
int
side,
Grid
*grid)
39
/*!
40
* Assign user-defined boundary conditions.
41
*
42
* \param [in,out] d pointer to the PLUTO data structure containing
43
* cell-centered primitive quantities (d->Vc) and
44
* staggered magnetic fields (d->Vs, when used) to
45
* be filled.
46
* \param [in] box pointer to a RBox structure containing the lower
47
* and upper indices of the ghost zone-centers/nodes
48
* or edges at which data values should be assigned.
49
* \param [in] side specifies the boundary side where ghost zones need
50
* to be filled. It can assume the following
51
* pre-definite values: X1_BEG, X1_END,
52
* X2_BEG, X2_END,
53
* X3_BEG, X3_END.
54
* The special value side == 0 is used to control
55
* a region inside the computational domain.
56
* \param [in] grid pointer to an array of Grid structures.
57
*
58
*********************************************************************** */
59
{ }
60
UserDefBoundary
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
Definition:
init.c:98
VX2
#define VX2
Definition:
mod_defs.h:29
RHO
#define RHO
Definition:
mod_defs.h:19
configure.scrh
tuple scrh
Definition:
configure.py:200
VX1
#define VX1
Definition:
mod_defs.h:28
GRID
Definition:
structs.h:78
pluto.h
PLUTO main header file.
DATA
Definition:
structs.h:30
RBOX
Definition:
structs.h:346
Analysis
void Analysis(const Data *d, Grid *grid)
Definition:
init.c:66
Init
void Init(double *v, double x1, double x2, double x3)
Definition:
init.c:17
Test_Problems
RHD
Sedov2D
init.c
Generated by
1.8.10