Extracting surface meshes - coordinate mismatch #2873
-
Hi, I understand there are some efforts underway to automate some of what I'm doing (e.g. #1282) but I understand they are not yet complete. I'm trying to create a surface mesh on which I can solve a Poisson equation coupled to a Poisson equation in the interior bulk domain. I want to use an isoparametric approach. The method is detailed in https://doi.org/10.1093/imanum/drs022 The approach I have works well for orders 1 and 2 but I have an issue for higher orders. I've reduced one of the problems I am facing to the attached minimal working example. The steps are:
The approach currently fails since the boundary nodes of the bulk mesh and the nodes of the surface mesh do not coincide. I am trying to work out if this is expected, a bug in what I am doing or something else. All help welcome. Code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think this is because on the interval mesh of the boundary the 1D lagrange elements by default use spectral nodes. Whereas on the triangle the degree three elements use equispaced nodes. So it is not true that the nodes match up the way you construct your boundary mesh. For degree 1 and 2 they do because for degree 1 there are only vertex nodes, and for degree 2 the extra node is at the midpoint. If you construct your coordinate space on the surface mesh with Edit: fixed the functionspace setup. |
Beta Was this translation helpful? Give feedback.
I think this is because on the interval mesh of the boundary the 1D lagrange elements by default use spectral nodes. Whereas on the triangle the degree three elements use equispaced nodes. So it is not true that the nodes match up the way you construct your boundary mesh. For degree 1 and 2 they do because for degree 1 there are only vertex nodes, and for degree 2 the extra node is at the midpoint.
If you construct your coordinate space on the surface mesh with
FunctionSpace(surfacemesh, VectorElement("P", interval, 3, variant="equispaced"))
I think you will find things match.Edit: fixed the functionspace setup.