Feature: extend leaf face neighbor to non-balanced forests and ghosts [N/N]#1736
Feature: extend leaf face neighbor to non-balanced forests and ghosts [N/N]#1736
Conversation
|
Thanks for the comments. |
| for (ichild = 0; ichild < num_face_children; ichild++) { | ||
| /* find the owner */ | ||
| owner = t8_forest_element_find_owner (forest, neighbor_tree, half_neighbors[ichild], neigh_class); | ||
| size_t iowner; |
There was a problem hiding this comment.
| size_t iowner; |
| t8_forest_element_owners_at_neigh_face (forest, itree, elem, iface, &owners); | ||
| /* Iterate over all owners and if any is not the current process, | ||
| * add this element as remote */ | ||
| for (iowner = 0; iowner < owners.elem_count; iowner++) { |
There was a problem hiding this comment.
| for (iowner = 0; iowner < owners.elem_count; iowner++) { | |
| for (size_t iowner = 0; iowner < owners.elem_count; iowner++) { |
| else { | ||
| int dummy_neigh_face; | ||
| /* This element has maximum level, we only construct its neighbor */ | ||
| neighbor_tree = t8_forest_element_face_neighbor (forest, itree, elem, half_neighbors[0], neigh_class, |
There was a problem hiding this comment.
we should wait for #2214 such that we can pass a nullptr here.
| connected adaptive space-trees of general element classes in parallel. | ||
|
|
||
| Copyright (C) 2015 the developers | ||
| Copyright (C) 2024 the developers |
There was a problem hiding this comment.
| Copyright (C) 2024 the developers | |
| Copyright (C) 2026 the developers |
| Set the proper return values of the leaf face neighbor computation | ||
| in case that no neighbors are found. | ||
| */ | ||
| static void |
There was a problem hiding this comment.
Please document this function.
src/t8_forest/t8_forest.cxx
Outdated
| } | ||
| } | ||
|
|
||
| /* TODO: If the forest has no ghosts, then skip the ghosts |
There was a problem hiding this comment.
Is this still an open ToDo? Please open an issue if so.
There was a problem hiding this comment.
Not a TODO anymore. I remove the comment.
| // We add the ghost elements of that tree to our search array. | ||
| const t8_element_array_t *ghost_leaves | ||
| = t8_forest_ghost_get_tree_leaf_elements (forest, local_neighbor_ghost_treeid); | ||
| if (ghost_leaves != nullptr) { |
There was a problem hiding this comment.
| if (ghost_leaves != nullptr) { | |
| if (ghost_leaves != NULL) { |
or use if (ghost_leaves)
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
…to feature-extend_lfn_to_ghosts
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
…to feature-extend_lfn_to_ghosts
|
I am waiting to resolve the merge conflicts until i have included your review comments. |
Ok, then assign me again as soon as you have addressed my comments. |
Closes #1737 and closes #1299
Will also close #328
Disclaimer
This PR is not 2k lines as it shows currently.
It is based on many changes that are parts of different PRs but until these are not merged, their lines will show up in the count here.
I listed all the PRs below and also marked the sections that do not need review in the "Files Changed" tab.
Describe your changes here:
This has gotten quite large and will be split up and take some time.I am putting this up here now to start the review early.
I would like to have a review on this because the algorithm is now working.The review can focus mostly on the leaf_face_neighbor functionality.
It is still in draft status, because
a) there is still low-level functionality missing to make this work on all element shapesb) i will split this up into multiple PRs eventually
c) not all tests pass, due to missing low-level functionality
Here is an overview over the exsiting PRs that cover changes from this one.
So a review of this PR can exclude all the listed once below:
Description
This PR extends the leaf face neighbor computation in two ways simultaneously:
a) extend it to ghosts, thus we can compute neighbors of ghosts and neighbors that are ghosts
b) extend it to non-balanced forests. So far a 2:1 condition was required, this is no longer the case.
The main contributions are
implemented while the lfn function did not work for adaptive forests, need to check whether to extend this function to all forests now) (Should be its own PR)
Edit:
The function was so far only tested for quads and hexes due to the missing face ancesor #1738. A first test with lines does fail - i need to investigate what is going on. (t8_gtest_face_neighbors/forest_face_neighbors.test_face_neighbors/t8_cmesh_new_from_class_Line_sc_MPI_COMM_WORLD_default)Edit2: It now works for all element shapes :)
What is still open to get this out of draft:
(see Feature: ancestor face computation function for the scheme #1958)
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).