-
Notifications
You must be signed in to change notification settings - Fork 438
1D MLCurlCurl variable-beta smoother updates axis Ez(0) on only one color sweep #5053
Copy link
Copy link
Closed
Description
- Type: Correctness / Convergence robustness
- Severity: Medium
- Component:
MLCurlCurl1D smoother - Location:
Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H:567Src/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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels