Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance-focused rewrite of the ConvexPolyhedron class #188

Merged
merged 89 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
f0b8598
test: Fix assumption on quaternions.
b-butler Jan 25, 2023
ab21279
Added new classes to return the edges of polyhedra
janbridley Feb 6, 2023
22399d8
Fixed return for get_edge_vectors method.
janbridley Feb 7, 2023
c9108cd
Merge branch 'master' into release-edgelengths
janbridley Feb 13, 2023
7c94100
Renamed get_edge_vectors property to edge_vectors
janbridley Feb 24, 2023
0e6501a
Vectorized edge_vectors return with numpy
janbridley Feb 27, 2023
fdec57c
Updated test_polyhedron to be compatible with the renamed edge_vector…
janbridley Feb 27, 2023
dd47ed2
Updated test_polyhedron to explicitly cover the edges property
janbridley Feb 27, 2023
210f009
Updated rtol for edge property test
janbridley Feb 27, 2023
a2cfd3c
Reverted small fixes that account for inaccuracies in polyhedron stor…
janbridley Feb 27, 2023
1f4a106
Removed unnecessary comment from ``test_edges``
janbridley Feb 28, 2023
d387fca
Changed ``edge_vectors`` property to return a numpy array
janbridley Feb 28, 2023
6e69875
Merge branch 'release-edgelengths' of https://github.com/glotzerlab/c…
janbridley Feb 28, 2023
f473e27
Rewrote ``edges`` method and updated ``edge_vectors`` for compatibility
janbridley Mar 22, 2023
cd67d45
Updated ``test_polyhedron`` to work with set edges
janbridley Mar 22, 2023
01077cc
Fixed docstring formatting for ``edges`` and ``edge_vectors``
janbridley Mar 22, 2023
ada7029
Updated edges method to return Numpy array
janbridley May 25, 2023
7a89acb
test_polyhedron::test_edges now checks edge count
janbridley May 25, 2023
b03099b
Merge branch 'master' into release-edgelengths
janbridley May 25, 2023
770199b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2023
a879cc2
Merge branch 'master' into release-edgelengths
janbridley Jun 26, 2023
b4f60f9
Updated edges property to cache result
janbridley Aug 4, 2023
6b72414
Updated edges and edge_vectors to make better use of numpy functions …
janbridley Aug 7, 2023
b502cf6
Updated documentation for ConvexPolyhedron rewrite
janbridley Aug 7, 2023
2f22ab2
Updated __init__ and shape creation helpers
janbridley Aug 7, 2023
f598272
Updated centroid getter and setter
janbridley Aug 7, 2023
5dfef18
Updated volume getter, setter, and _rescale function
janbridley Aug 7, 2023
0d21d98
Improved _find_equations method
janbridley Aug 7, 2023
d5b202c
Added equations property
janbridley Aug 7, 2023
2e3914c
Updated faces property to work with optional sorting
janbridley Aug 7, 2023
ed33ca6
Added normals property
janbridley Aug 7, 2023
0dbc268
Updated sort_faces
janbridley Aug 7, 2023
e1a700d
Updated neighbors property
janbridley Aug 7, 2023
d5534be
Added simplices property and updated _surface_triangulation
janbridley Aug 7, 2023
a728486
Added _find_triangle_array_area helper
janbridley Aug 7, 2023
135e0a1
Add faster surface area getter, setter, and calculation
janbridley Aug 7, 2023
f2c55e1
Added get_face_area method
janbridley Aug 7, 2023
1721a9e
Added face_centroids property and _get_face_centroids
janbridley Aug 7, 2023
b62a3aa
Updated inertia_tensor property + _compute and diagonalize methods
janbridley Aug 7, 2023
2fe4d05
Added get_dihedral
janbridley Aug 7, 2023
158ac57
Added more stringent pytests for centroid and centroid setter
janbridley Aug 7, 2023
ffb09d8
Added in-depth tests for surface area and volume setters
janbridley Aug 7, 2023
11f5bd3
Added circleci checker function to speed up local pytest runs
janbridley Aug 7, 2023
ac2b10b
Added Truncated Icosahedron to bad_shapes for test MOI
janbridley Aug 7, 2023
8d22516
Added pytest for test_face_centroids and fixes for shape creation wit…
janbridley Aug 7, 2023
eee3cf5
Set fast flag to properly default to False
janbridley Aug 7, 2023
184ec36
Fix typo in _consume_hull
janbridley Aug 7, 2023
e991851
Merge branch 'master' into update-ConvexPolyhedron
janbridley Aug 8, 2023
f783f67
Fixed documentation for Polyhedron class
janbridley Aug 8, 2023
cfa2956
Docstring formatting
janbridley Aug 8, 2023
83408cf
Docstring formatting fix
janbridley Aug 8, 2023
8a61dd5
Another docstring fix
janbridley Aug 8, 2023
8df746a
One more docstring fix
janbridley Aug 8, 2023
f0355e0
Added tests for simplex equations, face equations, and normals
janbridley Aug 8, 2023
c676f18
Combined pytest marks to clean up testing code
janbridley Aug 8, 2023
9bb5a10
Update Credits.rst
janbridley Aug 8, 2023
0cf79cb
Added test for heavily degenerate input vertices
janbridley Aug 8, 2023
fd73adb
Merge branch 'master' into update-ConvexPolyhedron
janbridley Aug 16, 2023
96a8c01
Merge branch 'master' into update-ConvexPolyhedron
janbridley Aug 30, 2023
83e6642
Changed [test] to [tests]
janbridley Sep 18, 2023
e7bae59
Merge branch 'master' of https://github.com/glotzerlab/coxeter
janbridley Sep 18, 2023
69a5c71
Merge branch 'master' into update-ConvexPolyhedron
janbridley Sep 27, 2023
39490bb
Updated ConvexPolyhedron to properly handle nonconvex inputs.
janbridley Oct 23, 2023
2fbe7bf
Removed use of Fast flag from class
janbridley Oct 23, 2023
f3561a5
Removed fast flag from credits
janbridley Oct 23, 2023
266a15f
Updated ci flags for pytest
janbridley Oct 23, 2023
23244fd
Fixed D202 in convex_polyhedron
janbridley Oct 23, 2023
3e41640
Added ci check to MI test
janbridley Oct 23, 2023
a06564d
Merge branch 'master' into update-ConvexPolyhedron
janbridley Oct 23, 2023
7cdcdf7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 23, 2023
01e0e6e
Merge branch 'master' into update-ConvexPolyhedron
janbridley Oct 23, 2023
ad30552
Updated tests
janbridley Oct 23, 2023
815e731
Updated docstring for _calculate_signed_volume
janbridley Oct 23, 2023
23de270
Removed degenerate cube test
janbridley Oct 23, 2023
5a13055
Removed remaining circleci files
janbridley Oct 24, 2023
261e3da
Began updating changelog
janbridley Oct 24, 2023
16505be
Updating changelog
janbridley Oct 24, 2023
d62154a
Clarified language on faces breaking change
janbridley Nov 8, 2023
571d5b5
Cleaned up convex hull handling
janbridley Nov 8, 2023
6152313
Update coxeter/shapes/convex_polyhedron.py
janbridley Nov 8, 2023
9aa4a59
Removed unnecessary call to principal_moments
janbridley Nov 10, 2023
1ed3735
Fixed pytest fixture call
janbridley Nov 10, 2023
efa630c
Merge branch 'update-ConvexPolyhedron' of https://github.com/glotzerl…
janbridley Nov 10, 2023
4fe9d88
Fixed bug in _find_coplanar_simplices
janbridley Dec 4, 2023
778f69f
Removed copy of inherited method get_dihedral
janbridley Dec 4, 2023
69f6aed
Merge branch 'master' into update-ConvexPolyhedron
janbridley Dec 4, 2023
d4ab951
Merge branch 'update-ConvexPolyhedron' of https://github.com/glotzerl…
janbridley Dec 4, 2023
d844a3c
Merge branch 'master' into update-ConvexPolyhedron
janbridley Jan 1, 2024
6845450
Merge branch 'master' into update-ConvexPolyhedron
janbridley Jan 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@ Added
~~~~~

- New `edge_lengths` method.
- ``combine_simplices``, ``find_simplex_equations``, ``_find_face_centroids``,
``find_coplanar_simplices``, ``_find_face_centroids``, and ``calculate_signed_volume``
methods for the ConvexPolyhedron class.
- ``simplices``, ``equations``, and ``face_centroids`` properties for the
ConvexPolyhedron class.
- Additional pytests for surface area, volume, centroid, moment of inertia, and equations properties.

Changed
~~~~~~~

- Pre-commit now uses ruff instead of flake8, pydocstyle, pyupgrade and isort.
- CI now uses GitHub Actions.
- Docs ported to furo theme.
- Reimplemented ``find_equations``, ``_volume``, ``surface_area``, ``centroid``,
``_compute_inertia_tensor``, ``rescale``, and ``get_face_area`` methods for convex
polyhedra using NumPy vectorized operations and polyhedron simplices.
- [breaking] ``ConvexPolyhedron._surface_triangulation`` now returns sorted simplices,
rather than running polytri. This can change the order of vertices and/or triangles.
- [breaking] ``faces`` may return faces in a different order than previously. Faces are still sorted with ``sort_faces``, and will still be ordered such that curl and divergence theorems work properly.
- ``volume``, ``surface_area``, and ``centroid`` properties now return stored values, rather than computing the quantity at each call.
- ``rescale`` now computes the centroid to ensure the correct value is available when ``centroid`` is called.
- Optimized pytest configurations for more efficient use of local and remote resources.

v0.7.0 - 2023-09-18
-------------------
Expand Down
9 changes: 9 additions & 0 deletions Credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ Jen Bradley
* Added shape family for prisms and antiprisms.
* Added shape family for equilateral pyramids and dipyramids.
* Added edges, edge_vectors, edge_lengths, and num_edges methods.
* Reimplemented ``find_equations``, ``_volume``, ``surface_area``, ``centroid``,
``_compute_inertia_tensor``, ``rescale``, and ``get_face_area`` methods for convex
polyhedra using NumPy vectorized operations and polyhedron simplices.
* Added the ``combine_simplices``, ``find_simplex_equations``, ``_find_face_centroids``,
``find_coplanar_simplices``, ``_find_face_centroids``, and ``calculate_signed_volume``
methods to the ConvexPolyhedron class.
* Added ``simplices``, ``equations``, and ``face_centroids`` properties to the
ConvexPolyhedron class.
* Optimized pytest configurations for more efficient use of local and remote resources.

DomFijan marked this conversation as resolved.
Show resolved Hide resolved
Domagoj Fijan

Expand Down
Loading