Dear all,
As before, the context is that I want to solve problems which simultaneously involve unknowns in a three dimemsional domain as well as on interfaces and/or boundary portions (conceptionally I consider the boundary as a special case of an interface). So I need a triangulation of the domain and a triangulation of the interfaces/boundary portions, which is generated from the domain mesh in a way very similar to extract_boundary_mesh(). I do generally assume that the interface/boundary mesh is refined in exactly the same way as the underlying domain and that the vertex positions of interface/boundary mesh coincide with those of the underlying domain mesh.
As a first simple test case I have chosen a spherical domain and used hyper_ball() to generate the triangulation (coarse mesh). The corresponding boundary triangulation (coarse mesh) is generated in a way completely analogous to how hyper_sphere() does it. I.e., extract_boundary_mesh() is used for this purpose and a SphericalManifold object is assigned to the boundary mesh afterwards. After generation of the coarse meshes, I refine the domain meshes. In this context, I've made the following observation: If I refine both meshes once globally, all corresponding vertices of the domain mesh and the boundary mesh are, to within numerical accuracy, at the same location as I'd expect it. However, if I do two or more global refinements, this is no longer the case, which invalidates my original assumption of coinciding meshes. The differences in vertex positions are moderate (approx. 0.1% of the radius of the sphere), but way too large to be explainable in terms of numerical inaccuracies. So, here comes my question: Has anybody an idea, what the reason for these differences could be?
Here is what I have found out so far:
(1) The problem does not exist in 2 dimensions;
(2) After one global refinement, the function center(true) returns, to within numerical accuracy, exactly the same points for the boundary faces of the domain mesh and the corresponding cells of the boundary mesh (both, for line centers as well as for boundary cell/face centers). As I am assuming that the new vertices are placed according to the points returned by center(true) during refinement, it seems weird to me that the meshes do no longer coincide after another global refinement.
I have attached an example illustrating the problem.
Thanks in advance for your help.
Sebastian