Skip to content

More tree refine functions#296

Merged
jcapriot merged 7 commits intomainfrom
tree_refine_funcs
Nov 15, 2022
Merged

More tree refine functions#296
jcapriot merged 7 commits intomainfrom
tree_refine_funcs

Conversation

@jcapriot
Copy link
Member

This adds more refinement functions for tree meshes.

  • Line segment (determines whether a line segment and a cell intersect)
  • triangle (determines whether a triangle and a cell intersect)
  • Tetrahedron (determines whether a tetrahedron and a cell intersect)

They all are "exact" to floating point precision. Using the Separating Axis Theorem to determine the triangle and tetrahedron intersections.

The triangle and tetrahedron should make it natural to extend to any polyhedron body (Because those can always be broken into multiple triangles/tetrahedrons).

I think the next step is to update the refine_tree_xyz function and split it off into the three individual helper functions (at which point we would deprecate refine_tree_xyz).

@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #296 (98fb0d9) into main (febf017) will increase coverage by 0.62%.
The diff coverage is 96.98%.

@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
+ Coverage   84.41%   85.04%   +0.62%     
==========================================
  Files          36       36              
  Lines       11014    11090      +76     
==========================================
+ Hits         9297     9431     +134     
+ Misses       1717     1659      -58     
Impacted Files Coverage Δ
discretize/View.py 0.00% <ø> (ø)
discretize/base/base_regular_mesh.py 84.69% <ø> (ø)
discretize/mixins/omf_mod.py 80.24% <ø> (ø)
discretize/utils/coordinate_utils.py 88.88% <ø> (ø)
discretize/tests.py 79.11% <66.66%> (ø)
discretize/mixins/mpl_mod.py 72.50% <86.66%> (ø)
discretize/mixins/vtk_mod.py 87.85% <93.02%> (ø)
discretize/cylindrical_mesh.py 94.14% <96.15%> (ø)
discretize/unstructured_mesh.py 99.11% <97.01%> (ø)
discretize/_extensions/tree_ext.pyx 84.22% <100.00%> (+2.35%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jcapriot jcapriot merged commit 1788cb0 into main Nov 15, 2022
@jcapriot jcapriot deleted the tree_refine_funcs branch November 15, 2022 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant