-
Notifications
You must be signed in to change notification settings - Fork 48
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
Fix "not watertight" error in 3D trimming operation #831
Merged
Conversation
This file contains 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
>>> from nutils import element
>>> import numpy
>>> element.getsimplex(3).slice(numpy.array([ 0.12818456, -0.00017979, 0.06756571, -0.03730343]), 8)
NotImplementedError |
gertjanvanzwieten
force-pushed
the
fixtrim
branch
from
August 23, 2023 15:21
4c1800e
to
d15d267
Compare
gertjanvanzwieten
force-pushed
the
fixtrim
branch
2 times, most recently
from
June 12, 2024 13:42
6e31446
to
2ec59ca
Compare
This patch fixes an assertion in the MosaicReference constructor that checks that the edge transforms of the new edges coinside with the edge transforms of the edges of the base reference. Here `nedges` was mistaken for `nverts`, which worked because in dimensions 1 and 2 the two are often equal, but which was technically incorrect.
This patch changes the implementation of Element.volume to use degree=1 gauss quadrature points, rather than _centroid. Though the two are often equal, the new implementation is robust against the situation that an element has zero quadrature points. It also avoids the unnecessary computation of the centroid coordinate which is not used for the volume.
This patch adds a special case to MosaicReference.getpoints for the situation that its simplices are empty, in which case ConcatPoints crashed as it tried to establish the dimension. The new implementation creates a CoordsWeightsPoints instance of zero points.
This patch changes the sign test in Reference.slice that results in an early return if the levelset values are all of the same sign. By focusing this tests on the vertices used by simplices, rather than all vertices (some of which may not play a role due to earlier slicing) more cases might be caught here rather than in the later edge test, which is now restricted to ndims >= 2.
This patch fixes a ndivisions-related trimming issue where, due to rouding, adjoining edges of a newly formed mosaic are incompatible. The patch fixes this by retaining degenerate mosaics if they serve the purpose of completing the rib skeleton.
This patch introduces the cached Reference._ribs property that allows an element's edge-edge relations to be reused in the formation of new mosaic elements.
This patch declares the edge_vertices and orientation lists to outside the if-block in which they are populated, for reasons of readibility.
gertjanvanzwieten
force-pushed
the
fixtrim
branch
from
June 12, 2024 14:42
2ec59ca
to
d7e8ff8
Compare
joostvanzwieten
approved these changes
Jun 12, 2024
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.
No description provided.