Repository navigation
Add Validated Topology And Sparse Surface Diffusion - #7
Merged
Merged
Conversation
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.
GeometryKit now has reusable numerical foundations for surface diffusion and future heat-method geodesics. TriangleMesh protects its backing arrays with read-only wrappers and caches validated internal half-edge adjacency. Edge geodesics reuse that cache. Topology-sensitive operations reject inconsistent winding, duplicate triangles, and disconnected or branched vertex fans; mesh health also rejects non-finite geometry.
The new LinearAlgebra boundary provides immutable CSR assembly, an ILinearSolver adapter contract, and a managed Jacobi-preconditioned conjugate-gradient baseline with cancellation, true-residual checks, iteration limits, and breakdown diagnostics. SurfaceOperators assembles cotangent stiffness and barycentric mass and performs backward-Euler scalar diffusion with natural zero-flux boundaries. Negative cotangent weights are retained; no general positivity guarantee is claimed on obtuse meshes.
Mathematics, sign conventions, units, boundary conditions, limits, class relationships, and an ADR are documented. Precise Special Functions supplies a high-precision Bessel reference for a future Neumann disc benchmark without becoming a runtime dependency. Full heat-method reconstruction and maintained solver adapters remain follow-up work.
Validation: library compiled with the .NET 8 C# compiler without XML documentation warnings; all 33 current C# cases passed locally using actual xUnit assertions via a reflection runner, including the 441-vertex sparse-grid case. Normal MSBuild execution is blocked by process-information restrictions in the local environment, so the standard test runner is verified by GitHub CI. Git diff --check passes, and the uploaded GitHub tree hash exactly matches the local commit.
Compatibility: graph geodesics now require consistent manifold topology; preliminary MeshHealthReport.IsQueryable does not itself certify vertex links. Inputs are rejected explicitly and are never silently repaired.