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

Partition for coarsening in wrap parameters #283

Merged

Conversation

hannesbrandt
Copy link
Collaborator

We add a partition_for_coarsening option to the wrap parameters and store a p4est_wrap_params_t in the wrap.

  • We move several existing parameters, like hollow or coarsen_delay from the p4est_wrap_t into a p4est_wrap_params_t instance, which now is a member of the wrap.
  • Additionally, we add the partition_for_coarsening parameter, which is passed to the calls of p4est_partition_ext in p4est_wrap_partition.
  • We remove initial_level from the wrap_t, as it is only needed for creating a p4est based on a connectivity and a wrap may also be created for an already existing p4est without providing an initial level.
  • For convenience, we introduce p4est_wrap_new_p4est_params to create a wrap of an existing p4est based on an input parameter instance. This function is called both by p4est_wrap_new_p4est and p4est_wrap_new_params.

Currently, the btype of the wrap is taken from the p4est_mesh_params_t instance that is part of the p4est_wrap_params_t. While this ensures consistent connect types across the different structs, the repeated calls to wrap->params->mesh_params->btype seem slightly counterintuitive, so it might make sense to add a duplicate btype to the wrap_params_t.

@hannesbrandt
Copy link
Collaborator Author

With the latest commits the internal mesh creation in wrap_{adapt,partition,hollow} uses the mesh parameters which are stored in the wrap parameters. So, the mesh parameters specified by the user are now used throughout the whole wrap workflow and not only for new_params.
Additionally, I have added wrap_set_partitioning for consistency and convenience.

@cburstedde
Copy link
Owner

Thanks for this significant update! We are breaking the wrap API on purpose for the next version of the code, so we might very clearly state this in the release notes. We can do that when we also remove mesh_get_neighbors (let's just not forget). I'm merging now to get some coverage for the new code.

@cburstedde cburstedde merged commit 592b5f4 into cburstedde:develop Feb 2, 2024
17 checks passed
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.

2 participants