Skip to content
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

Merged
merged 55 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f3e2a9a
Add NestedDensityTreePolicy
arlauwer Sep 30, 2023
a38ae98
Fix formatting, warning, and minor merge error
petercamps Oct 3, 2023
b76f33d
move min/max level test into needsSubdivide()
petercamps Oct 4, 2023
c597e40
streamline property names and add documentation
petercamps Oct 4, 2023
607aa98
verify that inner box is nonempty
petercamps Oct 4, 2023
c574694
tetra construction functional
arlauwer Oct 25, 2023
1ede7f1
grid construction fully working
arlauwer Oct 31, 2023
0def91f
working PathSegmentGenerator
arlauwer Nov 1, 2023
bbb956d
started work on efficient ray traversal
arlauwer Nov 7, 2023
3930fc6
implemented traversal from maria et al.
arlauwer Nov 19, 2023
dcd9aa1
tetgen functional
arlauwer Nov 28, 2023
e123370
refactored to Tetrahedron.cpp
arlauwer Jan 6, 2024
2073d90
fixed traversal edge case
arlauwer Jan 19, 2024
a12c2fa
functional centroid kd-tree using breadth-first search of neighbors
arlauwer Jan 22, 2024
1ad4f35
updated traversal algo to Martie (2017)
arlauwer Jan 25, 2024
a27e45b
temp fix for edge cases
arlauwer Jan 26, 2024
5fcc4fa
almost functional traversal with edge cases
arlauwer Jan 31, 2024
cf0379e
traversal funtioncal, uses plane intersection if unsure
arlauwer Feb 5, 2024
62c93e9
sped up Tetra::inside
arlauwer Feb 8, 2024
d268cfd
used traversal in CellIndex and refactored some code
arlauwer Feb 11, 2024
bcdad2f
tetra stats
arlauwer Feb 14, 2024
da083d6
fixes and var test
arlauwer Feb 17, 2024
49b6ebd
var fix
arlauwer Feb 17, 2024
4dfbef9
minVolume
arlauwer Feb 28, 2024
a307ead
small fix; removed unused code
arlauwer Mar 4, 2024
f1fe491
started cleanup
arlauwer Jul 1, 2024
00f6a39
removed adaptive construction
arlauwer Nov 15, 2024
6ff2c1e
removed unnecessary code
arlauwer Nov 15, 2024
fa0743b
added refine option to Tetra grid
arlauwer Nov 16, 2024
21ec069
moved class Tetrahedron to class TetraMeshSnapshot
arlauwer Nov 18, 2024
a1abc14
Merge remote-tracking branch 'upstream/master'
arlauwer Nov 19, 2024
4645750
started basic tetra implemenation
arlauwer Nov 29, 2024
6b3db99
removed unnecessary code
arlauwer Nov 30, 2024
8c9a368
formatted code
arlauwer Nov 30, 2024
b4059f8
formatting
arlauwer Dec 2, 2024
6b09c3b
Merge branch 'master' into tetra
arlauwer Dec 2, 2024
606c952
used block search structure
arlauwer Dec 11, 2024
225232b
Merge remote-tracking branch 'upstream/master' into tetra
arlauwer Dec 11, 2024
6fde64d
temp: moved Tetra and Face to hpp to make it compile
arlauwer Dec 11, 2024
775ff72
Merge remote-tracking branch 'upstream/master' into tetra
arlauwer Dec 12, 2024
495be24
cleanup and documentation
arlauwer Dec 12, 2024
e0cf2fe
documentation
arlauwer Dec 13, 2024
896e7d6
rename property and fix small oversight in path generator
arlauwer Dec 13, 2024
d5dbc24
final refactoring and documentation
arlauwer Dec 16, 2024
4353935
remove debug files
arlauwer Dec 16, 2024
9ce0411
avoid warnings with clang - not yet for other compilers
petercamps Dec 16, 2024
083a06e
fix warnings for GCC and MSVC
petercamps Dec 16, 2024
fcfa433
try to fix warnings for GCC on MinGW
petercamps Dec 16, 2024
6b7490d
add build check with Intel oneAPI
petercamps Dec 16, 2024
afdf5d2
try intel oneAPI runner again
petercamps Dec 16, 2024
b15f5a3
try oneAPI checker once more
petercamps Dec 16, 2024
ecb9f46
cosmetic updates to source code
petercamps Dec 17, 2024
7ebc847
add error if no grid
arlauwer Dec 18, 2024
9c05bec
add 8 corner vertices to cover full domain
arlauwer Dec 19, 2024
4d31565
trivial adjustments to comments
petercamps Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/workflows/check-builds.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# GitHub action workflow that checks the build process on multiple platforms.
#
# The workflow builds the code (without MPI and without MakeUp)
# using GCC on Ubuntu and using Clang on macOS, in two different jobs.
# Other compiler/platform combinations can be added if the need arises.
# using various compilers and operating systems, in different jobs.
# The workflow fails if there are any build errors and/or warnings.
#
name: Check builds
Expand Down Expand Up @@ -86,3 +85,30 @@ jobs:
- name: Build
shell: cmd
run: cd release && cmake --build . -j 2

