Skip to content

Commit ac5774e

Browse files
authored
Phase-2 completion: post-process context types, m_riemann_solvers split, cleanup (#1556)
1 parent b14def7 commit ac5774e

19 files changed

Lines changed: 5086 additions & 4960 deletions

docs/documentation/contributing.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ If your check enforces a physics constraint, also add a `PHYSICS_DOCS` entry (se
318318
Scalar declarations, GPU declare lines, Doxygen descriptions, and namelist bindings are
319319
auto-generated at build time (ninja-tracked custom command) from the `TYPED_DECLS` and `FORTRAN_ARRAY_DIMS`
320320
tables in `toolchain/mfc/params/definitions.py`. For a plain scalar registered with
321-
`_r()` / `_nv()` above, no manual Fortran edit is needed — reconfigure (`./mfc.sh build`)
322-
and the generated include in `m_global_parameters_common.fpp` (compiled per target) is updated
323-
automatically.
321+
`_r()` / `_nv()` above, no manual Fortran edit is needed — the next build regenerates the
322+
include in `m_global_parameters_common.fpp` (compiled per target) automatically: the
323+
generation command is ninja-tracked against every file under `toolchain/mfc/params/`.
324324

325325
Still manual (not auto-generated):
326326

@@ -333,8 +333,9 @@ Still manual (not auto-generated):
333333
include)
334334
- `CASE_OPT_EXTRA_LINES` in `toolchain/mfc/params/generators/fortran_gen.py` for case-optimization constants
335335

336-
After editing any generator or table, force regen by reconfiguring (`./mfc.sh build`) —
337-
cached builds compile stale includes.
336+
Editing any existing file under `toolchain/mfc/params/` (tables or generators) triggers
337+
regeneration on the next build automatically. Only *adding a new file* there requires one
338+
reconfigure — the dependency list is globbed at configure time.
338339

339340
**Step 6: Use in Fortran code**
340341

docs/module_categories.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"m_time_steppers",
77
"m_weno",
88
"m_riemann_solvers",
9+
"m_riemann_state",
10+
"m_riemann_solver_hlld",
11+
"m_riemann_solver_hll",
12+
"m_riemann_solver_lf",
13+
"m_riemann_solver_hllc",
914
"m_muscl",
1015
"m_variables_conversion",
1116
"m_thinc"

src/common/m_derived_types.fpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,46 @@ module m_derived_types
169169
#endif
170170
end type ic_context
171171

172+
!> Finite-difference state for post_process: density gradient magnitude for
173+
!> numerical Schlieren and centered FD coefficients in x-, y-, and z-directions.
174+
type fd_context
175+
real(wp), allocatable, dimension(:,:,:) :: gm_rho_sf !< Density gradient magnitude for numerical Schlieren
176+
real(wp), allocatable, dimension(:,:) :: fd_coeff_x !< FD coefficients in the x-direction
177+
real(wp), allocatable, dimension(:,:) :: fd_coeff_y !< FD coefficients in the y-direction
178+
real(wp), allocatable, dimension(:,:) :: fd_coeff_z !< FD coefficients in the z-direction
179+
end type fd_context
180+
181+
!> Output workspace for post_process: flow variable buffers, VisIt extents/offsets,
182+
!> directory paths, Silo/Binary file handles, and variable count.
183+
type output_context
184+
! Flow variable storage; q_root_sf gathers to rank 0 in 1D parallel runs
185+
real(wp), allocatable, dimension(:,:,:) :: q_sf !< Working flow variable field (public)
186+
real(wp), allocatable, dimension(:,:,:) :: q_root_sf !< Gathered 1D flow variable field (rank 0 only)
187+
real(wp), allocatable, dimension(:,:,:) :: cyl_q_sf !< Cylindrical-geometry reordered field
188+
! Single precision storage for flow variables
189+
real(sp), allocatable, dimension(:,:,:) :: q_sf_s !< Single-precision working field (public)
190+
real(sp), allocatable, dimension(:,:,:) :: q_root_sf_s !< Single-precision gathered 1D field
191+
real(sp), allocatable, dimension(:,:,:) :: cyl_q_sf_s !< Single-precision cylindrical reordered field
192+
! Spatial and data extents for VisIt visualization (Silo only)
193+
real(wp), allocatable, dimension(:,:) :: spatial_extents !< Spatial extents per process
194+
real(wp), allocatable, dimension(:,:) :: data_extents !< Data extents per process
195+
! Ghost zone layer sizes (lo/hi) for subdomain connectivity in VisIt (Silo only)
196+
integer, allocatable, dimension(:) :: lo_offset !< Ghost zone lo sizes per active direction
197+
integer, allocatable, dimension(:) :: hi_offset !< Ghost zone hi sizes per active direction
198+
! Cell-boundary count per active coordinate direction (Silo only)
199+
integer, allocatable, dimension(:) :: dims !< Cell-boundary counts per active direction
200+
! Formatted database directory paths
201+
character(LEN=path_len + name_len) :: dbdir !< Base database directory
202+
character(LEN=path_len + 2*name_len) :: proc_rank_dir !< Per-rank subdirectory
203+
character(LEN=path_len + 2*name_len) :: rootdir !< Root subdirectory
204+
! Formatted database file handles
205+
integer :: dbroot !< Master/root file handle
206+
integer :: dbfile !< Slave/local file handle
207+
integer :: optlist !< Silo options list handle (per-call scratch)
208+
! Variable count for Binary format
209+
integer :: dbvars !< Total flow variables to write
210+
end type output_context
211+
172212
type bc_patch_parameters
173213
integer :: geometry
174214
integer :: type

0 commit comments

Comments
 (0)