Skip to content

Conversation

roystgnr
Copy link
Member

@roystgnr roystgnr commented Jan 2, 2024

I started out by trying to return NaN when we detected a twisted element, but that was weirdly inconsistent between Elem::volume() and it's various specializations, so instead I'm just returning the same "net volume" that we should be getting from the specialized volume() functions when they're called on a twisted element. I'll leave the NaN stuff in our git history just in case we change our minds in the future; it would be tedious to detect twisted elements in every specialization, but not impossible.

It's probably a code smell that we've never seen a need for this
before...
If someone is performing calculations here, a NaN rather than an
exception is probably easier for them to deal with.  If someone is using
Elem::print_info() (perhaps to print information about a twisted
element...) then a NaN rather than exception is *definitely* easier to
deal with.
This is more consistent with what we get from our subclasses' volume()
specializations.
@moosebuild
Copy link

Job Coverage on 99d5574 wanted to post the following:

Coverage

ffa3a3 #3758 99d557
Total Total +/- New
Rate 62.35% 62.35% +0.00% 100.00%
Hits 68275 68277 +2 2
Misses 41235 41234 -1 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@roystgnr roystgnr merged commit 628e935 into libMesh:devel Jan 4, 2024
@roystgnr roystgnr deleted the volume_no_exceptions branch January 4, 2024 18:07
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.

2 participants