# Intel on Ubuntu
check_build_intel:
# job name, displayed in the action log
name: Build using Intel oneAPI on Ubuntu
# run this job on the Github-provided runner with a recent Ubuntu version
runs-on: ubuntu-22.04
# steps that make up this job
steps:
# checkout using a recent version of the checkout action
- name: Checkout
uses: actions/checkout@v3
# add Intel oneAPI to apt repository
- name: add oneAPI to apt
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
# install Intel oneAPI
- name: install oneAPI
run: sudo apt install intel-oneapi-compiler-dpcpp-cpp
# configure the build files through CMake
- name: Configure
run: cmake -B release -DCMAKE_C_COMPILER=/opt/intel/oneapi/compiler/latest/bin/icx -DCMAKE_CXX_COMPILER=/opt/intel/oneapi/compiler/latest/bin/icpx -DCMAKE_BUILD_TYPE:STRING=Release -DWARNINGS_AS_ERRORS:BOOL=ON -DBUILD_DOX_STYLE:BOOL=ON -DBUILD_SMILE_SHAPES:BOOL=ON -DBUILD_SMILE_TOOL:BOOL=ON -L
# perform the actual build (Ubuntu runners have 2 cores)
- name: Build
run: make -C release -j 2
1 change: 1 addition & 0 deletions SKIRT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# add all relevant subdirectories; each subdirectory defines a single target
add_subdirectory(fitsio)
add_subdirectory(voro)
add_subdirectory(tetgen)
add_subdirectory(mpi)
add_subdirectory(utils)
add_subdirectory(core)
Expand Down
3 changes: 2 additions & 1 deletion SKIRT/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ target_link_libraries(${TARGET} schema fundamentals)
include_directories(../../SMILE/schema ../../SMILE/fundamentals)

# add SKIRT library dependencies
target_link_libraries(${TARGET} fitsio voro mpi utils)
target_link_libraries(${TARGET} fitsio voro mpi utils tetgen)
include_directories(../fitsio ../voro ../mpi ../utils)
include_directories(SYSTEM ../tetgen) # suppress warnings in tetgen header

# adjust C++ compiler flags to our needs
include("../../SMILE/build/CompilerFlags.cmake")
2 changes: 2 additions & 0 deletions SKIRT/core/SimulationItemRegistry.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
#include "TTauriDiskGeometry.hpp"
#include "TemperatureProbe.hpp"
#include "TemperatureWavelengthCellLibrary.hpp"
#include "TetraMeshSpatialGrid.hpp"
#include "ThemisDustMix.hpp"
#include "ToddlersSED.hpp"
#include "ToddlersSEDFamily.hpp"
Expand Down Expand Up @@ -494,6 +495,7 @@ SimulationItemRegistry::SimulationItemRegistry(string version, string format)
ItemRegistry::add<FileTreeSpatialGrid>();
ItemRegistry::add<AdaptiveMeshSpatialGrid>();
ItemRegistry::add<VoronoiMeshSpatialGrid>();
ItemRegistry::add<TetraMeshSpatialGrid>();

// spatial grid policies
ItemRegistry::add<TreePolicy>();
Expand Down
Loading