Skip to content

Commit 65de40f

Browse files
Dimitrios AdamDimitrios Adam
authored andcommitted
Fix merge conflict in toolchain/mfc/test/cases.py
2 parents 0374f70 + d513442 commit 65de40f

139 files changed

Lines changed: 9509 additions & 3315 deletions

File tree

Some content is hidden

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

.claude/rules/common-pitfalls.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313

1414
## Field Variable Indexing
1515
- Conserved variables: `q_cons_vf(1:sys_size)`. Primitive: `q_prim_vf(1:sys_size)`.
16-
- Index ranges depend on `model_eqns` and enabled features (set in `m_global_parameters.fpp`):
17-
- `cont_idx` — continuity (partial densities, one per fluid)
18-
- `mom_idx` — momentum components
19-
- `E_idx` — total energy (scalar)
20-
- `adv_idx` — volume fractions (advection equations)
21-
- `bub_idx`, `stress_idx`, `xi_idx`, `species_idx`, `B_idx`, `c_idx` — optional
22-
- Shorthand scalars: `momxb`/`momxe`, `contxb`/`contxe`, `advxb`/`advxe`, etc.
16+
- All equation indices live in the unified `eqn_idx` struct (`eqn_idx_info` type in `m_derived_types.fpp`).
17+
Index ranges depend on `model_eqns` and enabled features (set in `m_global_parameters.fpp`):
18+
- `eqn_idx%cont` — continuity range (partial densities, one per fluid)
19+
- `eqn_idx%mom` — momentum range
20+
- `eqn_idx%E` — total energy (scalar)
21+
- `eqn_idx%adv` — volume fractions (advection equations)
22+
- `eqn_idx%bub`, `eqn_idx%stress`, `eqn_idx%xi`, `eqn_idx%species`, `eqn_idx%B` — optional
23+
- `eqn_idx%gamma`, `eqn_idx%pi_inf`, `eqn_idx%alf`, `eqn_idx%int_en` — additional scalars/ranges
24+
- Use `eqn_idx%cont%beg`/`eqn_idx%cont%end`, `eqn_idx%mom%beg`/`eqn_idx%mom%end`, etc. (old `contxb`/`contxe`, `momxb`/`momxe` shorthands are gone)
2325
- `sys_size` = total number of conserved variables (computed at startup)
2426
- Changing `model_eqns` or enabling features changes ALL index positions
2527

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
continue-on-error: true
150150

151151
github:
152-
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, intel={3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
152+
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }}
153153
needs: [lint-gate, file-changes, rebuild-cache]
154154
if: >-
155155
!cancelled() &&

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ exit 0
636636
target_compile_options(${a_target} PRIVATE -fopenmp)
637637
target_link_options(${a_target} PRIVATE -fopenmp)
638638
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
639-
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a)
639+
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a -fopenmp-target-fast -fopenmp-assume-threads-oversubscription -fopenmp-assume-teams-oversubscription)
640640
target_link_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a)
641641
endif()
642642
endif()
@@ -1026,4 +1026,4 @@ site_name(SITE_NAME)
10261026

10271027
configure_file(
10281028
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake/configuration.cmake.in"
1029-
"${CMAKE_CURRENT_BINARY_DIR}/configuration.txt")
1029+
"${CMAKE_CURRENT_BINARY_DIR}/configuration.txt")

docs/documentation/architecture.md.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ The index layout within `q_cons_vf` depends on the flow model:
4949
```
5050
For model_eqns == 2 (5-equation, multi-fluid):
5151

52-
Index: 1 .. num_fluids | num_fluids+1 .. +num_vels | E_idx | adv_idx
53-
Meaning: alpha*rho_k | momentum components | energy | volume fractions
52+
Index: 1 .. num_fluids | num_fluids+1 .. +num_vels | eqn_idx%E | eqn_idx%adv
53+
Meaning: alpha*rho_k | momentum components | energy | volume fractions
5454
```
5555

5656
Additional variables are appended for bubbles, elastic stress, magnetic fields, or chemistry species when those models are enabled. The total count is `sys_size`.

docs/documentation/case.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ In the example above, the following code is generated:
235235

236236
```f90
237237
if (patch_id == 2) then
238-
q_prim_vf(contxb)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*3.141592653589793)
238+
q_prim_vf(eqn_idx%cont%beg)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*3.141592653589793)
239239
end if
240240
```
241241

@@ -331,6 +331,10 @@ This is enabled by adding ``'elliptic_smoothing': "T",`` and ``'elliptic_smoothi
331331
| `moving_ibm` | Integer | Sets the method used for IB movement. |
332332
| `vel(i)` | Real | Initial velocity of the moving IB in the i-th direction. |
333333
| `angular_vel(i)` | Real | Initial angular velocity of the moving IB in the i-th direction. |
334+
| `coefficient_of_restitution` | Real | A number 0 to 1 describing how elastic IB collisions are |
335+
| `collision_model` | Integer | Integer to select the collision model being used for IB collisions. |
336+
| `collision_time` | Real | Amount of simulation time used to resolve collisions |
337+
| `ib_coefficient_of_friction` | Real | Coefficient of friction used in IB collisions |
334338

