-
Notifications
You must be signed in to change notification settings - Fork 62
Improvement: own header and source file for forest face neighbor functions #1976
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
base: feature-extend_lfn_to_ghosts
Are you sure you want to change the base?
Conversation
…typroc Bugfix: VTK Output of empty partitions
Feature: Add eclass string for invalid eclass
Fix: clean up custom assertion test header
Improvement: Move t8_cad.hxx/cxx to own folder src/t8_cad
Bugfix: fix empty struct warning
Update documentation link to Read the Docs
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1976 +/- ##
==========================================
+ Coverage 75.66% 76.69% +1.02%
==========================================
Files 105 107 +2
Lines 18646 18852 +206
==========================================
+ Hits 14109 14459 +350
+ Misses 4537 4393 -144 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| 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) 2024 the developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Copyright (C) 2024 the developers | |
| Copyright (C) 2025 the developers |
| parts. In that case, process boundary elements will have 0 neighbors. | ||
| */ | ||
| t8_gloidx_t | ||
| t8_forest_element_face_neighbor (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| t8_forest_element_face_neighbor (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, | |
| t8_forest_element_face_neighbor (const t8_forest_t forest, cosnt t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, |
| */ | ||
| t8_gloidx_t | ||
| t8_forest_element_face_neighbor (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, | ||
| const t8_eclass_t neigh_eclass, int face, int *neigh_face) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const t8_eclass_t neigh_eclass, int face, int *neigh_face) | |
| const t8_eclass_t neigh_eclass, const int face, int *neigh_face) |
|
|
||
| /* This function is declared in t8_forest_private.h */ | ||
| t8_gloidx_t | ||
| t8_forest_element_half_face_neighbors (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| t8_forest_element_half_face_neighbors (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, | |
| t8_forest_element_half_face_neighbors (const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *elem, |
| /* This function is declared in t8_forest_private.h */ | ||
| t8_gloidx_t | ||
| t8_forest_element_half_face_neighbors (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, | ||
| t8_element_t *neighs[], t8_eclass_t neigh_class, int face, int num_neighs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| t8_element_t *neighs[], t8_eclass_t neigh_class, int face, int num_neighs, | |
| t8_element_t *neighs[], const t8_eclass_t neigh_class, const int face, const int num_neighs, |
| 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) 2024 the developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Copyright (C) 2024 the developers | |
| Copyright (C) 2025 the developers |
| * After the search the entries of the buffer are used and the | ||
| * search can start again with a clean buffer. | ||
| */ | ||
| struct t8_lfn_user_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| struct t8_lfn_user_data | |
| typedef struct |
| std::vector<t8_locidx_t> element_indices; /**< Element indices of the found neighbors. */ | ||
| std::vector<int> dual_faces; /**< Dual faces of the found neighbors. */ | ||
| std::vector<const t8_element_t *> neighbors; /**< Pointers to the actual neighbor elements. */ | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }; | |
| } t8_lfn_user_data ; |
| const t8_locidx_t adjusted_tree_id = !is_ghost_tree ? ltreeid : ltreeid - t8_forest_get_num_local_trees (forest); | ||
| T8_ASSERT (t8_forest_element_is_leaf_or_ghost (forest, element, adjusted_tree_id, is_ghost_tree)); | ||
|
|
||
| struct t8_lfn_user_data *lfn_data = reinterpret_cast<struct t8_lfn_user_data *> (user_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| struct t8_lfn_user_data *lfn_data = reinterpret_cast<struct t8_lfn_user_data *> (user_data); | |
| t8_lfn_user_data *lfn_data = reinterpret_cast<t8_lfn_user_data *> (user_data); |
| } | ||
| } | ||
|
|
||
| struct t8_lfn_user_data user_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| struct t8_lfn_user_data user_data; | |
| t8_lfn_user_data user_data; |
Closes #1977
Describe your changes here:
Currently this looks like more than it acutally is, since it contains the large changes from #1736.
Merge #1736 first.
Only reordering of files, no source code added except includes.
forest.cxxis overloaded with functions.I cleaned it up a little by moving all face neighbor related functions into 2 separate headers/source files.
One for element (i.e. same level) face neighbor and one for leaf face neighbor.
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
script/find_all_source_files.scpto check the indentation of these files.License
doc/(or already has one).