I want to create an element mesh from an arc $x=Rcos(\varphi), y=Rsin(\varphi)$, with $R=100, \varphi \in [0,\pi/4]$ which looks like this:
Graphics[Circle[{0, 0}, 100, {0, Pi/4}]]
I want to discretize the region with 8 elements, so I tried something like this:
ToElementMesh[
"Coordinates" -> Table[{100 Cos[phi], 100 Sin[phi]}, {phi, 0, Pi/4, 1/8 Pi/4}],
"MeshElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}}]}
]
This results in:
ToElementMesh: The element dimension of LineElement[{{1,2},{2,3},{3,4},{4,5},{5,6},{6,7},{7,8},{8,9}}] is not consistent with other elements that are of dimension 2.
ToElementMesh: A mesh could not be generated.
I used this example for 1D from the docs as a template (this is the only example of 1D element meshes from the docs):
ToElementMesh[
"Coordinates" -> Partition[Range[0., 1., 1/9], 1],
"MeshElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}}]}
]
The problem seems to be that the dimension of the "Coordinates" is {9,2} instead of {9,1}, but I haven't been able to figure out how to deal with this. Can this be done with ToElementMesh or is there another way to do this?
EDIT: This does what I wanted:
MeshRegion[
Table[{100 Cos[phi], 100 Sin[phi]}, {phi, 0, Pi/4, 1/8 Pi/4}],
Line[{1, 2, 3, 4, 5, 6, 7, 8, 9}]
]
MeshRegion
andDiscretizeGraphics
? $\endgroup$