Skip to content

Feature: implements healpix geometry - #2327

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

faouziH21 wants to merge 57 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 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.04%. Comparing base (13291c7) to head (b15b14e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../t8_cmesh/t8_cmesh_healpix/t8_geometry_healpix.cxx 0.00% 43 Missing ⚠️
.../t8_cmesh/t8_cmesh_healpix/t8_geometry_healpix.hxx 0.00% 19 Missing ⚠️
src/t8_cmesh/t8_cmesh_healpix/t8_cmesh_healpix.cxx 0.00% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2327      +/-   ##
==========================================
- Coverage   84.33%   84.04%   -0.30%     
==========================================
  Files         148      151       +3     
  Lines       22253    22332      +79     
==========================================
+ Hits        18767    18768       +1     
- Misses       3486     3564      +78     

☔ 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.

@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
Davknapp previously approved these changes Nov 6, 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.

Two comments now, but I would like to have another look.

@benegee benegee changed the title feat: implements healpix geometry Feature: implements healpix geometry Nov 9, 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.

I just tried to create the cmesh in an example, but got:

[t8 0] Constructed the geometry_handler.
[t8 0] Registering geometry with name t8_geometry_healpix
[t8 0] Cmesh is not partitioned.
[t8 0] Committed cmesh with 12 local and 12 global trees and 0 ghosts.
[t8 0] Face connection mismatch at tree 4 face 1
[t8 0] Face connection mismatch at tree 4 face 2
[t8 0] Face connection mismatch at tree 4 face 3
[libsc 0] Abort: Assertion 't8_cmesh_is_committed (cmesh)'

Maybe there is still a problem with connectivity?

@faouziH21

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-11-27 112730

We have thicc spheres now... unfortunately not before GTA 6 😞

* Evaluates a point on a sphere surface geometry from mesh layer and face parameters.
*
* Maps 2D parametric reference coordinates (\p xi, \p eta) of a specific mesh element,
* Maps 3D parametric reference coordinates (\p xi, \p eta) of a specific mesh element,

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.

This becomes (xi, eta, zeta), or rather (xi, eta, radial_pos) then?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In the parameter case we should write radial_pos... but I understand if you would rather write zeta

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.

Either would be fine for me. I just wanted to point out that the tuple should have 3 entries because this is referring to 3D coordinates.

xyf2loc (double x, double y, int face, const int JRLL[], const int JPLL[])
{
double z = 0.0;
double nr = 0.0;

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.

Please add the link to the doc.
The online doxygen C++ doc does not include it, but I think the Julia version is fine as well.

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