Open gthyagi opened 6 months ago
The implementation is naive and fragile - it assumes that it is fine just to move any labeled nodes (post refinement) so that they are at the required radius. Could be all sorts of things going wrong, including something in how we catch labels on nodes (it's the edges that are labelled for refinement) or it could be that we don't do something important before we rebuild the mesh discretisation.
It appears that the refinement_callback is the culprit when it comes to issues in spherical models, especially when both refinement and refinement_callback are enabled. However, when I ran the model with only the refinement option, it worked, and the Stokes iterations converged.
First call to refinement_callback happens here: https://github.com/underworldcode/underworld3/blob/0e8908dfee05d7b93e9dc5cab97946e8ccf15f66/src/underworld3/discretisation.py#L239
Here is the script https://github.com/gthyagi/UW3_Annulus_Spherical_Benchmarks/blob/f1f1f1cf7ee71e737f66232d3a81ad70d7278c94/Spherical_Benchmarks/Ex_Stokes_Spherical_Benchmark_Kramer_ref_1_ref_cb_0.py