Skip to content

Commit 98f9986

Browse files
committed
2 parents 1a9082b + 25d9b5a commit 98f9986

File tree

192 files changed

+849
-270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+849
-270
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
pull_request:
1616

1717
workflow_dispatch:
18-
18+
1919
jobs:
2020
github:
2121
name: Github
@@ -24,24 +24,25 @@ jobs:
2424
os: ['ubuntu', 'macos']
2525
mpi: ['mpi', 'no-mpi']
2626
debug: ['debug', 'no-debug']
27-
intel: [false]
27+
intel: [true, false]
2828
fail-fast: false
2929
continue-on-error: true
3030
runs-on: ${{ matrix.os }}-latest
3131
steps:
3232
- name: Clone
33+
if: matrix.os == 'ubuntu' || (matrix.os == 'macos' && matrix.intel == false)
3334
uses: actions/checkout@v3
3435

3536
- name: Setup MacOS
36-
if: matrix.os == 'macos'
37+
if: matrix.os == 'macos' && matrix.intel == false
3738
run: |
3839
echo "CC=gcc-13" >> $GITHUB_ENV
3940
echo "CXX=g++-13" >> $GITHUB_ENV
4041
echo "FC=gfortran-13" >> $GITHUB_ENV
4142
brew install wget make python make cmake coreutils gcc@13
4243
4344
- name: (MacOS) Build OpenMPI
44-
if: matrix.os == 'macos' && matrix.mpi == 'mpi'
45+
if: matrix.os == 'macos' && matrix.mpi == 'mpi' && matrix.intel == false
4546
run: |
4647
echo "OMPI_FC=gfortran-13" >> $GITHUB_ENV
4748
echo "OMPI_CXX=g++-13" >> $GITHUB_ENV
@@ -51,9 +52,9 @@ jobs:
5152
- name: Setup Ubuntu
5253
if: matrix.os == 'ubuntu' && matrix.intel == false
5354
run: |
54-
sudo apt update -y
55-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
56-
55+
sudo apt update -y
56+
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
57+
5758
- name: Setup Ubuntu (Intel)
5859
if: matrix.os == 'ubuntu' && matrix.intel == true
5960
run: |
@@ -72,12 +73,29 @@ jobs:
7273
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
7374
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
7475
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
76+
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
77+
78+
- name: Build-intel
79+
if: matrix.intel == true && matrix.os == 'ubuntu'
80+
run: |
81+
source /opt/intel/oneapi/setvars.sh
82+
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
7583
7684
- name: Build
77-
run: /bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
85+
if: matrix.intel == false
86+
run: |
87+
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
88+
89+
- name: Test-intel
90+
if: matrix.intel == true && matrix.os == 'ubuntu'
91+
run: |
92+
source /opt/intel/oneapi/setvars.sh
93+
/bin/bash mfc.sh test -j $(nproc) $(if [ "${{ matrix.mpi }}" == "mpi" ]; then echo "--test-all"; fi)
7894
7995
- name: Test
80-
run: /bin/bash mfc.sh test -j $(nproc) $(if [ "${{ matrix.mpi }}" == "mpi" ]; then echo "--test-all"; fi)
96+
if: matrix.intel == false
97+
run: |
98+
/bin/bash mfc.sh test -j $(nproc) $(if [ "${{ matrix.mpi }}" == "mpi" ]; then echo "--test-all"; fi)
8199
82100
docker:
83101
name: Github | Docker

docs/documentation/authors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ We try to maintain a list of current and past developers:
1717
+ M. Rodriguez
1818
+ K. Schmidmayer
1919
+ J. Spratt
20+
+ B. Wilfong

docs/documentation/case.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,14 @@ end if
205205

206206
#### Hard Coded Patches
207207

208-
Some patch configurations are not adequatley handeled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifers to `src/pre_process/include/1[2,3]dHardcodedIC.fpp`. For example, to add a 2D Hardcoded patch with an id of 201, one would add the following to `src/pre_process/include/2dHardcodedIC.fpp`
208+
Some patch configurations are not adequatley handeled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifers to `src/pre_process/include/1[2,3]dHardcodedIC.fpp`. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to `src/pre_process/include/2dHardcodedIC.fpp`
209209

210210
```f90
211-
if (patch_icpp%hcid == 201) then
211+
case(200)
212212
! Primitive variables assignment
213-
end if
214213
```
215214

216-
and use `patch_icpp(i)%geometry = y` and `patch_icpp(i)%hcid = 201` in the input file. As a convention, any hard coded patches that are part of the MFC master branch should be identied as 1[2,3]xx where the first digit indiates the number of dimensions.
215+
and use `patch_icpp(i)%geometry = 7` and `patch_icpp(i)%hcid = 200` in the input file. Additional variables can be declared in `Hardcoded1[2,3]DVariables` and used in `hardcoded1[2,3]D`. As a convention, any hard coded patches that are part of the MFC master branch should be identied as 1[2,3]xx where the first digit indiates the number of dimensions.
217216

