Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
+ Coverage 83.87% 84.71% +0.83%
==========================================
Files 31 32 +1
Lines 3169 3526 +357
Branches 268 295 +27
==========================================
+ Hits 2658 2987 +329
- Misses 443 458 +15
- Partials 68 81 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed-form gravity and magnetic solutions for closed triangulated polyhedra and tetrahedra (Werner and Scheeres, 1996), with Polyhedron, Tetrahedron, MagneticPolyhedron and MagneticTetrahedron classes, and a broadcasting tetrahedron_integrals / tetrahedron_inside_fraction path for evaluating many tetrahedra at once. The potential and field are continuous across every face, edge and vertex. Edge line integrals and face solid angles are evaluated without cancellation, coplanar faces are merged into polygons so triangulation diagonals play no part, and shared faces cancel exactly between bodies. On the surface, the gradient tensor follows Prism's conventions, so tetrahedra tiling a prism sum to it there as well. Prism: evaluate the log kernels without cancellation near edges, and weight the magnetization in B by the fraction of a small sphere inside the prism, making B's normal component exact on its faces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jcapriot
force-pushed
the
jcapriot/polyhedron-kernels
branch
from
October 20, 2026 21:54
0dae788 to
4bfaeb6
Compare
This branch has not been deployed
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.
This draft is the start of adding polyhedron kernels for the potential fields methods.
For now they are checked for consistency against the prism formulations, and that they match their behavior at degenerate points.
The consistent degenerate behavior is specifically because I wanted them to cancel out if necessary. Say someone wanted to compute the magnetic field of a prism minus a polygon, in such a way the the point is outside the linearly combined body, but is evaluated at a degenerate point (say the top face).