Skip to content

Commit ae45b9c

Browse files
authored
Merge pull request #11 from pkestene/mhd/refactor/init_condition
Mhd/refactor/init condition
2 parents 0c759f8 + 6b3948b commit ae45b9c

21 files changed

+445
-215
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ slope_type=2
2929
problem=brio-wu
3030
riemann=hlld
3131

32+
[brio-wu]
33+
direction=0
34+
3235
[output]
3336
outputDir=./
34-
outputPrefix=test_mhd_brio_wu_2d
37+
outputPrefix=test_mhd_brio_wu_2d_x
3538
outputVtkAscii=false
3639
hdf5_enabled=yes
3740

settings/test_mhd_brio_wu_2d_y.ini

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[run]
2+
solver_name=MHD_Muscl_2D
3+
tEnd=0.1
4+
nStepmax=1000
5+
nOutput=10
6+
7+
[mesh]
8+
nx=32
9+
ny=512
10+
11+
xmin=0.0
12+
xmax=0.0625
13+
14+
ymin=0.0
15+
ymax=1.0
16+
17+
boundary_type_xmin=2
18+
boundary_type_xmax=2
19+
20+
boundary_type_ymin=2
21+
boundary_type_ymax=2
22+
23+
[hydro]
24+
gamma0=2.0
25+
cfl=0.8
26+
niter_riemann=10
27+
iorder=2
28+
slope_type=2
29+
problem=brio-wu
30+
riemann=hlld
31+
32+
[brio-wu]
33+
direction=1
34+
35+
[output]
36+
outputDir=./
37+
outputPrefix=test_mhd_brio_wu_2d_y
38+
outputVtkAscii=false
39+
hdf5_enabled=yes
40+
41+
[other]
42+
implementationVersion=2

settings/test_mhd_brio_wu_3d_x.ini

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[run]
2+
solver_name=MHD_Muscl_3D
3+
tEnd=0.1
4+
nStepmax=1000
5+
nOutput=10
6+
7+
[mesh]
8+
nx=512
9+
ny=16
10+
nz=16
11+
12+
xmin=0.0
13+
xmax=1.0
14+
15+
ymin=0.0
16+
ymax=0.0625
17+
18+
zmin=0.0
19+
zmax=0.0625
20+
21+
boundary_type_xmin=2
22+
boundary_type_xmax=2
23+
24+
boundary_type_ymin=2
25+
boundary_type_ymax=2
26+
27+
boundary_type_zmin=2
28+
boundary_type_zmax=2
29+
30+
[hydro]
31+
gamma0=2.0
32+
cfl=0.8
33+
niter_riemann=10
34+
iorder=2
35+
slope_type=2
36+
problem=brio-wu
37+
riemann=hlld
38+
39+
[brio-wu]
40+
direction=0
41+
42+
[output]
43+
outputDir=./
44+
outputPrefix=test_mhd_brio_wu_3d_x
45+
outputVtkAscii=false
46+
hdf5_enabled=yes
47+
48+
[other]
49+
implementationVersion=2

settings/test_mhd_brio_wu_3d_y.ini

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[run]
2+
solver_name=MHD_Muscl_3D
3+
tEnd=0.1
4+
nStepmax=1000
5+
nOutput=10
6+
7+
[mesh]
8+
nx=16
9+
ny=512
10+
nz=16
11+
12+
xmin=0.0
13+
xmax=0.0625
14+
15+
ymin=0.0
16+
ymax=1.0
17+
18+
zmin=0.0
19+
zmax=0.0625
20+
21+
boundary_type_xmin=2
22+
boundary_type_xmax=2
23+
24+
boundary_type_ymin=2
25+
boundary_type_ymax=2
26+
27+
boundary_type_zmin=2
28+
boundary_type_zmax=2
29+
30+
[hydro]
31+
gamma0=2.0
32+
cfl=0.8
33+
niter_riemann=10
34+
iorder=2
35+
slope_type=2
36+
problem=brio-wu
37+
riemann=hlld
38+
39+
[brio-wu]
40+
direction=1
41+
42+
[output]
43+
outputDir=./
44+
outputPrefix=test_mhd_brio_wu_3d_y
45+
outputVtkAscii=false
46+
hdf5_enabled=yes
47+
48+
[other]
49+
implementationVersion=2

