Skip to content

Commit 45d40e8

Browse files
Merged in upstream and formatted
1 parent 9a80857 commit 45d40e8

File tree

4 files changed

+77
-45
lines changed

4 files changed

+77
-45
lines changed

.github/workflows/intel.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Intel Compilers'
2+
3+
on: [push, pull, workflow_dispatch]
4+
5+
jobs:
6+
intel:
7+
name: intel
8+
continue-on-error: true
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Clone
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Ubuntu (Intel)
16+
run: |
17+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
18+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
19+
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
20+
echo "Add-apt-repository Complete"
21+
sudo apt-get update
22+
sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-mpi intel-oneapi-mpi-devel
23+
echo "Installed"
24+
source /opt/intel/oneapi/setvars.sh
25+
26+
- name: Build
27+
run: |
28+
/bin/bash mfc.sh test --dry-run -j $(nproc) --no-debug --mpi
29+
30+
- name: Test
31+
run: |
32+
/bin/bash mfc.sh test --max-attempts 3 -j $(nproc) --no-debug --mpi

src/pre_process/include/1dHardcodedIC.fpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44

55
#:def Hardcoded1D()
66
select case (patch_icpp(patch_id)%hcid)
7-
case (170)
8-
! This hardcoded case can be used to start a simulation with initial conditions given from a known 1D profile (e.g. Cantera, SDtoolbox)
9-
@: HardcodedReadValues()
7+
case (170)
8+
! This hardcoded case can be used to start a simulation with initial conditions given from a known 1D profile (e.g. Cantera, SDtoolbox)
9+
@: HardcodedReadValues()
1010

11-
case (180)
12-
! This is patch is hard-coded for test suite optimization used in the
13-
! 1D_shuoser cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.2*sin(5*x)"
14-
if (patch_id == 2) then
15-
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.2*sin(5*x_cc(i))
16-
end if
17-
18-
case (181)
19-
! This is patch is hard-coded for test suite optimization used in the
20-
! 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.1*sin(20*x*pi)"
21-
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*3.141592653589793)
11+
case (180)
12+
! This is patch is hard-coded for test suite optimization used in the
13+
! 1D_shuoser cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.2*sin(5*x)"
14+
if (patch_id == 2) then
15+
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.2*sin(5*x_cc(i))
16+
end if
2217

