fix(post): exchange chemistry temperature seam ghosts for chemistry#1649
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a post-processing MPI seam/ghost-cell initialization issue for chemistry runs by ensuring the temperature Newton initial guess (q_T) is valid at rank seams before conservative→primitive conversion is performed over ghost-inclusive bounds. This prevents uninitialized-temperature propagation that can yield NaN temperature/pressure/sound speed in multi-rank, non-diffusion chemistry post-processing runs.
Changes:
- Seed chemistry temperature (
q_T_sf) over interior bounds (idwint) inpost_processstartup, then extend into ghosts via the existing buffer-population step. - In
m_mpi_common, exchange temperature seam ghosts for any chemistry run in non-simulation builds, while keeping the diffusion-only exchange behavior insimulationvia an#ifdef MFC_SIMULATIONsplit.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/post_process/m_start_up.fpp | Seeds q_T_sf over interior bounds to avoid Newton iteration on unread ghost q_cons, relying on later buffer population to fill ghosts. |
| src/common/m_mpi_common.fpp | Ensures q_T_sf seam ghost exchange occurs for all chemistry post-processing runs (not only diffusion), while preserving simulation’s diffusion-only behavior. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1649 +/- ##
=========================================
Coverage ? 59.56%
=========================================
Files ? 83
Lines ? 21112
Branches ? 3128
=========================================
Hits ? 12576
Misses ? 6434
Partials ? 2102 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…stry run, not only diffusion; seed q_T over the interior
b606661 to
eb0dd30
Compare
post_processconverts conservative → primitive variables over the ghost-inclusive bounds, so the temperature Newton guess must be valid at rank seams for every chemistry run. Previously the temperature seam ghost was exchanged only whenchem_params%diffusionwas set, so a multi-rank non-diffusion chemistry run left the rank-seam Newton guess uninitialized →NaNtemperature / pressure / sound-speed in the output.Fix:
m_mpi_common: exchange the temperature seam ghost for any chemistry run inpost_process(simulation keeps the diffusion-only condition, since it does not convert over the ghost shell) via an#ifdef MFC_SIMULATIONsplit.post_process/m_start_up: seedq_Tover the interior (idwint) rather than the ghost-inclusive bounds (idwbuff) — the ghostq_consis unread at that point, so a ghost-inclusive Newton sweep iterates on uninitialized data;s_populate_variables_buffersextendsq_Tinto the ghosts afterward.Extracted as a standalone fix from the AMR/scaling work (
up/mega); the AMR-specific coupling in the original change was dropped for this general fix. CI runs the full matrix as the gate.