-
Notifications
You must be signed in to change notification settings - Fork 68
Resolve unreachable code in cut kernel #2121
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2200,16 +2200,22 @@ namespace Cut::Kernel | |||||
| if (det < 1.0e-16) std::cout << "!!! determinant of jacobian is smaller than 1.0e-16 !!!\n"; | ||||||
| } | ||||||
|
|
||||||
| if (det < 1.0e-16 && det > 1.0e-16) | ||||||
| if (det < -1.0e-16) | ||||||
| { | ||||||
| std::stringstream msg; | ||||||
| msg << "Determinant in compute position is negative: " << det; | ||||||
| FOUR_C_THROW("{}", msg.str()); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FOUR_C_THROW can format strings directly
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes and no. |
||||||
| } | ||||||
|
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same applies here. |
||||||
| if (Core::MathOperations<FloatType>::abs(det) < 1.0e-16) | ||||||
| { | ||||||
| #if EXTENDED_CUT_DEBUG_OUTPUT | ||||||
| std::cout << "Determinant in compute position is very close to zero" << std::endl; | ||||||
| std::cout << "Determinant in compute position is very close to zero" << std::endl; | ||||||
| #endif | ||||||
| if (Core::MathOperations<FloatType>::abs(det) == 0.0) // here might lie problem for the cln | ||||||
| { | ||||||
| /* then calculation of a normal to a line like this makes no sense at | ||||||
| * all! */ | ||||||
| #if EXTENDED_CUT_DEBUG_OUTPUT | ||||||
| std::cout << "Absolute value of the determinant is zero " << std::endl; | ||||||
| std::cout << "Absolute value of the determinant is close to zero" << std::endl; | ||||||
| #endif | ||||||
| zeroarea_ = true; | ||||||
| return false; | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use a numerical limit here?