settings/test_mhd_brio_wu_3d_z.ini

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[run]
2+
solver_name=MHD_Muscl_3D
3+
tEnd=0.1
4+
nStepmax=1000
5+
nOutput=10
6+
7+
[mesh]
8+
nx=16
9+
ny=16
10+
nz=512
11+
12+
xmin=0.0
13+
xmax=0.0625
14+
15+
ymin=0.0
16+
ymax=0.0625
17+
18+
zmin=0.0
19+
zmax=1.0
20+
21+
boundary_type_xmin=2
22+
boundary_type_xmax=2
23+
24+
boundary_type_ymin=2
25+
boundary_type_ymax=2
26+
27+
boundary_type_zmin=2
28+
boundary_type_zmax=2
29+
30+
[hydro]
31+
gamma0=2.0
32+
cfl=0.8
33+
niter_riemann=10
34+
iorder=2
35+
slope_type=2
36+
problem=brio-wu
37+
riemann=hlld
38+
39+
[brio-wu]
40+
direction=2
41+
42+
[output]
43+
outputDir=./
44+
outputPrefix=test_mhd_brio_wu_3d_z
45+
outputVtkAscii=false
46+
hdf5_enabled=yes
47+
48+
[other]
49+
implementationVersion=2

src/muscl/HydroInitFunctors2D.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class InitImplodeFunctor2D : public HydroBaseFunctor2D
5959

6060
#ifdef EULER_KOKKOS_USE_MPI
6161
const int i_mpi = params.myMpiPos[IX];
62-
const int j_mpi = params.myMpiPos[IT];
62+
const int j_mpi = params.myMpiPos[IY];
6363
#else
6464
const int i_mpi = 0;
6565
const int j_mpi = 0;
@@ -153,7 +153,7 @@ class InitBlastFunctor2D : public HydroBaseFunctor2D
153153

154154
#ifdef EULER_KOKKOS_USE_MPI
155155
const int i_mpi = params.myMpiPos[IX];
156-
const int j_mpi = params.myMpiPos[IT];
156+
const int j_mpi = params.myMpiPos[IY];
157157
#else
158158
const int i_mpi = 0;
159159
const int j_mpi = 0;
@@ -241,7 +241,7 @@ class InitKelvinHelmholtzFunctor2D : public HydroBaseFunctor2D
241241

242242
#ifdef EULER_KOKKOS_USE_MPI
243243
const int i_mpi = params.myMpiPos[IX];
244-
const int j_mpi = params.myMpiPos[IT];
244+
const int j_mpi = params.myMpiPos[IY];
245245
#else
246246
const int i_mpi = 0;
247247
const int j_mpi = 0;
@@ -376,7 +376,7 @@ class InitGreshoVortexFunctor2D : public HydroBaseFunctor2D
376376

377377
#ifdef EULER_KOKKOS_USE_MPI
378378
const int i_mpi = params.myMpiPos[IX];
379-
const int j_mpi = params.myMpiPos[IT];
379+
const int j_mpi = params.myMpiPos[IY];
380380
#else
381381
const int i_mpi = 0;
382382
const int j_mpi = 0;
@@ -498,7 +498,7 @@ class InitFourQuadrantFunctor2D : public HydroBaseFunctor2D
498498

499499
#ifdef EULER_KOKKOS_USE_MPI
500500
const int i_mpi = params.myMpiPos[IX];
501-
const int j_mpi = params.myMpiPos[IT];
501+
const int j_mpi = params.myMpiPos[IY];
502502
#else
503503
const int i_mpi = 0;
504504
const int j_mpi = 0;
@@ -596,7 +596,7 @@ class InitIsentropicVortexFunctor2D : public HydroBaseFunctor2D
596596

