unify NeumannBC/NeumannGradientBC as ExtrapolationBC aliases#79
Merged
maltezfaria merged 2 commits intomainfrom Mar 12, 2026
Merged
unify NeumannBC/NeumannGradientBC as ExtrapolationBC aliases#79maltezfaria merged 2 commits intomainfrom
maltezfaria merged 2 commits intomainfrom
Conversation
- Add ExtrapolationBC{P}: P-point one-sided Lagrange extrapolation BC
- NeumannBC = ExtrapolationBC{1} (constant extension, ∂ϕ/∂n = 0)
- NeumannGradientBC = ExtrapolationBC{2} (linear extrapolation, ∂²ϕ/∂n² = 0)
- Remove dedicated NeumannBC/NeumannGradientBC dispatch in _getindexrec;
both now flow through _apply_extrapolation_bc (same performance, ~1.7 ns)
- Remove dead CartesianMeshField-specific _getindex overloads for these BCs
- Inline _wrap_index_neumann/_wrap_index_neumann_gradient into their only
caller (_i2oe_neighbor_relation in levelsetequation.jl)
- Add tests asserting ExtrapolationBC{1}==NeumannBC and ExtrapolationBC{2}==NeumannGradientBC
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
===========================================
- Coverage 82.11% 59.42% -22.70%
===========================================
Files 16 16
Lines 1180 1151 -29
===========================================
- Hits 969 684 -285
- Misses 211 467 +256 ☔ View full report in Codecov by Sentry. 🚀 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.
Generalise the extrapolation boundary conditions to handle arbitrary order extrapolation. I found this was necessary to observe high-order convergence of the WENO5 scheme (which in turn was needed for me to observe high-order convergence in time of some of the time integrators). Done with Copilot and Claude.