Skip to content

1D MLCurlCurl variable-beta smoother updates axis Ez(0) on only one color sweep #5053

@WeiqunZhang

Description

@WeiqunZhang
  • Type: Correctness / Convergence robustness
  • Severity: Medium
  • Component: MLCurlCurl 1D smoother
  • Location:
    • Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H:567
    • Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H:649

Problem

In coord == 1 path, the scalar-beta smoother updates the axis value on both red/black passes (i==0 || i==1), but the variable-beta overload updates it only for i==0.

That asymmetry strongly suggests copy-paste drift between the two overloads.

Impact

  • Different smoother dynamics between constant- and variable-coefficient paths.
  • Potential convergence-rate regression and sweep asymmetry for cylindrical 1D runs with spatially varying beta.

Suggested patch

Match the variable-beta path to the scalar-beta update condition so both color sweeps refresh the axis value.

--- a/Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H
+++ b/Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H
@@
-            if (i == 0) {
+            if ((i == 0) || (i == 1)) {
                 ez(0,0,0) = (rhsz(0,0,0) + Real(4.0)*dxx*ez(1,0,0)) / (betaz(0,0,0) + Real(4.0)*dxx);
             } else if (! dinfo.is_dirichlet_node(i,j,k)) {
                 Real cm = dxx * (Real( 0.5)/Real(i) - Real(1.0));
                 Real cp = dxx * (Real(-0.5)/Real(i) - Real(1.0));

Prepared by Codex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions