Details
Examples
Basic Examples
See Also
Related Links
NDSolve`FEM`
ElementMesh::femimq
Examples
Basic Examples (2)
This message is generated when mesh elements are specified that self-intersect, have a wrong ordering, or have no area:
Needs["NDSolve`FEM`"]ToElementMesh["Coordinates" -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}, "MeshElements" -> {QuadElement[{{3, 2, 1, 4}}]}]To fix this, the correct element ordering needs to be specified:
ToElementMesh["Coordinates" -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}, "MeshElements" -> {QuadElement[{{1, 2, 3, 4}}]}]This message may also be generated during interpolation:
data = {{2.62713, 145.509, 1.}, {2.62713, 155.609, 2.}, {4.50713, 154.346, 2.}, {6.38713, 153.084, 2.}};Interpolation[data, InterpolationOrder -> 1];The issue is that because of numerical inexactness, a triangle with 0 area has been generated during mesh creation:
m = ToElementMesh[data[[All, 1 ;; 2]]]Note that three triangles have been generated and one has poor quality:
m["Quality"]m["Wireframe"]Find and visualize elements below a quality threshold:
pos = Position[m["Quality"], _ ? (# <= 0.1&)];
Show[
m["Wireframe"],
m["Wireframe"[pos, "MeshElement" -> "MeshElements", "ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]]Slightly perturbing the input data improves this:
data2 = data;
data2[[All, 1 ;; 2]] += RandomReal[10 ^ -12 * {-1, 1}, Dimensions[data2[[All, 1 ;; 2]]]];if = Interpolation[data2, InterpolationOrder -> 1];if["ElementMesh"]["Quality"]