335339
These parameters should be prepended with `patch_ib(j)%` where $j$ is the patch index.
336340

@@ -361,6 +365,14 @@ Additional details on this specification can be found in [NACA airfoil](https://
361365

362366
- `angular_vel(i)` is the initial angular velocity of the IB about the x, y, z axes for i=1, 2, 3 in radians per second. When `moving_ibm` equals 2, this rotation rate is just the starting rate of the object, which will then change due to external torques. If `moving_ibm` equals 1, then this is constant if it is a number, or can be described analytically with an expression.
363367

368+
- `coefficient_of_restitution` is a number from 0 (exclusive) to 1 (inclusive) describing how elastic IB collisions are. 0 is for perfectly inellastic collisions while 1 is for perfectly ellastic collisions.
369+
370+
- `collision_model` is an integer to select the collision model being used for IB collisions. Using 0 disables collisions and collisiono checking. 1 enables the soft-sphere collision model, where all IBs must be circles or sphere and those IBs can collide with each other as well as walls.
371+
372+
- `collision_time` is approximately the amount of simulation time used to resolve collisions. This is handled by modifying the spring gonstant used to apply collision forces.
373+
374+
- `ib_coefficient_of_friction` is the coefficient of friction used in IB collisions.
375+
364376
### 5. Fluid Material's {#sec-fluid-materials}
365377

366378
| Parameter | Type | Description |
@@ -433,6 +445,7 @@ See @ref equations "Equations" for the mathematical models these parameters cont
433445
| `mp_weno` | Logical | Monotonicity preserving WENO |
434446
| `muscl_order` | Integer | MUSCL order [1,2] |
435447
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
448+
| `muscl_eps` | Real | MUSCL limiter slope-product threshold (default: hard-coded thresholds; set to 0 for textbook behavior) |
436449
| `flux_lim` | Integer | Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE |
437450
| `int_comp` | Logical | THINC Interface Compression |
438451
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
@@ -530,6 +543,10 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
530543
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
531544
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
532545

546+
- `muscl_eps` controls the slope-product activation threshold for all MUSCL limiters.
547+
When not set (default), the threshold is 1e-9 for minmod/MC, and 1e-6 for others.
548+
Setting `muscl_eps = 0` gives textbook limiter behavior where limiters activate whenever both slopes have the same sign.
549+
533550
- `int_comp` activates interface compression using THINC used in MUSCL Reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
534551

535552
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.
@@ -1056,8 +1073,20 @@ When ``cyl_coord = 'T'`` is set in 2D the following constraints must be met:
10561073

10571074
- `cantera_file` specifies the chemical mechanism file. If the file is part of the standard Cantera library, only the filename is required. Otherwise, the file must be located in the same directory as your `case.py` file
10581075

1076+
### 18. Chemistry-Specific Boundary Conditions
1077+
1078+
| Parameter | Type | Description |
1079+
| ---: | :----: | :--- |
1080+
| `bc_[x,y,z]%%isothermal_in` | Logical | Enable isothermal wall at the domain entrance (minimum coordinate). |
1081+
| `bc_[x,y,z]%%isothermal_out` | Logical | Enable isothermal wall at the domain exit (maximum coordinate). |
1082+
| `bc_[x,y,z]%%Twall_in` | Real | Temperature [K] of the entrance isothermal wall. |
1083+
| `bc_[x,y,z]%%Twall_out` | Real | Temperature [K] of the exit isothermal wall. |
1084+
1085+
This boundary condition can be used for fixed-temperature (isothermal) walls at the domain extremities. It is exclusively available for reacting flows and requires chemistry to be enabled. It properly evaluates heat and species fluxes at the interface when ``chemistry = 'T'``, ``chem_params%%diffusion = 'T'``, and the corresponding domain boundary is set to a slip wall (`bc_[x,y,z]%%[beg,end]` = -15) or a no-slip wall (`bc_[x,y,z]%%[beg,end]` = -16).
1086+
1087+
10591088

1060-
### 18. GPU Performance (NVIDIA UVM)
1089+
### 19. GPU Performance (NVIDIA UVM)
10611090

10621091
| Parameter | Type | Description |
10631092
| ---: | :---: | :--- |

docs/documentation/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ do l = 0, p
334334
do k = 0, n
335335
do j = 0, m
336336
rho = q_prim_vf(1)%sf(j, k, l)
337-
pres = q_prim_vf(E_idx)%sf(j, k, l)
337+
pres = q_prim_vf(eqn_idx%E)%sf(j, k, l)
338338
! ... use rho, pres as thread-local ...
339339
end do
340340
end do
@@ -369,7 +369,7 @@ do l = 0, p
369369
do j = 0, m
370370
$:GPU_LOOP(parallelism='[seq]')
371371
do i = 1, num_fluids
372-
alpha(i) = q_prim_vf(advxb + i - 1)%sf(j, k, l)
372+
alpha(i) = q_prim_vf(eqn_idx%adv%beg + i - 1)%sf(j, k, l)
373373
end do
374374
end do
375375
end do

docs/documentation/expectedPerformance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Note:
137137
| NVIDIA A10 | FP32-only GPU | GPU | 1 GPU | 4.3 | NVHPC 24.1 | TAMU Faster |
138138
| AMD EPYC 7713 | Milan, Zen3 | CPU | 64 cores | 5.0 | GNU 12.3.0 | GT Phoenix |
139139
| Intel Xeon 8480CL | Sapphire Rapids | CPU | 56 cores | 5.0 | NVHPC 24.5 | GT Phoenix |
140+
| Apple M5 Pro | | CPU | 18 cores | 5.4 | GNU 15.2.0 | N/A |
140141
| Intel Xeon 6454S | Sapphire Rapids | CPU | 32 cores | 5.6 | NVHPC 24.5 | GT Rogues Gallery |
141142
| Intel Xeon 8462Y+ | Sapphire Rapids | CPU | 32 cores | 6.2 | GNU 12.3.0 | GT ICE |
142143
| Intel Xeon 6548Y+ | Emerald Rapids | CPU | 32 cores | 6.6 | Intel 2021.9 | GT ICE |

docs/documentation/visualization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Post-processed data in Silo-HDF5 format (`format=1`) can be opened directly in P
205205
Paraview 5.11.0 has been confirmed to work with the MFC databases for some parallel environments.
206206
Nevertheless, the installation and configuration of Paraview can be environment-dependent and are left to the user.
207207

208-
The user can launch Paraview and open the index files under `/silo_hdf5/root`.
208+
The user can launch Paraview and open the series file `/silo_hdf5/collection.silo.series`.
209209
Once the database is loaded, flow field variables contained in the database can be added to the render view.
210210
Further information on Paraview can be found in its [documentation](https://docs.paraview.org/en/latest/).
211211
The figure below shows the iso-contour of the liquid void fraction (`alpha1`) in the database generated by the example case `3D_sphbubcollapse`.

docs/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
{ name: "Mach 0.3 flow over a corgi (2M STL)", image: "res/simulations/u.png", computer: "HiPerGator", computerUrl: "https://www.rc.ufl.edu/about/hipergator/", accelerators: "2 GPUs", walltime: "80s", source: "https://www.youtube.com/watch?v=O8dSRqHLp_o" },
5959
// Shock-droplet
6060
{ name: "Shedding water droplet", image: "res/simulations/a.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "960 V100s", walltime: "4h", source: "https://www.youtube.com/watch?v=Gjj-qZkXcrg" },
61+
{ name: "1K resolved particles", image: "res/simulations/x.jpg", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "4 A100s", walltime: "~1.5h", source: "https://www.youtube.com/watch?v=ufisHG0KkOU" },
6162
// Biomedical & acoustics
6263
{ name: "Burstwave lithotripsy", image: "res/simulations/k.png", computer: "Delta", computerUrl: "https://www.ncsa.illinois.edu/research/project-highlights/delta/", accelerators: "128 A100s", walltime: "30m", source: "https://www.youtube.com/watch?v=XWsUTaJXGF8" },
6364
{ name: "Cavitation fragments kidney stone", image: "res/simulations/d.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "576 V100s", walltime: "30m", source: "https://doi.org/10.48550/arXiv.2305.09163" },
@@ -74,6 +75,7 @@
7475
{ name: "Breakup of vibrated interface", image: "res/simulations/f.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "128 V100s", walltime: "4h", source: "https://www.youtube.com/watch?v=XQ3g1oSg8mc" },
7576
{ name: "Viscous Taylor-Green vortex", image: "res/simulations/h.png", computer: "Delta", computerUrl: "https://www.ncsa.illinois.edu/research/project-highlights/delta/", accelerators: "128 A100s", walltime: "17h", source: "https://www.youtube.com/watch?v=7i2h08dlDQw" },
7677
{ name: "Mach 1.5 shock-helium bubble", image: "res/simulations/t.png", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "1 A100", walltime: "1h", source: "https://www.youtube.com/watch?v=zDJoe0NYZsQ" },
78+
{ name: "Sphere collision and wall rebound", image: "res/simulations/w.jpg", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "4 A100s", walltime: "~2h", source: "https://www.youtube.com/watch?v=5ugLuDtV0C0" },
7779
];
7880

7981
const scalings = [

docs/module_categories.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"m_chemistry",
2727
"m_acoustic_src",
2828
"m_body_forces",
29-
"m_pressure_relaxation"
29+
"m_pressure_relaxation",
30+
"m_collisions"
3031
]
3132
},
3233
{

0 commit comments

Comments
 (0)