Skip to content
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

Progress on 3D - domain_indirect_neighbors #277

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

hannesbrandt
Copy link
Contributor

We add the 3D version of domain_indirect_neighbors, that queries face neighbors of ghost patches which reside on another process. The maximum amount of face neighbors (2 in 2D, 4 in 3D) is parameterized by P4EST_HALF.

@scottaiton scottaiton merged commit 90c741c into ForestClaw:develop Sep 20, 2023
35 checks passed
*rfaceno = pi + 5;
*rblockno = pi + P4EST_HALF;
*rpatchno = pi + P4EST_HALF + 1;
*rfaceno = pi + P4EST_CHILDREN + 1; /* P4EST_CHILDREN == 2 * P4EST_HALF */
Copy link
Member

Choose a reason for hiding this comment

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

please can you use P4EST_CHILDREN only if referring to the volumetric refinement? In this code, it seems more to the point to write pi + P4EST_HALF + 1 + P4EST_HALF.

fclaw2d_block_t *block;
fclaw2d_domain_indirect_t *ind;
fclaw2d_patch_relation_t prel;
p4est_wrap_t *wrap = (p4est_wrap_t *) domain->pp;
p4est_ghost_t *ghost = p4est_wrap_get_ghost (wrap);

num_exc = domain->num_exchange_patches;
data_size = P4EST_FACES * 6 * sizeof (int);
face_info_size = 2 + P4EST_CHILDREN; /* P4EST_CHILDREN == 2 * P4EST_HALF */
Copy link
Member

Choose a reason for hiding this comment

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

As above, this identity should not be used. P4EST_HALF should be used when referring to small face neighbors, and P4EST_CHILDREN when referring to children. Thanks for the good work!

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.

3 participants