Skip to main content
added 658 characters in body
Source Link
Daniel Huber
  • 60.8k
  • 2
  • 25
  • 71

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh["Coordinates"], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

addendum

If you want the renumber the points so that all points in the reduced mesh appear before points that are not in the reduced mesh, you must renumber the points as well as the triangles. Here is your example:

dreiecke = mesh["MeshElements"][[1]][[1]] dreiecke1 = Select[dreiecke, Apply[And, RegionMember[ImplicitRegion[r >= z, {z, r}], p[[#]]]] &] pnew = p[[{1, 5, 3, 4}]]; dreiecke2 = dreiecke1 /. {2 -> tmp, 5 -> 2} /. tmp -> 5; mesh2 = ToElementMesh["Coordinates" -> pnew, "MeshElements" -> {TriangleElement[dreiecke2]}] Show[mesh2["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh["Coordinates"], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh["Coordinates"], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

addendum

If you want the renumber the points so that all points in the reduced mesh appear before points that are not in the reduced mesh, you must renumber the points as well as the triangles. Here is your example:

dreiecke = mesh["MeshElements"][[1]][[1]] dreiecke1 = Select[dreiecke, Apply[And, RegionMember[ImplicitRegion[r >= z, {z, r}], p[[#]]]] &] pnew = p[[{1, 5, 3, 4}]]; dreiecke2 = dreiecke1 /. {2 -> tmp, 5 -> 2} /. tmp -> 5; mesh2 = ToElementMesh["Coordinates" -> pnew, "MeshElements" -> {TriangleElement[dreiecke2]}] Show[mesh2["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 
added 2 characters in body
Source Link
Daniel Huber
  • 60.8k
  • 2
  • 25
  • 71

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh[Coordinates]ToElementMesh@Select[mesh["Coordinates"], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh[Coordinates], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh["Coordinates"], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

added 4 characters in body
Source Link
xzczd
  • 71.6k
  • 10
  • 183
  • 524

Note you must first load "<< NDSolveFEM<< NDSolve`FEM`". Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh[Coordinates], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Note you must first load "<< NDSolveFEM". Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh[Coordinates], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Note you must first load << NDSolve`FEM`. Otherwise your example does not evaluate.

You may simple select the coordinates that fulfill the required condition and then create a new Mesh:

mesh1 = ToElementMesh@Select[mesh[Coordinates], #[[2]] >= #[[1]] &] Show[mesh1["Wireframe"], Axes -> True, AxesLabel -> {x, y}] 

enter image description here

Source Link
Daniel Huber
  • 60.8k
  • 2
  • 25
  • 71
Loading