You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# GitHub Copilot Instructions – Pull-Request Reviews for MFC
2
+
3
+
These instructions guide **GitHub Copilot Code Review** and **Copilot Chat** when they evaluate pull requests in this repository.
4
+
5
+
---
6
+
7
+
## 1 Project Context (always include)
8
+
9
+
***Project:** MFC (exascale many-physics solver) written in **modern Fortran 2008+**, generated with **Fypp**.
10
+
***Directory layout:**
11
+
* Sources in `src/`, tests in `tests/`, examples in `examples/`.
12
+
* Most source files are templated `.fpp`; CMake transpiles them to `.f90`.
13
+
***Fypp macros** are in `src/<subprogram>/include/`, where `<subprogram>` is `simulation`, `common`, `pre_process`, or `post_process`. Review these first.
14
+
* Only `simulation` (plus its `common` dependencies) is GPU-accelerated with **OpenACC**.
15
+
16
+
> **Copilot, when reviewing:**
17
+
> * Treat the codebase as free-form Fortran 2008+ with `implicit none`, explicit `intent`, and standard intrinsics.
18
+
> * Prefer `module … contains … subroutine foo()` over legacy constructs; flag uses of `COMMON`, file-level `include`, or other global state.
Copy file name to clipboardExpand all lines: docs/documentation/case.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,6 +236,16 @@ and use `patch_icpp(i)%%geometry = 7` and `patch_icpp(i)%%hcid = 200` in the inp
236
236
Additional variables can be declared in `Hardcoded1[2,3]DVariables` and used in `hardcoded1[2,3]D`.
237
237
As a convention, any hard coded patches that are part of the MFC master branch should be identified as 1[2,3]xx where the first digit indicates the number of dimensions.
238
238
239
+
The code provides three pre-built patches for dimensional extrusion of initial conditions:
240
+
241
+
-`case(170)`: Load 1D profile from data files
242
+
-`case(270)`: Extrude 1D data to 2D domain
243
+
-`case(370)`: Extrude 2D data to 3D domain
244
+
245
+
Setup: Only requires specifying `init_dir` and filename pattern via `zeros_default`. Grid dimensions are automatically detected from the data files.
246
+
Implementation: All variables and file handling are managed in `src/pre_process/include/ExtrusionHardcodedIC.fpp` with no manual grid configuration needed.
247
+
Usage: Ideal for initializing simulations from lower-dimensional solutions, enabling users to add perturbations or modifications to the base extruded fields for flow instability studies.
248
+
239
249
#### Parameter Descriptions
240
250
241
251
-`num_patches` defines the total number of patches defined in the domain.
real(wp), parameter:: small_alf =1.e-11_wp !< Small alf tolerance
14
14
real(wp), parameter:: pi =3.141592653589793_wp !< Pi
15
15
real(wp), parameter:: verysmall =1.e-12_wp !< Very small number
16
16
@@ -29,7 +29,7 @@ module m_constants
29
29
integer, parameter:: dflt_num_igr_warm_start_iters =50 !< default number of iterations for IGR elliptic solve
30
30
real(wp), parameter:: dflt_alf_factor =10._wp !< scaling factor for IGR alpha
31
31
integer, parameter:: gp_layers =3 !< Number of ghost point layers for IBM
32
-
real(wp), parameter:: capillary_cutoff =1e-6 !< color function gradient magnitude at which to apply the surface tension fluxes
32
+
real(wp), parameter:: capillary_cutoff =1.e-6 !< color function gradient magnitude at which to apply the surface tension fluxes
33
33
real(wp), parameter:: acoustic_spatial_support_width =2.5_wp !< Spatial support width of acoustic source, used in s_source_spatial
34
34
real(wp), parameter:: dflt_vcfl_dt =100._wp !< value of vcfl_dt when viscosity is off for computing adaptive timestep size
35
35
real(wp), parameter:: broadband_spectral_level_constant =20._wp !< The constant to scale the spectral level at the lower frequency bound
@@ -44,25 +44,25 @@ module m_constants
44
44
integer, parameter:: Ifactor_bary_3D =20 !< Multiple factor of the ratio (triangle area to cell face area) for interpolation on triangle facets for 3D models
45
45
integer, parameter:: num_ray =20 !< Default number of rays traced per cell
46
46
real(wp), parameter:: ray_tracing_threshold =0.9_wp !< Threshold above which the cell is marked as the model patch
47
-
real(wp), parameter:: threshold_vector_zero =1e-10 !< Threshold to treat the component of a vector to be zero
48
-
real(wp), parameter:: threshold_edge_zero =1e-10 !< Threshold to treat two edges to be overlapped
49
-
real(wp), parameter:: threshold_bary =1e-1 !< Threshold to interpolate a barycentric facet
50
-
real(wp), parameter:: initial_distance_buffer =1e12_wp !< Initialized levelset distance for the shortest path pair algorithm
47
+
real(wp), parameter:: threshold_vector_zero =1.e-10_wp !< Threshold to treat the component of a vector to be zero
48
+
real(wp), parameter:: threshold_edge_zero =1.e-10_wp !< Threshold to treat two edges to be overlapped
49
+
real(wp), parameter:: threshold_bary =1.e-1_wp !< Threshold to interpolate a barycentric facet
50
+
real(wp), parameter:: initial_distance_buffer =1.e12_wp !< Initialized levelset distance for the shortest path pair algorithm
51
51
52
52
! Lagrange bubbles constants
53
53
integer, parameter:: mapCells =3 !< Number of cells around the bubble where the smoothening function will have effect
54
54
real(wp), parameter:: R_uni =8314._wp ! Universal gas constant - J/kmol/K
0 commit comments