feat: implements healpix geometry#2327
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2327 +/- ##
==========================================
+ Coverage 78.45% 82.02% +3.57%
==========================================
Files 115 119 +4
Lines 19184 18678 -506
==========================================
+ Hits 15050 15320 +270
+ Misses 4134 3358 -776 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Davknapp
left a comment
There was a problem hiding this comment.
Thanks for the addition! Please address my comments. I am looking forward to merge it!
| t8code is a C library to manage a collection (a forest) of multiple | ||
| connected adaptive space-trees of general element classes in parallel. | ||
|
|
||
| Copyright (C) 2015 the developers |
There was a problem hiding this comment.
| Copyright (C) 2015 the developers | |
| Copyright (C) 2026 the developers |
| } | ||
|
|
||
| const double phi = M_PI / 2; | ||
| std::vector<double> coords(3); |
There was a problem hiding this comment.
| std::vector<double> coords(3); | |
| std::array<double, 3> coords = { ... }; |
Bei coords kannst du dann noch die entsprechenden Berechnungen einfügen.
| #include <t8_geometry/t8_geometry_implementations/t8_geometry_linear.hxx> | ||
| #include <t8_cmesh/t8_cmesh_healpix/t8_geometry_healpix.hxx> | ||
|
|
||
| std::vector<double> getCoordsUpperRing(int k) { |
There was a problem hiding this comment.
| std::vector<double> getCoordsUpperRing(int k) { | |
| constexpr | |
| std::array<double, 3> getCoordsUpperRing(const int k) { |
Dokumentier die Funktion noch bitte. Kannst du für "k" einen besseren Namen nutzen?
| return coords; | ||
| } | ||
|
|
||
| std::vector<double> getCoordsBottomRing (int k){ |
There was a problem hiding this comment.
| std::vector<double> getCoordsBottomRing (int k){ | |
| constexpr | |
| std::array<double, 3> getCoordsBottomRing (const int k){ |
Hier auch: Dokumentation und einen besseren Namen.
There was a problem hiding this comment.
Bitte pflege die anderen Änderungen auch hier und in getCoordsEquator ein
| connected adaptive space-trees of general element classes in parallel. | ||
|
|
||
| Copyright (C) 2026 the developers | ||
| Copyright (C) 2015 the developers |
There was a problem hiding this comment.
| Copyright (C) 2015 the developers | |
| Copyright (C) 2026 the developers |
| const int ntrees = 12; | ||
| const int nverts = 4; /* Number of vertices per cmesh element. */ | ||
| std::vector <double> verts; | ||
| t8_eclass_t *all_eclasses = T8_ALLOC (t8_eclass_t, ntrees); |
There was a problem hiding this comment.
The eclasses are already known, so you could either use an std::array or plain c-style array.
| t8_cmesh_set_tree_class (cmesh, itree, T8_ECLASS_QUAD); | ||
| all_eclasses[itree] = T8_ECLASS_QUAD; | ||
| } | ||
| std::vector <double> northPole = {0,0,1}; |
There was a problem hiding this comment.
Can you use a std::array for the north- and southpole?
| int itree = 0; | ||
| // every side section has 4 quads, this builds the upper layer | ||
| // build upper section | ||
| for (int k = 0; k < 4; k++) { |
There was a problem hiding this comment.
Please use a more descriptive name than k.
| } | ||
|
|
||
| // build middle section | ||
| for (int k = 0; k < 4; k++) { |
There was a problem hiding this comment.
Please use a more descriptive name than k.
| } | ||
|
|
||
| // build lower section | ||
| for (int k = 0; k < 4; k++) { |
There was a problem hiding this comment.
Please use a more descriptive name than k.
|
Please use our indentation script to fix the indentation. Also have a look at the output of the doxygen check to see which functions need documentation. |
Closes #2329
Describe your changes here:
All these boxes must be checked by the AUTHOR before requesting review:
Documentation:,Bugfix:,Feature:,Improvement:orOther:.All these boxes must be checked by the REVIEWERS before merging the pull request:
As a reviewer please read through all the code lines and make sure that the code is fully understood, bug free, well-documented and well-structured.
General
Tests
If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):
Scripts and Wiki
scripts/internal/find_all_source_files.shto check the indentation of these files.License
doc/(or already has one).