-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement alternating division schemes between adjacent hexahedra and wedges #172
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the quick fix @connoramoreno
I have another PR lined up once this is merged that will allow users to input their own grids, rather than us enforce uniformly spaced grids. I'd like to include checks on inputs (such as warnings for when grid sizes are not even) in that subsequent PR, since it touches a lot of that part of the code. |
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.
do we need to keep these different alternative scheme variables? For me it's hard to follow. If we require even numbers of poloidal voxels, I think there may be a cleaner way to do it.
Can we just determine the meshing scheme from whether For the very first wedge of the first toroidal plane it's 0+0+0 =0 even. Then it alternates until we get to the last wedge which must be odd if we have an even number of poloidal voxels. Then the first hex on the next cfs layer is 1+0+0 =1 odd and alternates... and so on. The first wedge on the next toroidal slice is 0+1+0 =1 odd - which is what we need it to be... and so on. So within each hex generation method you can have
|
Could then have canonical ordering indexed in a list with index 0 and 1 and directly use the one you want indexed by the alternate scheme variable. |
Modifies the source mesh workflow to alternate the scheme by which hexahedra and wedges are split into tetrahedra. The alternating schemes ensure that the faces of adjacent tetrahedra, but not belonging to the same hexahedron or wedge, match one another. This avoids gaps and overlaps between adjacent non-planar hexahedron and wedge faces. This alignment is ensured for adjacent wedge-wedge, wedge-hexahedron, and hexahedron-hexahedron pairs. Code changes are as follows:
alternate_scheme
,toroidal_alt_scheme
, andcfs_alt_scheme
boolean parameters to control whether an alternate division scheme should be used for a given elementThe alternate splitting schemes are illustrated below. Plots will follow to demonstrate expected behavior of total volume and total source strength as a function of mesh discretization.
(a)
(b)
Figure 1. Alternate schemes for adjacent hexahedra. (a) Original and (b) alternate.
(a)
(b)
Figure 2. Alternate schemes for adjacent wedges. (a) Original and (b) alternate.
Closes #168