23-
case default
24-
call s_int_to_str(patch_id, iStr)
25-
call s_mpi_abort("Invalid hcid specified for patch "//trim(iStr))
18+
case (181)
19+
! This is patch is hard-coded for test suite optimization used in the
20+
! 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.1*sin(20*x*pi)"
21+
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*3.141592653589793)
22+
23+
case default
24+
call s_int_to_str(patch_id, iStr)
25+
call s_mpi_abort("Invalid hcid specified for patch "//trim(iStr))
2626
end select
2727

2828
#:enddef

src/pre_process/include/2dHardcodedIC.fpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,36 +160,36 @@
160160
case (270)
161161
! This hardcoded case extrudes a 1D profile to initialize a 2D simulation domain
162162
@: HardcodedReadValues()
163-
163+
164164
case (280)
165165
! This is patch is hard-coded for test suite optimization used in the
166166
! 2D_isentropicvortex case:
167167
! This analytic patch uses geometry 2
168168
if (patch_id == 1) then
169-
q_prim_vf(E_idx)%sf(i, j, 0) = 1d0*(1d0 - (1d0/1d0)*(5d0/(2d0*3.141592653589793))*(5d0/(8d0*1d0*(1.4 + 1d0)*3.141592653589793))*exp(2d0*1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0- (y_cc(j) - patch_icpp(1)%y_centroid)**2d0)))**(1.4 + 1d0)
170-
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1d0*(1d0 - (1d0/1d0)*(5d0/(2d0*3.141592653589793))*(5d0/(8d0*1d0*(1.4 + 1d0)*3.141592653589793))*exp(2d0*1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0- (y_cc(j) - patch_icpp(1)%y_centroid)**2d0)))**1.4
169+
q_prim_vf(E_idx)%sf(i, j, 0) = 1d0*(1d0 - (1d0/1d0)*(5d0/(2d0*3.141592653589793))*(5d0/(8d0*1d0*(1.4 + 1d0)*3.141592653589793))*exp(2d0*1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2d0)))**(1.4 + 1d0)
170+
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1d0*(1d0 - (1d0/1d0)*(5d0/(2d0*3.141592653589793))*(5d0/(8d0*1d0*(1.4 + 1d0)*3.141592653589793))*exp(2d0*1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2d0)))**1.4
171171
q_prim_vf(momxb + 0)%sf(i, j, 0) = 0d0 + (y_cc(j) - patch_icpp(1)%y_centroid)*(5d0/(2d0*3.141592653589793))*exp(1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2d0))
172172
q_prim_vf(momxb + 1)%sf(i, j, 0) = 0d0 - (x_cc(i) - patch_icpp(1)%x_centroid)*(5d0/(2d0*3.141592653589793))*exp(1d0*(1d0 - (x_cc(i) - patch_icpp(1)%x_centroid)**2d0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2d0))
173173
end if
174-
174+
175175
case (281)
176176
! This is patch is hard-coded for test suite optimization used in the
177177
! 2D_acoustic_pulse case:
178178
! This analytic patch uses geometry 2
179179
if (patch_id == 2) then
180-
q_prim_vf(E_idx)%sf(i, j, 0) = 101325*(1 - 0.5*(1.4 - 1)*(0.4)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1.4 / (1.4 - 1))
181-
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1*(1 - 0.5*(1.4 - 1)*(0.4)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1 / (1.4 - 1))
180+
q_prim_vf(E_idx)%sf(i, j, 0) = 101325*(1 - 0.5*(1.4 - 1)*(0.4)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1.4/(1.4 - 1))
181+
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1*(1 - 0.5*(1.4 - 1)*(0.4)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1/(1.4 - 1))
182182
end if
183183

184184
case (282)
185185
! This is patch is hard-coded for test suite optimization used in the
186186
! 2D_zero_circ_vortex case:
187187
! This analytic patch uses geometry 2
188188
if (patch_id == 2) then
189-
q_prim_vf(E_idx)%sf(i, j, 0) = 101325*(1 - 0.5*(1.4 - 1)*(0.1 / 0.3)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1.4 / (1.4 - 1))
190-
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1*(1 - 0.5*(1.4 - 1)*(0.1 / 0.3)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1 / (1.4 - 1))
191-
q_prim_vf(momxb + 0)%sf(i, j, 0) = 112.99092883944267*(1 - (0.1 / 0.3))*y_cc(j)*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2)))
192-
q_prim_vf(momxb + 1)%sf(i, j, 0) = 112.99092883944267*((0.1 / 0.3))*x_cc(i)*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2)))
189+
q_prim_vf(E_idx)%sf(i, j, 0) = 101325*(1 - 0.5*(1.4 - 1)*(0.1/0.3)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1.4/(1.4 - 1))
190+
q_prim_vf(contxb + 0)%sf(i, j, 0) = 1*(1 - 0.5*(1.4 - 1)*(0.1/0.3)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1/(1.4 - 1))
191+
q_prim_vf(momxb + 0)%sf(i, j, 0) = 112.99092883944267*(1 - (0.1/0.3))*y_cc(j)*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2)))
192+
q_prim_vf(momxb + 1)%sf(i, j, 0) = 112.99092883944267*((0.1/0.3))*x_cc(i)*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2)))
193193
end if
194194

195195
case default

src/pre_process/m_patches.fpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ contains
297297
@:analytical()
298298
299299
! check if this should load a hardcoded patch
300-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
300+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
301301
@:Hardcoded1D()
302302
end if
303303
@@ -367,7 +367,7 @@ contains
367367
eta, q_prim_vf, patch_id_fp)
368368

369369
@:analytical()
370-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
370+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
371371
@:Hardcoded2D()
372372
end if
373373

@@ -457,7 +457,7 @@ contains
457457
eta, q_prim_vf, patch_id_fp)
458458

459459
@:analytical()
460-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
460+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
461461
@:Hardcoded2D()
462462
end if
463463

@@ -852,7 +852,7 @@ contains
852852
eta, q_prim_vf, patch_id_fp)
853853

854854
@:analytical()
855-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
855+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
856856
@:Hardcoded2D()
857857
end if
858858

@@ -921,7 +921,7 @@ contains
921921
eta, q_prim_vf, patch_id_fp)
922922

923923
@:analytical()
924-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
924+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
925925
@:Hardcoded3D()
926926
end if
927927

@@ -998,7 +998,7 @@ contains
998998
eta, q_prim_vf, patch_id_fp)
999999

10001000
@:analytical()
1001-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1001+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
10021002
@:Hardcoded2D()
10031003
end if
10041004

@@ -1084,7 +1084,7 @@ contains
10841084
eta, q_prim_vf, patch_id_fp)
10851085

10861086
@:analytical()
1087-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1087+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
10881088
@:Hardcoded3D()
10891089
end if
10901090

@@ -1174,7 +1174,7 @@ contains
11741174
11751175
@:analytical()
11761176
1177-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1177+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
11781178
@:Hardcoded2D()
11791179
end if
11801180
@@ -1257,7 +1257,7 @@ contains
12571257
eta, q_prim_vf, patch_id_fp)
12581258

12591259
@:analytical()
1260-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1260+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
12611261
@:Hardcoded3D()
12621262
end if
12631263

@@ -1333,7 +1333,7 @@ contains
13331333
eta, q_prim_vf, patch_id_fp)
13341334

13351335
@:analytical()
1336-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1336+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
13371337
@:Hardcoded2D()
13381338
end if
13391339

@@ -1368,7 +1368,7 @@ contains
13681368
& `patch_icpp(patch_id)%geometry: 1` instead"
13691369

13701370
call s_line_segment(patch_id, patch_id_fp, q_prim_vf)
1371-
1371+
13721372
end subroutine s_1D_analytical
13731373

13741374
!! @param patch_id is the patch identifier
@@ -1422,7 +1422,7 @@ contains
14221422
eta, q_prim_vf, patch_id_fp)
14231423

14241424
@:analytical()
1425-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1425+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
14261426
@:Hardcoded1D()
14271427
end if
14281428

@@ -1442,7 +1442,7 @@ contains
14421442
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp
14431443
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
14441444

1445-
print *, "WARNING :: The use of the 2D analytical patch geometry has &
1445+
print *, "WARNING :: The use of the 2D analytical patch geometry has &
14461446
& been depricated and will be removed in a future release. Use &
14471447
& `patch_icpp(patch_id)%geometry: 3` instead"
14481448

@@ -1461,7 +1461,7 @@ contains
14611461
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp
14621462
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
14631463

1464-
print *, "WARNING :: The use of the 3D analytical patch geometry has &
1464+
print *, "WARNING :: The use of the 3D analytical patch geometry has &
14651465
& been depricated and will be removed in a future release. Use &
14661466
& `patch_icpp(patch_id)%geometry: 3` instead"
14671467

@@ -1700,7 +1700,7 @@ contains
17001700
eta, q_prim_vf, patch_id_fp)
17011701
17021702
@:analytical()
1703-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1703+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
17041704
@:Hardcoded3D()
17051705
end if
17061706
@@ -1799,7 +1799,7 @@ contains
17991799
eta, q_prim_vf, patch_id_fp)
18001800

18011801
@:analytical()
1802-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1802+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
18031803
@:Hardcoded3D()
18041804
end if
18051805

@@ -1959,7 +1959,7 @@ contains
19591959
eta, q_prim_vf, patch_id_fp)
19601960
19611961
@:analytical()
1962-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
1962+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
19631963
@:Hardcoded3D()
19641964
end if
19651965
@@ -2047,7 +2047,7 @@ contains
20472047
eta, q_prim_vf, patch_id_fp)
20482048

20492049
@:analytical()
2050-
if (patch_icpp(patch_id)%hcid .ne. dflt_int) then
2050+
if (patch_icpp(patch_id)%hcid /= dflt_int) then
20512051
@:Hardcoded3D()
20522052
end if
20532053

0 commit comments

Comments
 (0)