597597
#ifdef EULER_KOKKOS_USE_MPI
598598
const int i_mpi = params.myMpiPos[IX];
599-
const int j_mpi = params.myMpiPos[IT];
599+
const int j_mpi = params.myMpiPos[IY];
600600
#else
601601
const int i_mpi = 0;
602602
const int j_mpi = 0;
@@ -699,7 +699,7 @@ class RayleighTaylorInstabilityFunctor2D : public HydroBaseFunctor2D
699699

700700
#ifdef EULER_KOKKOS_USE_MPI
701701
const int i_mpi = params.myMpiPos[IX];
702-
const int j_mpi = params.myMpiPos[IT];
702+
const int j_mpi = params.myMpiPos[IY];
703703
#else
704704
const int i_mpi = 0;
705705
const int j_mpi = 0;
@@ -774,7 +774,7 @@ class RayleighTaylorInstabilityFunctor2D : public HydroBaseFunctor2D
774774

775775
// init gravity field
776776
gravity(i, j, IX) = gravity_x;
777-
gravity(i, j, IT) = gravity_y;
777+
gravity(i, j, IY) = gravity_y;
778778

779779
} // end operator ()
780780

src/muscl/HydroInitFunctors3D.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class InitImplodeFunctor3D : public HydroBaseFunctor3D
9494

9595
#ifdef EULER_KOKKOS_USE_MPI
9696
const int i_mpi = params.myMpiPos[IX];
97-
const int j_mpi = params.myMpiPos[IT];
97+
const int j_mpi = params.myMpiPos[IY];
9898
const int k_mpi = params.myMpiPos[IZ];
9999
#else
100100
const int i_mpi = 0;
@@ -199,7 +199,7 @@ class InitBlastFunctor3D : public HydroBaseFunctor3D
199199

200200
#ifdef EULER_KOKKOS_USE_MPI
201201
const int i_mpi = params.myMpiPos[IX];
202-
const int j_mpi = params.myMpiPos[IT];
202+
const int j_mpi = params.myMpiPos[IY];
203203
const int k_mpi = params.myMpiPos[IZ];
204204
#else
205205
const int i_mpi = 0;
@@ -297,7 +297,7 @@ class InitKelvinHelmholtzFunctor3D : public HydroBaseFunctor3D
297297

298298
#ifdef EULER_KOKKOS_USE_MPI
299299
const int i_mpi = params.myMpiPos[IX];
300-
const int j_mpi = params.myMpiPos[IT];
300+
const int j_mpi = params.myMpiPos[IY];
301301
const int k_mpi = params.myMpiPos[IZ];
302302
#else
303303
const int i_mpi = 0;
@@ -454,7 +454,7 @@ class InitGreshoVortexFunctor3D : public HydroBaseFunctor3D
454454

455455
#ifdef EULER_KOKKOS_USE_MPI
456456
const int i_mpi = params.myMpiPos[IX];
457-
const int j_mpi = params.myMpiPos[IT];
457+
const int j_mpi = params.myMpiPos[IY];
458458
const int k_mpi = params.myMpiPos[IZ];
459459
#else
460460
const int i_mpi = 0;
@@ -580,7 +580,7 @@ class RayleighTaylorInstabilityFunctor3D : public HydroBaseFunctor3D
580580

581581
#ifdef EULER_KOKKOS_USE_MPI
582582
const int i_mpi = params.myMpiPos[IX];
583-
const int j_mpi = params.myMpiPos[IT];
583+
const int j_mpi = params.myMpiPos[IY];
584584
const int k_mpi = params.myMpiPos[IZ];
585585
#else
586586
const int i_mpi = 0;
@@ -664,7 +664,7 @@ class RayleighTaylorInstabilityFunctor3D : public HydroBaseFunctor3D
664664

665665
// init gravity field
666666
gravity(i, j, k, IX) = gravity_x;
667-
gravity(i, j, k, IT) = gravity_y;
667+
gravity(i, j, k, IY) = gravity_y;
668668
gravity(i, j, k, IZ) = gravity_z;
669669

670670
} // end operator ()

0 commit comments

Comments
 (0)