218217
#### Parameter Descriptions
219218

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 2D Hardcodied IC Example
2+
3+
## Initial Condition
4+
5+
![Initial Condition](initial.png)
6+
7+
## Result
8+
9+
![Result](result.png)

examples/2D_hardcodied_ic/case.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
5+
eps = 1e-9
6+
7+
# Configuring case dictionary
8+
print(json.dumps({
9+
# Logistics ================================================
10+
'run_time_info' : 'T',
11+
# ==========================================================
12+
13+
# Computational Domain Parameters ==========================
14+
'x_domain%beg' : 0.E+00,
15+
'x_domain%end' : 4.E+00,
16+
'stretch_x' : 'T',
17+
'a_x' : 7,
18+
'x_a' : -2,
19+
'x_b' : 2,
20+
'y_domain%beg' : 0.E+00,
21+
'y_domain%end' : 4.E+00,
22+
'stretch_y' : 'T',
23+
'a_y' : 7,
24+
'y_a' : -2,
25+
'y_b' : 2,
26+
'm' : 199,
27+
'n' : 199,
28+
'p' : 0,
29+
'dt' : 5.E-06,
30+
't_step_start' : 0,
31+
't_step_stop' : 2000,
32+
't_step_save' : 200,
33+
# ==========================================================
34+
35+
# Simulation Algorithm Parameters ==========================
36+
'num_patches' : 1,
37+
'model_eqns' : 3,
38+
'alt_soundspeed' : 'F',
39+
'num_fluids' : 2,
40+
'adv_alphan' : 'T',
41+
'mpp_lim' : 'T',
42+
'mixture_err' : 'T',
43+
'time_stepper' : 3,
44+
'weno_order' : 5,
45+
'weno_eps' : 1.E-16,
46+
'mapped_weno' : 'T',
47+
'null_weights' : 'F',
48+
'mp_weno' : 'F',
49+
'riemann_solver' : 2,
50+
'wave_speeds' : 1,
51+
'avg_state' : 2,
52+
'bc_x%beg' : -2,
53+
'bc_x%end' : -7,
54+
'bc_y%beg' : -2,
55+
'bc_y%end' : -7,
56+
# ==========================================================
57+
58+
# Formatted Database Files Structure Parameters ============
59+
'format' : 1,
60+
'precision' : 2,
61+
'prim_vars_wrt' :'T',
62+
'parallel_io' :'T',
63+
# ==========================================================
64+
65+
# Patch 1: Base ============================================
66+
'patch_icpp(1)%geometry' : 7,
67+
'patch_icpp(1)%hcid' : 200,
68+
'patch_icpp(1)%x_centroid' : 4.,
69+
'patch_icpp(1)%y_centroid' : 4.,
70+
'patch_icpp(1)%length_x' : 8.,
71+
'patch_icpp(1)%length_y' : 8.,
72+
'patch_icpp(1)%vel(1)' : 0.,
73+
'patch_icpp(1)%vel(2)' : 0.,
74+
'patch_icpp(1)%pres' : 10,
75+
'patch_icpp(1)%alpha_rho(1)' : (1-eps)*1000,
76+
'patch_icpp(1)%alpha_rho(2)' : eps*1,
77+
'patch_icpp(1)%alpha(1)' : 1-eps,
78+
'patch_icpp(1)%alpha(2)' : eps,
79+
# ===========================================================
80+
81+
# Fluids Physical Parameters ===============================
82+
'fluid_pp(1)%gamma' : 1.E+00/(2.35E+00-1.E+00),
83+
'fluid_pp(1)%pi_inf' : 2.35E+00*1.E+09/(2.35E+00-1.E+00),
84+
'fluid_pp(2)%gamma' : 1.E+00/(1.4E+00-1.E+00),
85+
'fluid_pp(2)%pi_inf' : 0.E+00,
86+
# ==========================================================
87+
}))
88+
# ==============================================================================
17.4 KB
Loading
59.9 KB
Loading

src/common/m_variables_conversion.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,6 @@ contains
690690
s_convert_to_mixture_variables => &
691691
s_convert_species_to_mixture_variables
692692
end if
693-
694693
end subroutine s_initialize_variables_conversion_module ! --------------
695694

696695
!Initialize mv at the quadrature nodes based on the initialized moments and sigma

src/post_process/m_data_input.f90

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
405405

406406
call s_mpi_sendrecv_grid_vars_buffer_regions('beg', 'x')
407407

408-
do i = 1, offset_x%beg
409-
x_cb(-1 - i) = x_cb(-i) - dx(-i)
410-
end do
408+
end if
411409

412-
do i = 1, buff_size
413-
x_cc(-i) = x_cc(1 - i) - (dx(1 - i) + dx(-i))/2d0
414-
end do
410+
do i = 1, offset_x%beg
411+
x_cb(-1 - i) = x_cb(-i) - dx(-i)
412+
end do
415413

