modified
For an, examplary simple, ElementMesh
p = {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {1/2, 1/2}};
mesh = ToElementMesh["Coordinates" -> p,"MeshElements" ->
{TriangleElement[{{1, 2, 5 }, {2, 3, 5 }, {5,3, 4 }, { 1, 5,4 } }]}];
Show[mesh["Wireframe"], Axes -> True, AxesLabel -> {x, y}]
I would like to select part of the mesh {x,y}
which fullfills condition y>=x
Is there a simple solution?
Thanks!
addendum
Based on the @DanielHuber's helpful answer I tried to preserve the meshnumbering
dreiecke = mesh["MeshElements"][[1]][[1]]
dreiecke1 = Select[dreiecke,Apply[And,RegionMember[ImplicitRegion[r >= z, {z, r}], p[[#]]]] &]
ToElementMesh["Coordinates" -> p,"MeshElements" ->{TriangleElement[dreiecke1]}]
but Mathematica gives an error message "ToElementMesh::fememins: The mesh elements are not valid. A set of valid mesh element incidents needs to be positive integers and be able to form a complete sequence starting from 1 to the largest incident present. There are missing incidents; a complete sequence cannot be formed."
Obviously because there are unused meshpoints in "Coordinates".
Any idea how to solve this probelemproblem? Thanks!