Skip to content

feat: implements healpix geometry - #2327

Open
faouziH21 wants to merge 39 commits into
mainfrom
implement-healpix-geometry
Open

faouziH21 wants to merge 39 commits into
mainfrom
implement-healpix-geometry

Conversation

@faouziH21

@faouziH21 faouziH21 commented May 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #2329

Describe your changes here:

All these boxes must be checked by the AUTHOR before requesting review:

  • The PR is small enough to be reviewed easily. If not, consider splitting up the changes in multiple PRs.
  • The title starts with one of the following prefixes: Documentation:, Bugfix:, Feature:, Improvement: or Other:.
  • If the PR is related to an issue, make sure to link it.
  • The author made sure that, as a reviewer, he/she would check all boxes below.

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

  • The reviewer executed the new code features at least once and checked the results manually.
  • The code follows the t8code coding guidelines.
  • New source/header files are properly added to the CMake files.
  • The code is well documented. In particular, all function declarations, structs/classes and their members have a proper doxygen documentation. Make sure to add a file documentation for each file!
  • README.md files are updated if necessary.
  • All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue).

Tests

  • The code is covered in an existing or new test case using Google Test.
  • The code coverage of the project (reported in the CI) should not decrease. If coverage is decreased, make sure that this is reasonable and acceptable.
  • Valgrind doesn't find any bugs in the new code. This script can be used to check for errors; see also this wiki article.

If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):

  • Should this use case be added to the github action?
  • If not, does the specific use case compile and all tests pass (check manually).

Scripts and Wiki

  • If a new directory with source files is added, it must be covered by the scripts/internal/find_all_source_files.sh to check the indentation of these files.
  • If this PR introduces a new feature, it must be covered in an example or tutorial and a Wiki article.

License

  • The author added a BSD statement to doc/ (or already has one).

@faouziH21
faouziH21 requested a review from Davknapp May 21, 2026 12:34
@codecov

codecov Bot commented May 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.85%. Comparing base (fb60a9b) to head (abc259e).

Files with missing lines Patch % Lines
.../t8_cmesh/t8_cmesh_healpix/t8_geometry_healpix.cxx 0.00% 32 Missing ⚠️
.../t8_cmesh/t8_cmesh_healpix/t8_geometry_healpix.hxx 0.00% 17 Missing ⚠️
src/t8_cmesh/t8_cmesh_healpix/t8_cmesh_healpix.cxx 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2327      +/-   ##
==========================================
- Coverage   83.07%   82.85%   -0.23%     
==========================================
  Files         148      151       +3     
  Lines       22274    22334      +60     
==========================================
  Hits        18505    18505              
- Misses       3769     3829      +60     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Davknapp Davknapp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition! Please address my comments. I am looking forward to merge it!

@Davknapp

Copy link
Copy Markdown
Collaborator

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.

@Davknapp Davknapp assigned Davknapp and faouziH21 and unassigned Davknapp May 21, 2026

@benegee benegee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! If this test passes, we should have a sphere!

@faouziH21

Copy link
Copy Markdown
Collaborator Author

@Davknapp can we get a thumbs up so we can merge :< Thanks :D

@benegee
benegee self-requested a review September 14, 2026 11:04

@benegee benegee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @faouziH21 !

Could you confirm the correctness of the formulae and did you check the ordering of the vertices?
#2329 (comment)

I would then be absolutely happy to have this merged.

Note that we get a 2D manifold with this PR. Extending this to a 3D shell would be the next step.

@@ -0,0 +1,81 @@
/*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is a geometry implementation, this should be located in t8_geometry/t8_geometry_implementations

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandro-elsweijer I think we should discuss this.
You are not wrong, but I think that cmesh and geometry living in the same folder gives a better overview.

@Davknapp

Davknapp commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Please indent your code to our guidelines and document the functions you've implemented.

Thanks for addressing the other remarks!

@Davknapp

Copy link
Copy Markdown
Collaborator

However not exactly as expected. We are looking in -Z (minus Z) direction right? So we should be looking at the north pole, right?. If that is the case, we would expect faces 3, 7, 11, 15 sharing the pole. See the Fig 4 screenshot in #2329.

No we are looking into +Z so if my orientation is correct we are looking at the south pole. Here is a picture where the axis are clear. Screenshot 2026-10-09 164321

I think the sphere is upside-down now. So you probably have to put it down, work it, flip it and reverse it. Ah no, that was Missy Elliott. But you probably have to turn it upside down. Inside out....

@faouziH21

Copy link
Copy Markdown
Collaborator Author

I think the sphere is upside-down now. So you probably have to put it down, work it, flip it and reverse it. Ah no, that was Missy Elliott. But you probably have to turn it upside down. Inside out....

image

@faouziH21 faouziH21 closed this Oct 16, 2026
@faouziH21 faouziH21 reopened this Oct 16, 2026

@sandro-elsweijer sandro-elsweijer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that I am still here even though I do not belong here.
But it still does not sit straight for me that these changes do not integrate in the already existing structure of geometries. I know it is far from perfect, but we should also not add another location where geometries are stored.

First things first:
This check is a lie: ✅ The title starts with one of the following prefixes: Documentation:, Bugfix:, Feature:, Improvement: or Other:.

Second regarding the file structure. We already have similar implementations of this here:

t8_cmesh_new_triangulated_spherical_surface_octahedron (t8_cmesh_t cmesh, const double radius, sc_MPI_Comm comm)

And the geometry is here:
struct t8_geometry_triangulated_spherical_surface: public t8_geometry_with_vertices

Would this be a compromise?
It would be weird to have a new folder just for healpix but not for the other sphere implementations.

Comment thread test/CMakeLists.txt Resolved
faouziH21 and others added 2 commits October 23, 2026 14:56
Suggestions from sandro

Co-authored-by: Sandro Elsweijer <49643115+sandro-elsweijer@users.noreply.github.com>

@Davknapp Davknapp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't feel to overwhelmed by all of the comments, these are good tests!
For the future, keep in mind: Everything that can be const should be const!

@Davknapp Davknapp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some remarks open, please address them!

Thanks for integrating the other remarks, though!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implements healpix geometry

4 participants