ForestClaw / forestclaw

Quadtree/octree adaptive PDE solver based based on p4est.
http://www.forestclaw.org
BSD 2-Clause "Simplified" License
57 stars 21 forks source link

Feature Iterative Refinement #316

Closed scottaiton closed 4 months ago

scottaiton commented 5 months ago

This adds an option to only allow some number of patches to be tagged for refinement before repartitioning and trying to refine again. Once the maximum number of patches to refine is reached, the tag4refinement callback will just return without tagging patches for refinement.

This adds considered_for_refinement flag to the fclaw_patch_data struct that gets packed and unpacked in partitioning. This flag should ensure that each patch of the original domain is only refined once, instead of potentially twice.