Closed donnaaboise closed 6 years ago
Original comment by Donna Calhoun (Bitbucket: donnaaboise, GitHub: donnaaboise):
Good suggestion. My main concern was keeping everything consistent, but with an assertion, this should be easy. Thanks.
Original comment by Carsten Burstedde (Bitbucket: cburstedde, GitHub: cburstedde):
In line with issue #96, this will likely be fastest using forestclaw patch data. Coarsening is called before refinement, and cb_regrid_tag4coarsening gets a pointer to all fine patches where it can set the will_coarsen flag in each one's user data. The subsequent call to cb_fclaw2d_regrid_tag4refinement can query this flag to avoid the virtual tagging function.
Care must be taken to set the flag to zero when a patch is created for the first time. Since patches are destroyed on coarsening, there should be no need to ever reset a flag from true to false (?). A good way to double-check this is to assert that the flag is false just before setting it to true in tag4coarsening.
Original comment by Carsten Burstedde (Bitbucket: cburstedde, GitHub: cburstedde):
I could program this fairly easily actually.
Don't quite remember what the issue was, but assume it is fixed.
Originally reported by: Donna Calhoun (Bitbucket: donnaaboise, GitHub: donnaaboise)
If I tag a family of grids for coarsening, there is no need to then check to see whether any of the four sibling grids should be refined.
Is there a way I can determine whether a grid has been tagged for coarsening? I am thinking of a patch access function that returns 1/0 depending on the state of some internal flag.