Add unstructured finite volume spatial method - #5688
Open
aabills wants to merge 5 commits into
Open
Conversation
Support 3D vector fields via N-component VectorField, Component/Norm operators, and matching discretisation/solution handling. Extracted from the unstructured finite-volume work for review in isolation. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce UnstructuredSubMesh, mesh generators, and Mesh interface coupling so arbitrary 2D/3D domains can be discretised later. Extracted from the unstructured finite-volume stack for isolated review. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # CHANGELOG.md
Add FiniteVolumeUnstructured, discretisation hooks, and unstructured processed variables so cell-centered solutions can be formed on the new meshes. Extracted from the unstructured finite-volume stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 31, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5688 +/- ##
==========================================
- Coverage 98.12% 97.24% -0.88%
==========================================
Files 339 341 +2
Lines 31996 33512 +1516
==========================================
+ Hits 31396 32590 +1194
- Misses 600 922 +322 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3 tasks
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.
Summary
FiniteVolumeUnstructuredspatial method, discretisation hooks (div_D_grad, internal BC dispatch), and unstructuredProcessedVariable*classes.Stack
Review tip: the spatial-only commit is
feat: add unstructured finite volume spatial method; earlier commits are the two dependencies.Test plan
test_finite_volume_unstructured.py+ mesh + tensor-field tests (158 passed locally)Also in this stack: #5691 deprecates
pybamm.Magnitude.