diff --git a/MeshLib/Elements/Cell.cpp b/MeshLib/Elements/Cell.cpp index b1f86db40f527375c421cc181956f328d3c1c894..02f4d763249e4f44f9e56d5c667f9241a005f2c9 100644 --- a/MeshLib/Elements/Cell.cpp +++ b/MeshLib/Elements/Cell.cpp @@ -35,6 +35,10 @@ bool Cell::testElementNodeOrder() const for (unsigned j=0; j<nFaces; ++j) { MeshLib::Face const*const face (dynamic_cast<const MeshLib::Face*>(this->getFace(j))); + // Node 1 is checked below because that way all nodes are used for the test + // at some point, while for node 0 at least one node in every element + // type would be used for checking twice and one wouldn't be checked at + // all. (based on the definition of the _face_nodes variable) const MeshLib::Node x (*(face->getNode(1))); const MathLib::Vector3 cx (c, x); const double s = MathLib::scalarProduct(face->getSurfaceNormal(), cx); diff --git a/MeshLib/Elements/CellRule.cpp b/MeshLib/Elements/CellRule.cpp index 9fa8ea6ba90676d5500219bcf65680618b7f8c67..b90792e371482b9f5032a4adc307b7fdc7a561a4 100644 --- a/MeshLib/Elements/CellRule.cpp +++ b/MeshLib/Elements/CellRule.cpp @@ -28,6 +28,10 @@ bool CellRule::testElementNodeOrder(const Element* e) for (unsigned j=0; j<nFaces; ++j) { MeshLib::Face const*const face (dynamic_cast<const MeshLib::Face*>(e->getFace(j))); + // Node 1 is checked below because that way all nodes are used for the test + // at some point, while for node 0 at least one node in every element + // type would be used for checking twice and one wouldn't be checked at + // all. (based on the definition of the _face_nodes variable) const MeshLib::Node x (*(face->getNode(1))); const MathLib::Vector3 cx (c, x); const double s = MathLib::scalarProduct(face->getSurfaceNormal(), cx); diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h index 6f8c856e03916a6ca6af7b28821e9daac90111b1..2303b9d81c08beb1064f5672b1106039403470e7 100644 --- a/MeshLib/Elements/Element.h +++ b/MeshLib/Elements/Element.h @@ -225,6 +225,7 @@ protected: Node** _nodes; std::size_t _id; + /// Content corresponds to length for 1D, area for 2D, and volume for 3D elements double _content; /** * this is an index for external additional information like materials diff --git a/MeshLib/Elements/HexRule8.h b/MeshLib/Elements/HexRule8.h index 80169dc8953aa2d9c1eabd0b90aca18a82994bdb..afa16dc8a7a873fdf8c49a094f3f090372f49b23 100644 --- a/MeshLib/Elements/HexRule8.h +++ b/MeshLib/Elements/HexRule8.h @@ -84,7 +84,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3D object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/LineRule2.h b/MeshLib/Elements/LineRule2.h index 6dc8ec0241c2e4282575142d9ce4ae68085ec5ed..a24b78f836c6886eeed8f516679d37b0f4c3ab7a 100644 --- a/MeshLib/Elements/LineRule2.h +++ b/MeshLib/Elements/LineRule2.h @@ -64,7 +64,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/PrismRule6.h b/MeshLib/Elements/PrismRule6.h index f533939681ffdadafca6b923b3fdd808148e26ab..7ba50dc0bf1bfef4cd0f9cc4c6f9fe00943a1fb3 100644 --- a/MeshLib/Elements/PrismRule6.h +++ b/MeshLib/Elements/PrismRule6.h @@ -85,7 +85,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/PyramidRule5.h b/MeshLib/Elements/PyramidRule5.h index 069bdec6105af17cc53f7dd15167a92016017a43..3ad691fa79fd86304854ab8239e5f563e6709f2c 100644 --- a/MeshLib/Elements/PyramidRule5.h +++ b/MeshLib/Elements/PyramidRule5.h @@ -84,7 +84,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/QuadRule4.h b/MeshLib/Elements/QuadRule4.h index 5738688099499479cc094bd95ff8bfff6b2d375a..5bc9b16c977b08e954572efe3143377d59c72051 100644 --- a/MeshLib/Elements/QuadRule4.h +++ b/MeshLib/Elements/QuadRule4.h @@ -66,7 +66,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/TemplateElement.h b/MeshLib/Elements/TemplateElement.h index ed16bf2ab986066fcef4c82676965f31ca08cdbc..9826bdbd8f9e0c4e1e5f023e1a6aaf2ce90a7a2d 100644 --- a/MeshLib/Elements/TemplateElement.h +++ b/MeshLib/Elements/TemplateElement.h @@ -109,7 +109,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/TetRule4.h b/MeshLib/Elements/TetRule4.h index 4e94b3a09da2bc4b04d77fb2df11c0763a2738d3..eeb3b56c5c4a57deb19b8b65f00de65d6b8bf010 100644 --- a/MeshLib/Elements/TetRule4.h +++ b/MeshLib/Elements/TetRule4.h @@ -79,7 +79,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */ diff --git a/MeshLib/Elements/TriRule3.h b/MeshLib/Elements/TriRule3.h index 1352c6d0aaf86626210912483435a60bdf68bbb3..23aa1c0aab08a098fce48a82ad404144e30ac851 100644 --- a/MeshLib/Elements/TriRule3.h +++ b/MeshLib/Elements/TriRule3.h @@ -67,7 +67,7 @@ public: /** * Checks if a point is inside the element. - * @param pnt a 3D GeoLib::Point object + * @param pnt a 3D MathLib::Point3d object * @param eps tolerance for numerical algorithm used or computing the property * @return true if the point is not outside the element, false otherwise */