Repository navigation
[ADDITION] Add global/local penalty switch to DYREL - #549
Merged
Merged
Conversation
aelligp
approved these changes
Oct 14, 2026
@nolebase/vitepress-plugin-enhanced-readabilities 2.21 requires vitepress 2 (alpha) as a peer dependency, which conflicts with the vitepress ^1.6.4 used by the docs build and makes `npm install` fail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The `compute_bulk_viscosity_and_penalty!` kernel takes `global_penalty` as its final argument. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/test_PlumeFreeSurface_DYREL.jl b/test/test_PlumeFreeSurface_DYREL.jl
index 7b4bf904..a5100da3 100644
--- a/test/test_PlumeFreeSurface_DYREL.jl
+++ b/test/test_PlumeFreeSurface_DYREL.jl
@@ -6,7 +6,7 @@ elseif ENV["JULIA_JUSTRELAX_BACKEND"] === "CUDA"
import CUDA
end
-using Test#, Suppressor
+using Test #, Suppressor
using GeoParams
using JustRelax, JustRelax.JustRelax2D
using ParallelStencil, ParallelStencil.FiniteDifferences2D
@@ -200,8 +200,8 @@ end
# --- free_surface = false (instantaneous Stokes solve from rest) ---
iters, maxVx, maxVy, allfinite = PlumeFreeSurface_DYREL(igg, nx, ny)
@test allfinite
- @test maxVy ≈ 9.28245184590358e-9 rtol = 1.0e-6
- @test maxVx ≈ 2.486917826860531e-9 rtol = 1.0e-6
+ @test maxVy ≈ 9.28245184590358e-9 rtol = 1.0e-6
+ @test maxVx ≈ 2.486917826860531e-9 rtol = 1.0e-6
@test maxVy > maxVx
@@ -214,9 +214,9 @@ end
iters_fs, maxVx_fs, maxVy_fs, allfinite_fs = PlumeFreeSurface_DYREL(igg, nx, ny; free_surface = true, nsolves = 2)
@test allfinite_fs
@test iters_fs.converged
- @test maxVy_fs ≈ 6.62507771632624e-9 rtol = 1.0e-2
+ @test maxVy_fs ≈ 6.62507771632624e-9 rtol = 1.0e-2
@test !isapprox(maxVy_fs, 9.6799854388711294e-9; rtol = 5.0e-4)
- # finalize_global_grid(; finalize_MPI = true)
+ # finalize_global_grid(; finalize_MPI = true)
# end
end |
With the 1e6 viscosity step of SolCx, a penalty scaled by the mean viscosity is ~5e6 times the weak-side viscosity, and the variational DYREL solve hits its iteration cap before reaching ϵ. The SolCx runs now pass `global_penalty = false`; both solvers converge in about 2000 iterations at ϵ = 1e-6, and the reference values are regenerated from those converged solutions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whats the purpose of this PR?
Describe it in more detail below:
Add
global_penaltyto DYREL state and constructors. It defaults totrue, using mean finite viscosity across the domain;falseuses local viscosity. Apply switch in standard and variational DYREL. Preserve variational rock-fraction correction. MPI mode reduces mean viscosity across ranks.Document the switch in the DYREL guide and solver/API references. Branch also includes a package version bump to 0.8.2.
Checklist
[BUGFIX],[ADDITION],[DOC], etc.Validation:
git diff --checkpassed. Tests and Runic were not run.