Narrow band implementation and major refactoring#83
Merged
maltezfaria merged 12 commits intomainfrom Apr 1, 2026
Merged
Conversation
- Add `AbstractDomain`/`FullDomain`/`NarrowBandDomain` hierarchy to `meshfield.jl`; `MeshField` gains a fourth type parameter `D <: AbstractDomain` - Add `logging.jl`: `StepRecord` and `SimulationLog` for per-step timing/history - Refactor `LevelSetEquation`: rename `levelset` → `ic`, replace `buffers` with `log::SimulationLog`, overhaul `show` output - Refactor `timestepping.jl`: add doctests, support `NarrowBandDomain` dispatch - Refactor `reinitializer.jl`: improvements to `NewtonReinitializer` and `NewtonSDF` - Various cleanups to `boundaryconditions.jl`, `meshes.jl`, `levelset.jl`, `levelsetterms.jl`, `derivatives.jl`, `interpolation.jl`, `velocityextension.jl`
- Add `NarrowBandLevelSet`: a `MeshField` backed by a `Dict` for sparse storage - Constructors from `LevelSet`, and from scratch via a signed-distance function - Narrow-band reinitializiation, band update (`update_narrowband!`), and extrapolation of ghost values at band boundary - Integrate narrow-band support into `LevelSetEquation` and time steppers
- Add tests for: meshfield, levelsetequation, levelsetterms, reinitializer, narrow-band, show output, timestepping, spiral convergence - Update existing tests to match refactored API (`ic` kwarg, new BC types, etc.) - Remove obsolete test-reinitialization.jl and test-sdf.jl (replaced by test-reinitializer.jl)
- Update docs to reflect new API (`ic` kwarg, new BC names, `NarrowBandLevelSet`) - Expand Makie extension with narrow-band plotting support - Minor updates to MMG extensions for new `LevelSetEquation` struct layout - Add *.markdown-preview.html to .gitignore
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
==========================================
- Coverage 85.77% 76.09% -9.69%
==========================================
Files 14 16 +2
Lines 1308 1694 +386
==========================================
+ Hits 1122 1289 +167
- Misses 186 405 +219 ☔ 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.
Implementation of a narrow-band approach (still experimental). Some major code refactoring was needed. I also took the liberty to change some of the names (e.g.
levelset --> icin the constructor ofLevelSetEquation), so this PR introduces breaking changes to the API.