From: John P. <jwp...@gm...> - 2018-09-11 14:45:15
|
On Mon, Sep 10, 2018 at 1:57 PM Simone Rossi <sim...@gm...> wrote: > Hello everyone, > I apologize if this is a repeated email. I’m not sure if my previous email > went through. > > I’m trying to create a triangular mesh like the following > > 7 — — 8 —— 9 > | / | / | > | / | / | > 3 —— 4/5—— 6 > | / | / | > | / | / | > 0 —— 1 —— 2 > > Where the node 4 and 5 have the same location but belong to different > triangles: > 4 belongs to (0,3,4), (3,4,8) and (4,9,8) > while > 5 belongs to (0,1,5), (1,6,5) and (5,6,9). > In this way, the sides 0-4,4-9 and 0-5,5-9 are true boundaries. > > In my failed attempt I first created the mesh > > 7 — — — —— 9 > | / | > | / | > | / | > | / | > | / | > 0 —— — —— 2 > > I set the neighbor_ptr to nullptr on the common side and then asked to > refine uniformly the mesh. > When the mesh is refined I only get 9 nodes instead of 10. > Do you have any suggestion on how to achieve this? > I think what happens is that even though the two triangles no longer have neighbor pointers to one another, they still technically "share" the edge (0,9) because they both have nodes 0 and 9. When a new node is inserted for each triangle during refinement, libmesh detects that it is in the same geometric location and only adds a single copy of the node, rather than two copies directly on top of one another, which is what you usually want. Therefore, the two triangles are tied back together at that node. If you want to maintain an internal boundary, you could first "break apart" the mesh by inserting new nodes 10 and 11: 7 — — — —— 9,10 | / | | / | | / | | / | | / | 0,11--- — —— 2 And then updating the connectivity for the two triangles to (0,7,9) and (2,11,10). Uniform refinement from this point on should maintain the interior boundary... -- John |