-
Notifications
You must be signed in to change notification settings - Fork 146
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 #388, #383: concave CD, XYZ inside CD, conestack, and box geometry errors #462
Conversation
// (g[ibase] && g[ibase]->isConvex()))) { | ||
// // (a) is true | ||
// return ixnew; | ||
// } |
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.
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.
This is the geometry shown in the screenshot:
:start geometry definition:
:start geometry:
name = conestack
library = egs_cones
type = EGS_ConeStack
axis = 0 0 0 0 0 1
:start layer:
thickness = 1
top radii = 1
bottom radii = 1
media = water
:stop layer:
:start layer:
thickness = 1
top radii = 2
bottom radii = 2
media = lead
:stop layer:
:stop geometry:
simulation geometry = conestack
:stop geometry definition:
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.
Oh, I think I goofed! My conestack was the only geometry in the simulation, so when a particle exits the smaller cylinder, it leaves the geometry, which is why egs_view can't see anything behind it, I think. If you inscribe the conestack in a box, then it looks fine. My bad!
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.
Correct, that's normal behaviour. Thanks for testing!
f45ff00
to
100fadb
Compare
100fadb
to
11a9998
Compare
Rebased on |
6e57cd4
to
3f8ca80
Compare
Address a special case where convex geometries result in a concave cd geometry when combined. This showed up as geometry errors and could be created using a radius-mismatched cylinder and sphere in a cd geometry. Also fix a bug where a small step is taken in the cylinder or sphere howfar() routine by boundaryTolerance/2 instead of boundaryTolerance, causing checks against the boundaryTolerance to fail in the cd geometry.
Resort to the boundaryTolerance parameter to avoid particles getting stuck at edges when an xyz geometry serves as a cd base geometry, which is subsequently inscribed in an envelope.
Resort to the boundaryTolerance parameter to avoid a rare but possible infinite loop trap in simulations with a conestack geometry comprising more than one layer, causing particles to get stuck on the surface between layers in the conestack.
Change comparison operators from inequalities to strict inequalities, in order to avoid particles getting stuck at corners in an egs_box geometry.
92516c3
to
116dfd3
Compare
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.
Adjusted commit titles and messages, rebased on develop.
Fix a special case of geometry error where geometries that are convex individually result in a concave cd geometries when combined (issue CD geometry does not properly account for compound concave geometries #388). These geometry errors could be created using a radius-mismatched cylinder and sphere in a cd geometry. Also fix where a small step is taken in cylinder or sphere howfar routines to step by boundaryTolerance/2 instead of boundaryTolerance. This resulted in checks against the boundaryTolerance to fail in the cd geometry.
Fix a geometry error where particles could get stuck on an edge of an XYZ geometry used as the base geometry for a CD inscribed in an envelope (issue Trapped particles in xyz geometry used as cd base, inside an envelope #383).
Fix an infinite loop that could occur in long simulations with a conestack with more than one layer. Previously, particles could get stuck on the surface between layers of the conestack. Example that would crash when simulating 1e7 particles: