-
Notifications
You must be signed in to change notification settings - Fork 114
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
Newly adapted quadrants in wrap #310
Newly adapted quadrants in wrap #310
Conversation
Cool; would we want to delete the arrays once they no longer match the p4est (e. g. due to partition)? |
The arrays may still be of value even after partitioning, e.g. when organizing communication of quadrant-related user data after a call of partition. This is for example planned for our upcoming partitioning strategies in forestclaw. |
I have changed the allocation of the arrays. |
Sounds good! Please make sure to delete their translations from p4est_to_p8est.h. |
Looks good; thanks! |
This PR adds two arrays
newly_refined
andnewly_coarsened
to thep4est_wrap_t
. The arrays store the local quadrant indices of quadrants that were refined or coarsened during the most recent call top4est_wrap_adapt
. For refinement, only the index of the quadrant with child id 0 is stored. The arrays are not updated during other function calls likep4est_wrap_partition
. So, they always index into the local quadrants of the p4est as it was right after adaptation.The arrays are only initalized and set, if the new wrap parameter
store_adapted
is set to true. Furthermore, we assert that the wrap's p4est is balanced before the adaptation, which ensures a single level of refinement.