416-
end if
414+
do i = 1, buff_size
415+
x_cc(-i) = x_cc(1 - i) - (dx(1 - i) + dx(-i))/2d0
416+
end do
417417

418418
! Ghost-cell extrapolation BC at the end
419419
if (bc_x%end <= -3) then
@@ -441,15 +441,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
441441

442442
call s_mpi_sendrecv_grid_vars_buffer_regions('end', 'x')
443443

444-
do i = 1, offset_x%end
445-
x_cb(m + i) = x_cb(m + (i - 1)) + dx(m + i)
446-
end do
444+
end if
447445

448-
do i = 1, buff_size
449-
x_cc(m + i) = x_cc(m + (i - 1)) + (dx(m + (i - 1)) + dx(m + i))/2d0
450-
end do
446+
do i = 1, offset_x%end
447+
x_cb(m + i) = x_cb(m + (i - 1)) + dx(m + i)
448+
end do
451449

452-
end if
450+
do i = 1, buff_size
451+
x_cc(m + i) = x_cc(m + (i - 1)) + (dx(m + (i - 1)) + dx(m + i))/2d0
452+
end do
453453

454454
! END: Populating Buffer Regions in the x-direction ================
455455

@@ -483,15 +483,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
483483

484484
call s_mpi_sendrecv_grid_vars_buffer_regions('beg', 'y')
485485

486-
do i = 1, offset_y%beg
487-
y_cb(-1 - i) = y_cb(-i) - dy(-i)
488-
end do
486+
end if
489487

490-
do i = 1, buff_size
491-
y_cc(-i) = y_cc(1 - i) - (dy(1 - i) + dy(-i))/2d0
492-
end do
488+
do i = 1, offset_y%beg
489+
y_cb(-1 - i) = y_cb(-i) - dy(-i)
490+
end do
493491

494-
end if
492+
do i = 1, buff_size
493+
y_cc(-i) = y_cc(1 - i) - (dy(1 - i) + dy(-i))/2d0
494+
end do
495495

496496
! Ghost-cell extrapolation BC at the end
497497
if (bc_y%end <= -3) then
@@ -519,15 +519,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
519519

520520
call s_mpi_sendrecv_grid_vars_buffer_regions('end', 'y')
521521

522-
do i = 1, offset_y%end
523-
y_cb(n + i) = y_cb(n + (i - 1)) + dy(n + i)
524-
end do
522+
end if
525523

526-
do i = 1, buff_size
527-
y_cc(n + i) = y_cc(n + (i - 1)) + (dy(n + (i - 1)) + dy(n + i))/2d0
528-
end do
524+
do i = 1, offset_y%end
525+
y_cb(n + i) = y_cb(n + (i - 1)) + dy(n + i)
526+
end do
529527

530-
end if
528+
do i = 1, buff_size
529+
y_cc(n + i) = y_cc(n + (i - 1)) + (dy(n + (i - 1)) + dy(n + i))/2d0
530+
end do
531531

532532
! END: Populating Buffer Regions in the y-direction ================
533533

@@ -561,15 +561,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
561561

562562
call s_mpi_sendrecv_grid_vars_buffer_regions('beg', 'z')
563563

564-
do i = 1, offset_z%beg
565-
z_cb(-1 - i) = z_cb(-i) - dz(-i)
566-
end do
564+
end if
567565

568-
do i = 1, buff_size
569-
z_cc(-i) = z_cc(1 - i) - (dz(1 - i) + dz(-i))/2d0
570-
end do
566+
do i = 1, offset_z%beg
567+
z_cb(-1 - i) = z_cb(-i) - dz(-i)
568+
end do
571569

572-
end if
570+
do i = 1, buff_size
571+
z_cc(-i) = z_cc(1 - i) - (dz(1 - i) + dz(-i))/2d0
572+
end do
573573

574574
! Ghost-cell extrapolation BC at the end
575575
if (bc_z%end <= -3) then
@@ -597,15 +597,15 @@ subroutine s_populate_grid_variables_buffer_regions() ! ----------------
597597

598598
call s_mpi_sendrecv_grid_vars_buffer_regions('end', 'z')
599599

600-
do i = 1, offset_z%end
601-
z_cb(p + i) = z_cb(p + (i - 1)) + dz(p + i)
602-
end do
600+
end if
603601

604-
do i = 1, buff_size
605-
z_cc(p + i) = z_cc(p + (i - 1)) + (dz(p + (i - 1)) + dz(p + i))/2d0
606-
end do
602+
do i = 1, offset_z%end
603+
z_cb(p + i) = z_cb(p + (i - 1)) + dz(p + i)
604+
end do
607605

608-
end if
606+
do i = 1, buff_size
607+
z_cc(p + i) = z_cc(p + (i - 1)) + (dz(p + (i - 1)) + dz(p + i))/2d0
608+
end do
609609

610610
end if
611611

0 commit comments

Comments
 (0)