Skip to content

Couple passive periodic points to their masters in the implicit system - #3016

Open
bigfooted wants to merge 5 commits into
developfrom
fix_periodic_jacobian
Open

bigfooted wants to merge 5 commits into
developfrom
fix_periodic_jacobian

Conversation

@bigfooted

@bigfooted bigfooted commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

With implicit periodicity, the passive rows (first marker of each pair) are deleted and only their diagonal block is added to the master, so all off-diagonal couplings of periodic points are lost. On a wedge one cell thick every point is periodic and the Newton step becomes useless above CFL ~25.

  • CSolver::CouplePeriodicJacobian moves the off-diagonal blocks of passive rows and columns to their masters (rotated) before the periodic comms.
  • Coupling is all-or-nothing per point: a passive point is coupled only if its master is on the same rank, both lie on a single periodic marker, and every moved block exists in the sparsity pattern. On meshes that are one cell thick in the periodic direction (wedges) this holds for almost all periodic points; on thicker meshes no point qualifies and the treatment is unchanged from develop. Moving only the blocks that happen to fit (partial coupling) slowed down the primal and the discrete adjoint on thick meshes.
  • Works with the quantized Q_LU_SGS storage (blocks are decoded, added and re-encoded, since accumulating SetBlock is a no-op there).
  • The edge between a point and its own periodic image is left out of the local time step for coupled points (it made dt ~60x too small on the axis of a wedge).
  • Comments in CompletePeriodicComms corrected: the second marker of each pair is the master.
  • New case TestCases/incomp_rans/morse_swirl_jet (Morse 1980 swirling jet, 5 deg one-cell wedge, SA) and regression test inc_turb_morse_swirl_jet, which restarts from a converged solution for 10 iterations.

Regression values

  • Changed: inc_turb_morse_swirl_jet (new), sp_pipeSlice_3d_dp_hf_tp and sp_pipeSlice_3d_dp_ihf_tp (one-cell periodic slices, coupled).
  • transonic_stator (serial and parallel discrete adjoint) changed at the 1e-5 level on CI only. No point is coupled in this case, and local builds of develop and of this branch give bit-identical results for it.
  • All other periodic cases (turbomachinery, CHT, periodic channels, ...) couple no points and keep their develop values, including hybrid, AD and aarch64.

Related Work

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

🤖 Generated with Claude Code

With implicit periodicity, the PERIODIC_RESIDUAL comms delete the rows of
the passive points (first marker of each pair) and add only their diagonal
block to the master. The off-diagonal blocks of the passive rows, and the
columns of other rows that refer to passive points, are lost. On a wedge one
cell thick every point is periodic, so most of the Jacobian coupling
disappears and the Newton step is useless above CFL ~25.

CSolver::CouplePeriodicJacobian moves those blocks to the master rows and
columns, rotated, before the comms. Only masters on the same rank and blocks
that exist in the sparsity pattern are coupled. Blocks go through
GetBlockView/SetBlock, so the quantized Q_LU_SGS storage works too.

The edge between a point and its own periodic image is left out of the local
time step. It only rotates the state, but it added the sound speed and the
viscous term and made the time step ~60x too small on the axis of a wedge.

New case TestCases/incomp_rans/morse_swirl_jet (Morse 1980 swirling jet,
5 deg one-cell wedge, SA) and regression test inc_turb_morse_swirl_jet
(restart, 10 iterations); mesh and solution are in the TestCases branch
fix_periodic_jacobian, which regression.yml points to until it is merged.

Regression values of the periodic cases in parallel_regression.py and
serial_regression.py are updated; hybrid and AD values are not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bigfooted

Copy link
Copy Markdown
Contributor Author

Convergence of the Morse swirling jet (5° one-cell wedge, SA, 4 ranks, from uniform flow, identical config), develop vs this PR. Both builds include #3014 so SA has its free-shear form. This PR reaches rms[P] = -10 in 406 iterations; develop is at -6.8 after the same number of iterations and does not converge.

Morse convergence

- Accumulating SetBlock is a no-op on quantized (Q_LU_SGS) off-diagonal
  blocks, so the moved blocks were dropped. Quantized blocks are now
  decoded, added and re-encoded; full-precision blocks keep the in-place
  addition, so results are unchanged bit for bit.
- A passive point is coupled only if every moved block exists in the
  sparsity pattern of its master. On thicker periodic meshes only the
  along-face blocks fit; moving those alone slowed the discrete adjoint
  (transonic_stator AD from -7.31 to -6.76 at iteration 79). Now these
  meshes behave as on develop, and one-cell wedges and slices keep the
  full coupling.
- Loops run over a list of the coupled passive points instead of all
  points.
- CompletePeriodicComms comments named the wrong marker as master.
- Regression values: periodic tests without coupled points are back to
  their develop values; Morse (after #3014) and the two pipeSlice tests
  use the values computed by CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bigfooted and others added 2 commits November 21, 2026 15:28
No periodic point is coupled in this case. The values change at the
1e-5 level on CI only; local builds of develop and of this branch give
bit-identical results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant