MeshCoordinates function yields more nodal coordinates than expected. Can I extract the coordinates of vertices only. Here is an example of a square region with a course mesh to explain the problem. I would like the code get me the following coordinates:{{0., 0.}, {0., 0.5}, {0., 1.}, {0.5, 0.}, {0.5, 0.5}, {0.5, 1.}, {1.,0.}, {1., 0.5}, {1., 1.}}.
Needs["NDSolve`FEM`"]
d = Rectangle[{0, 0}, {1, 1}];
mesh = ToElementMesh[d2, MaxCellMeasure -> 0.5];
mesh["Wireframe"]
MeshCoordinates[mesh2][[1, 1]]
d2,mesh2
should bed,mesh
in your code I think.mesh = ToElementMesh[d, MaxCellMeasure -> 1 ];
give the coordinates you wish to get. $\endgroup$