docs(CLAUDE.md): record the free-slip BC preference#300
Merged
Conversation
…ree-slip) Add a "Boundary Conditions: Free-slip" section so future sessions reach for the right enforcement: prefer rotated strong free-slip (machine-exact v_n=0, correct on curved/tilted/deformed boundaries, works inside the nonlinear SNES + geometric FMG, honours consistent_jacobian, and its reaction is sigma_nn); reserve Nitsche/penalty for BCs that must evolve in time. Points at utilities/rotated_bc.py. Underworld development team with AI support from Claude Code
Contributor
There was a problem hiding this comment.
Pull request overview
Adds guidance to CLAUDE.md documenting the project’s preferred approach for free-slip boundary conditions, to help future sessions consistently choose rotated strong free-slip vs. Nitsche/penalty approaches.
Changes:
- Document preference for
solver.add_rotated_freeslip_bc(...)for machine-precisionv·n̂ = 0on general (curved/tilted/deformed) boundaries. - Clarify when to use Nitsche/penalty (time-evolving boundary conditions).
- Point readers to the relevant implementation locations in the codebase.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+334
to
+336
| - The constraint **reaction** is the boundary normal traction σ_nn | ||
| (`solver.boundary_normal_traction(boundary)` / `solver.dynamic_topography(...)`) — no | ||
| augmented-Lagrangian splitting. |
Comment on lines
+338
to
+339
| **Reserve Nitsche / penalty** (`add_nitsche_bc`) for BCs that must **evolve in time** | ||
| (e.g. a Dirichlet→Neumann / traction ramp) — a hard rotated constraint cannot morph. |
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.
Adds a short Boundary Conditions: Free-slip section to
CLAUDE.mdso futuresessions pick the right enforcement without re-deriving it:
add_rotated_freeslip_bc) — machine-exactv·n̂ = 0, correct on curved/tilted/deformed boundaries (per-node normal), worksinside the nonlinear SNES + geometric FMG (honours
consistent_jacobian), and itsconstraint reaction is the boundary normal traction σ_nn.
/ traction ramps) — a hard rotated constraint cannot morph.
Docs-only; no code change. Complements #298 (which makes rotated free-slip work inside
the nonlinear solve).
Underworld development team with AI support from Claude Code