Further extensions of the functionality from #1855 are possible. Adding the ability of having gauge points on, e.g., a 1D TreeMesh should be straightforward. For instance, one does not need a Newton iteration as the affine mapping between computational coordinates and physical coordinates is easily inverted exactly.
Instead of using the barycenters, it could be possible to use the available normal directions instead. See this discussion where this idea is partially implemented for the UnstructuredMesh2D.
For 3D meshes, like P4estMesh, a bit more is involved but it should still be straightforward. The search to locate which element a given (x,y,z) points lives is likely easily extended from the strategy in #1855. However, it might become more performance critical, especially if AMR is used. This is because the search would need to be redone after each time the AMRCallback is applied. The Newton iteration to compute the reference coordinates could reuse the existing straight_side_quad_map, straight_side_quad_map_metrics, transfinite_quad_map, and transfinite_quad_map_metrics functions that are working in 3D. However, an efficient Newton iteration may need implemented that requires inverting a 3x3 matrix.
Further extensions of the functionality from #1855 are possible. Adding the ability of having gauge points on, e.g., a 1D
TreeMesh
should be straightforward. For instance, one does not need a Newton iteration as the affine mapping between computational coordinates and physical coordinates is easily inverted exactly.Instead of using the barycenters, it could be possible to use the available normal directions instead. See this discussion where this idea is partially implemented for the
UnstructuredMesh2D
.For 3D meshes, like
P4estMesh
, a bit more is involved but it should still be straightforward. The search to locate which element a given(x,y,z)
points lives is likely easily extended from the strategy in #1855. However, it might become more performance critical, especially if AMR is used. This is because the search would need to be redone after each time theAMRCallback
is applied. The Newton iteration to compute the reference coordinates could reuse the existingstraight_side_quad_map
,straight_side_quad_map_metrics
,transfinite_quad_map
, andtransfinite_quad_map_metrics
functions that are working in 3D. However, an efficient Newton iteration may need implemented that requires inverting a 3x3 matrix.