In this simple example I try to mesh a rectangle, the mesh should include a fixed line.
Using "IncludePoints" I get
Needs["NDSolve`FEM`"] addpts = Table[{1/2, yi}, {yi, Subdivide[1/3, 2/3, 3]}]; mesh = ToElementMesh[ Rectangle[{0, 0}, {1, 1}] , "MeshOrder" -> 1,MeshElementType -> "TriangleElement" , "IncludePoints" -> addpts ] Show[{mesh["Wireframe"], Graphics[{Thickness[Large], PointSize[Large], , Red, Line[addpts],Point[addpts]}]}] The result does not quite meet my expectations yet.
How can I force the meshing to include the complete red line without the element sides intersecting the line?
I tried without success to mesh RegionUnion[Rectangle[{0, 0}, {1, 1} ], Line[{{1/2, 1/3}, {1/2, 2/3 }}]]
Any idea how to realize this special meshing? Thanks!




