-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add tetrahedral grid #230
Add tetrahedral grid #230
Conversation
- changed DensityTreePolicy & TreePolicy consequently - added extra contains & intersects to Box
cleaned up unused stuff from voronoi started work on PathSegmentGenerator
added TetraMeshSpatialGrid options added NeedsSubdivide as tetgen unsuitable
changed search tree to use vertices instead of centroids
(vertex intersection still not working)
only entry vertex intersection isn't working
small fixes to prepare TetraMeshSpatialGrid
added all Tetra classes started work on refining Delaunay
marked potential oversight in Voro `TetraMeshSnapshot::readAndClose` still needs to infer cell properties from vertex properties
removed unused code
moved all tetra code to TetraMeshSpatialGrid removed unnecessary code/classes and fixed small oversights added tetgen LICENSE
fixed compile errors
reformatted code
With my recent commits I suppressed the warnings originating from the tetgen library code for various compilers (Clang, GCC, MSVC, Intel oneAPI). Furthermore I made some cosmetic updates to the
|
Questions remaining:
|
After discussion with @mbaes we have decided that simply adding 8 vertices in the corners of the grid bounding box would suffice for this basic implementation. The grid will now fully cover the simulation domain and sources outside the domain are possible again. The error for not enough vertices is no longer needed as there will always be at least 8 vertices. |
Description
Added the
TetraMeshSpatialGrid
class. This grid enables building a unique Delaunay tetrahedralization from input vertices, with a refinement option to increase quality of grid cells. This is all achieved using the open-source TetGen library. Vertices can be sampled from the medium or read from a text data file. Direct reading of tetrahedral grids is not currently supported.Motivation
As described in Lauwers et al. (2024), adaptively constructed tetrahedral grids did not outperform existing grids in SKIRT. Nonetheless, a basic implementation of this grid can still be useful in SKIRT.
Tests
The previous iteration of this grid was extensively tested and benchmarked for accuracy. This implementation was also tested for accuracy and tested with a few edge cases, such as grids with a single tetrahedron or vertices resulting in a degenerate Delaunay tetrahedralization.
Problems
TetraMeshSpatialGrid::Tetra
andTetraMeshSpatialGrid::Face
classes. These classes are declared inside theTetraMeshSpatialGrid.hpp