Skip to content

Second-order AMR: higher-order field refinement + coarse–fine temporal fixes - #1278

Draft
UCaromel wants to merge 23 commits into
PHAREHUB:masterfrom
UCaromel:higher-order-refinement
Draft

Second-order AMR: higher-order field refinement + coarse–fine temporal fixes#1278
UCaromel wants to merge 23 commits into
PHAREHUB:masterfrom
UCaromel:higher-order-refinement

Conversation

@UCaromel

Copy link
Copy Markdown
Contributor

Why

AMR on master is not second-order accurate. The field refinement (coarse→fine spatial interpolation) and the coarse–fine time interpolation are only first-order, so an AMR run does not recover the scheme's second-order accuracy near refinement boundaries — accuracy is effectively capped below 2nd order wherever levels exist.

This PR makes AMR genuinely second-order in both space and time:

  • second-order spatial field refinement, and
  • second-order coarse–fine temporal interpolation — including for B, which previously had none.

The existing first-order (legacy) refinement path is kept. Flipping the default and/or removing the legacy path is a team decision; for now both coexist and are selectable at runtime, so this PR changes no default behaviour.

How

  • Kernel-based refinement operator — spatial refinement is expressed as composable stencil kernels rather than a hardcoded scheme. This is what makes 2nd order clean, and makes it easy to extend to higher spatial orders and to swap in a WENO-limited variant.
  • Correct stage times — RK integrators and the PPC predictor/corrector fill coarse–fine ghosts at the proper sub-step times rather than at endpoint values.
  • Time interpolation everywhere — coarse–fine temporal interpolation now covers all evolved fields, including B (previously static in time).

Selectable from the Python config via the refinement order (and limiter); legacy = order 0.

Validation

2D AMR spatial convergence (composite L2-of-L1 norm, MC2011). With refinement_order=2, both alfven2d and whistler2d converge at slope 2, inside the calibrated gate band (1.70, 2.25):

convergence_hor_branch_o2_simple

Loading
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.

3 participants