-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature vertex ghosts #1353
base: main
Are you sure you want to change the base?
Feature vertex ghosts #1353
Conversation
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.
In general this looks good. But the behaviour of the tutorial is changed in a way such that it doesn't show the balance algorithm anymore. This should not be the case. I think it is a good idea to make a seperate ghost tutorial step showing the differences between Face and vertex ghost. The current step4 can be a follow up step (step5) to show the balance algo again.
@@ -2899,7 +2899,7 @@ t8_forest_set_ghost_ext (t8_forest_t forest, int do_ghost, t8_ghost_type_t ghost | |||
{ | |||
T8_ASSERT (t8_forest_is_initialized (forest)); | |||
/* We currently only support face ghosts */ | |||
SC_CHECK_ABORT (do_ghost == 0 || ghost_type == T8_GHOST_FACES, | |||
SC_CHECK_ABORT (do_ghost == 0 || ghost_type == T8_GHOST_FACES || ghost_type == T8_GHOST_VERTICES, |
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.
Please update the error-message, too.
@@ -837,6 +837,33 @@ class t8_scheme { | |||
eclass_schemes[tree_class]); | |||
}; | |||
|
|||
inline int |
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.
Please document this function.
eclass_schemes[tree_class]); | ||
} | ||
|
||
inline void |
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.
Please document this function.
eclass_schemes[tree_class]); | ||
} | ||
|
||
inline void |
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.
Please document this function.
@@ -546,6 +546,60 @@ class t8_default_scheme_quad: public t8_default_scheme_common<t8_default_scheme_ | |||
void | |||
element_get_anchor (const t8_element_t *elem, int anchor[3]) const; | |||
|
|||
inline int |
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.
inline int | |
constexpr int |
p4est_quadrant_t *elem = (p4est_quadrant_t *) element; | ||
p4est_quadrant_t *desc = (p4est_quadrant_t *) descendant; | ||
p4est_qcoord_t coord_offset = P4EST_QUADRANT_LEN (elem->level) - P4EST_QUADRANT_LEN (level); | ||
desc->x = elem->x + coord_offset * ((vertex & 1 << 0) >> 0); |
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.
desc->x = elem->x + coord_offset * ((vertex & 1 << 0) >> 0); | |
desc->x = elem->x + coord_offset * (vertex & 1) ; |
@@ -208,7 +186,7 @@ t8_step4_main (int argc, char **argv) | |||
/* Initialize the sc library, has to happen before we initialize t8code. */ | |||
sc_init (sc_MPI_COMM_WORLD, 1, 1, NULL, SC_LP_ESSENTIAL); | |||
/* Initialize t8code with log level SC_LP_PRODUCTION. See sc.h for more info on the log levels. */ | |||
t8_init (SC_LP_PRODUCTION); | |||
t8_init (SC_LP_DEBUG); |
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.
Please change it back to SC_LP_PRODUCTION
@@ -230,7 +208,7 @@ t8_step4_main (int argc, char **argv) | |||
t8_global_productionf (" [step4] Creating an adapted forest as in step3.\n"); | |||
t8_global_productionf (" [step4] \n"); | |||
/* Build a cube cmesh with tet, hex, and prism trees. */ |
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.
Please udpate this commen.t
forest = t8_forest_new_adapt (forest, t8_refine_first_child, 0, 0, NULL); | ||
forest = t8_forest_new_adapt (forest, t8_refine_first_child, 0, 0, NULL); |
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.
forest = t8_forest_new_adapt (forest, t8_refine_first_child, 0, 0, NULL); | |
forest = t8_forest_new_adapt (forest, t8_refine_first_child, 0, 0, NULL); | |
forest = t8_forest_new_adapt (forest, t8_refine_first_child, 0, 0, NULL); |
*/ | ||
static t8_forest_t | ||
t8_step4_balance (t8_forest_t forest) | ||
int |
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.
why is balance removed?
Maybe it is a good idea to make an exampe where one can compare vertex and face ghosts?
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.
Because the changes in the tutorial were not meant to be reviewed or merged, rather to test stuff out locally.
This feature is not tested at all, and I see that as a bigger priority than fixing tutorials
Describe your changes here:
Adds the needed vertex functionality for vertex ghosts on a single tree to the scheme interface and implements it for the default quad scheme.
Extends the ghost algorithm, so that vertex ghosts on a single tree coarse mesh can be constructed.
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 Makefiles
The code is well documented
All function declarations, structs/classes and their members have a proper doxygen documentation
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
Github action
The code compiles without warning in debugging and release mode, with and without MPI (this should be executed automatically in a github action)
All tests pass (in various configurations, this should be executed automatically in a github action)
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.scp
to check the indentation of these files.License
doc/
(or already has one)Tag Label