Skip to content

Add Lax-Friedrichs flux for the LDG system SecondOrderScalarWave - #7520

Merged
wthrowe merged 2 commits into
sxs-collaboration:developfrom
hen-w:ldg_scalar_wave_lf_flux_pr
Sep 4, 2026
Merged

Add Lax-Friedrichs flux for the LDG system SecondOrderScalarWave#7520
wthrowe merged 2 commits into
sxs-collaboration:developfrom
hen-w:ldg_scalar_wave_lf_flux_pr

Conversation

@hen-w

@hen-w hen-w commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Generalize the boundary correction test helper to handle LDG boundary corrections. Add LaxFriedrichs boundary correction for the LDG system SecondOrderScalarWave.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.
  • If a coding agent was used, have a co-author trailer of the form
    "Co-Authored-By: " as the last line of the
    commit, e.g. "Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com",
    "Co-Authored-by: Codex noreply@openai.com", or
    "Co-Authored-By: GitHub Copilot CLI noreply@microsoft.com".

Further comments

@hen-w
hen-w force-pushed the ldg_scalar_wave_lf_flux_pr branch 2 times, most recently from df23089 to e28671b Compare August 31, 2026 18:04
@hen-w
hen-w marked this pull request as ready for review August 31, 2026 18:05
Comment on lines +1100 to +1106
for (const auto use_moving_mesh : {
false // , true
}) {
for (const auto dg_formulation : {
::dg::Formulation::
StrongInertial // , ::dg::Formulation::WeakInertial
}) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?


Scalar<DataVector> packaged_psi{num_pts};
tnsr::i<DataVector, Dim, Frame::Inertial> psi_times_normal{num_pts};
const ScopedFpeState disable_fpes(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need this for the isnan check, only do it for that check, not the function call. If the function is causing FPEs, that needs to be fixed.

* Below, \f$n^i\f$ denotes the interior element's outward-directed unit face
* normal. \f$\{\{\Psi\}\}\f$ denotes the central average of \f$\Psi\f$ across
* the interface, and
* \f$[[\Psi]]=n^\text{int}\Psi^\text{int}+n^\text{ext}\Psi^\text{ext}\f$

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the scalar quantity n^int?

for (size_t d = 0; d < Dim; ++d) {
phi_boundary_correction->get(d) =
0.5 * (psi_times_normal_int.get(d) + psi_times_normal_ext.get(d)) -
0.5 * tau2_ * (get(psi_ext) - get(psi_int));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong here. I don't understand your documentation math well enough to know what the correct expression would be.

@hen-w
hen-w requested a review from wthrowe September 3, 2026 01:53
@wthrowe

wthrowe commented Sep 4, 2026

Copy link
Copy Markdown
Member

Squash and rebase.

hen-w and others added 2 commits September 4, 2026 15:04
…corrections

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hen-w
hen-w force-pushed the ldg_scalar_wave_lf_flux_pr branch from 4a6d70f to d143fec Compare September 4, 2026 19:22
@wthrowe
wthrowe merged commit 9488965 into sxs-collaboration:develop Sep 4, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants