diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h index af3b26063913c7740fa4d2a0d4fb2400dda153ba..01a5b29eb206ddd3e66c326df9b0b54c297c0282 100644 --- a/MeshLib/Elements/Element.h +++ b/MeshLib/Elements/Element.h @@ -145,9 +145,8 @@ public: /** * Tests if the element is geometrically valid. - * @param check_zero_volume indicates if length/area/volume == 0 should be checked */ - virtual ElementErrorCode isValid() const = 0; + virtual ElementErrorCode validate() const = 0; /** * Set the index value for external information. diff --git a/MeshLib/Elements/TemplateHex.h b/MeshLib/Elements/TemplateHex.h index 1f2704ad2b03d81c3c8fdf606161432d5c44a83f..024facbcf839fd45c86f6ec9c7724ca6f0c22e75 100644 --- a/MeshLib/Elements/TemplateHex.h +++ b/MeshLib/Elements/TemplateHex.h @@ -102,7 +102,7 @@ public: * Tests if the element is geometrically valid. * @param check_zero_volume indicates if volume == 0 should be checked */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the Hex instance. diff --git a/MeshLib/Elements/TemplateHex.tpp b/MeshLib/Elements/TemplateHex.tpp index 95b5dca6df08127df9fbb8ad28e14012d039bb01..d347cf85d23ea22a7f3195680bd0614e15ae6e73 100644 --- a/MeshLib/Elements/TemplateHex.tpp +++ b/MeshLib/Elements/TemplateHex.tpp @@ -156,7 +156,7 @@ unsigned TemplateHex<NNODES,CELLHEXTYPE>::identifyFace(Node* nodes[3]) const } template <unsigned NNODES, CellType CELLHEXTYPE> -ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::isValid() const +ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); @@ -167,7 +167,7 @@ ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::isValid() const break; const MeshLib::Element* quad (this->getFace(i)); - error_code |= quad->isValid(); + error_code |= quad->validate(); delete quad; } return error_code; diff --git a/MeshLib/Elements/TemplateLine.h b/MeshLib/Elements/TemplateLine.h index c21d1c860a785910a8f807cb9953f24a411cdcad..e59223989dd819b1c576132a2b44a3cf5e65daad 100644 --- a/MeshLib/Elements/TemplateLine.h +++ b/MeshLib/Elements/TemplateLine.h @@ -77,7 +77,7 @@ public: * @param check_zero_volume indicates if area == 0 should be checked * @return error code (0 = okay, 1 = zero volume) */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the TemplateLine instance. diff --git a/MeshLib/Elements/TemplateLine.tpp b/MeshLib/Elements/TemplateLine.tpp index ddcdeda22cb18de17ec58949de1793804462a2e5..328facc17d7a3ab92381eada463dd18e38f2b401 100644 --- a/MeshLib/Elements/TemplateLine.tpp +++ b/MeshLib/Elements/TemplateLine.tpp @@ -48,7 +48,7 @@ TemplateLine<NNODES,CELLLINETYPE>::~TemplateLine() {} template <unsigned NNODES, CellType CELLLINETYPE> -ElementErrorCode TemplateLine<NNODES,CELLLINETYPE>::isValid() const +ElementErrorCode TemplateLine<NNODES,CELLLINETYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); diff --git a/MeshLib/Elements/TemplatePrism.h b/MeshLib/Elements/TemplatePrism.h index f93fa301a0c8c728999f0e9dce9ada0143be6fe1..a9dbba8547f9dceff2e86455267204dd0bd8e0e4 100644 --- a/MeshLib/Elements/TemplatePrism.h +++ b/MeshLib/Elements/TemplatePrism.h @@ -100,7 +100,7 @@ public: * Tests if the element is geometrically valid. * @param check_zero_volume indicates if volume == 0 should be checked */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the diff --git a/MeshLib/Elements/TemplatePrism.tpp b/MeshLib/Elements/TemplatePrism.tpp index 27374038739c02d5d7ef89bff270dd25fcc65e4f..cd9a7671fc256dc23485732bbcec84b57b3fca6d 100644 --- a/MeshLib/Elements/TemplatePrism.tpp +++ b/MeshLib/Elements/TemplatePrism.tpp @@ -165,7 +165,7 @@ unsigned TemplatePrism<NNODES,CELLPRISMTYPE>::identifyFace(Node* nodes[3]) const } template <unsigned NNODES, CellType CELLPRISMTYPE> -ElementErrorCode TemplatePrism<NNODES,CELLPRISMTYPE>::isValid() const +ElementErrorCode TemplatePrism<NNODES,CELLPRISMTYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); @@ -174,7 +174,7 @@ ElementErrorCode TemplatePrism<NNODES,CELLPRISMTYPE>::isValid() const { const MeshLib::Quad* quad (dynamic_cast<const MeshLib::Quad*>(this->getFace(i))); if (quad) - error_code |= quad->isValid(); + error_code |= quad->validate(); else error_code.set(ElementErrorFlag::NodeOrder); delete quad; diff --git a/MeshLib/Elements/TemplatePyramid.h b/MeshLib/Elements/TemplatePyramid.h index bc4db2f0bbe035a7fd42fe6d9c4cd2e861991b75..bfdceef8a2820de972f374cdfa5a8f0cb54c594b 100644 --- a/MeshLib/Elements/TemplatePyramid.h +++ b/MeshLib/Elements/TemplatePyramid.h @@ -98,7 +98,7 @@ public: * Tests if the element is geometrically valid. * @param check_zero_volume indicates if volume == 0 should be checked */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the diff --git a/MeshLib/Elements/TemplatePyramid.tpp b/MeshLib/Elements/TemplatePyramid.tpp index d455b7cd83b706768a1141f10c641c78b363330d..f752c750c833b02871a368a257f069306c2068b4 100644 --- a/MeshLib/Elements/TemplatePyramid.tpp +++ b/MeshLib/Elements/TemplatePyramid.tpp @@ -167,14 +167,14 @@ unsigned TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::identifyFace(Node* nodes[3]) c } template <unsigned NNODES, CellType CELLPYRAMIDTYPE> -ElementErrorCode TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::isValid() const +ElementErrorCode TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); const MeshLib::Quad* base (dynamic_cast<const MeshLib::Quad*>(this->getFace(4))); if (base) - error_code |= base->isValid(); + error_code |= base->validate(); else error_code.set(ElementErrorFlag::NodeOrder); delete base; diff --git a/MeshLib/Elements/TemplateQuad.h b/MeshLib/Elements/TemplateQuad.h index 9ae3f9120dda031fa8f65d416dc38d71e9c40afc..119111c8bc48f6e2758a8874778ec90829157c28 100644 --- a/MeshLib/Elements/TemplateQuad.h +++ b/MeshLib/Elements/TemplateQuad.h @@ -101,7 +101,7 @@ public: * Tests if the element is geometrically valid. * @param check_zero_volume indicates if area == 0 should be checked */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the TemplateQuad instance. diff --git a/MeshLib/Elements/TemplateQuad.tpp b/MeshLib/Elements/TemplateQuad.tpp index 3fbf40344ae51ea640433f4e50fa4c89ad6b3968..029e5bd57181ab0c606753f63a9025f35fa7cd86 100644 --- a/MeshLib/Elements/TemplateQuad.tpp +++ b/MeshLib/Elements/TemplateQuad.tpp @@ -120,7 +120,7 @@ unsigned TemplateQuad<NNODES,CELLQUADTYPE>::identifyFace(Node* nodes[3]) const } template <unsigned NNODES, CellType CELLQUADTYPE> -ElementErrorCode TemplateQuad<NNODES,CELLQUADTYPE>::isValid() const +ElementErrorCode TemplateQuad<NNODES,CELLQUADTYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); diff --git a/MeshLib/Elements/TemplateTet.h b/MeshLib/Elements/TemplateTet.h index f5030d0dd8b2020a5cea7ff55cafbfaef66b95ce..c2255b64881f53c52702cf210e6d754d80d7729f 100644 --- a/MeshLib/Elements/TemplateTet.h +++ b/MeshLib/Elements/TemplateTet.h @@ -97,7 +97,7 @@ public: * Tests if the element is geometrically valid. * @param check_zero_volume indicates if volume == 0 should be checked */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** * Method clone is inherited from class Element. It makes a deep copy of the TemplateTet instance. diff --git a/MeshLib/Elements/TemplateTet.tpp b/MeshLib/Elements/TemplateTet.tpp index ca7947a8bfea4c1c08f2d72ecb36c0f52663027a..0da3790c04fa56bc78c287a02af046ec1a1326e6 100644 --- a/MeshLib/Elements/TemplateTet.tpp +++ b/MeshLib/Elements/TemplateTet.tpp @@ -145,8 +145,8 @@ unsigned TemplateTet<NNODES,CELLTETTYPE>::identifyFace(Node* nodes[3]) const } template <unsigned NNODES, CellType CELLTETTYPE> -ElementErrorCode TemplateTet<NNODES,CELLTETTYPE>::isValid() const -{ +ElementErrorCode TemplateTet<NNODES,CELLTETTYPE>::validate() const +{ ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); return error_code; diff --git a/MeshLib/Elements/TemplateTri.h b/MeshLib/Elements/TemplateTri.h index 9cd9fc4c60b458d03293edef84750354eaf8cca7..78e47d451763c4105f0dc2361dbbd7004e9187d1 100644 --- a/MeshLib/Elements/TemplateTri.h +++ b/MeshLib/Elements/TemplateTri.h @@ -99,7 +99,7 @@ public: * @param check_zero_volume indicates if area == 0 should be checked * @return error code (0 = okay, 1 = zero volume) */ - virtual ElementErrorCode isValid() const; + virtual ElementErrorCode validate() const; /** diff --git a/MeshLib/Elements/TemplateTri.tpp b/MeshLib/Elements/TemplateTri.tpp index ad0cd8c94cb71e78b71af5642d513072d0083d7a..a32500f043b4dc643e659a5493be6e9baf92ae88 100644 --- a/MeshLib/Elements/TemplateTri.tpp +++ b/MeshLib/Elements/TemplateTri.tpp @@ -81,7 +81,7 @@ bool TemplateTri<NNODES,CELLTRITYPE>::isPntInside(GeoLib::Point const& pnt, doub } template <unsigned NNODES, CellType CELLTRITYPE> -ElementErrorCode TemplateTri<NNODES,CELLTRITYPE>::isValid() const +ElementErrorCode TemplateTri<NNODES,CELLTRITYPE>::validate() const { ElementErrorCode error_code; error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); diff --git a/MeshLib/MeshQuality/MeshValidation.cpp b/MeshLib/MeshQuality/MeshValidation.cpp index e6a97012600ed62e577a5dc86a8c734d14c6a6df..7a966e4d36e7efd448923115a47de98845acadbb 100644 --- a/MeshLib/MeshQuality/MeshValidation.cpp +++ b/MeshLib/MeshQuality/MeshValidation.cpp @@ -80,7 +80,7 @@ std::vector<std::size_t> MeshValidation::removeUnusedMeshNodes(MeshLib::Mesh &me for (std::size_t i=0; i<nElements; ++i) { - const ElementErrorCode e = elements[i]->isValid(); + const ElementErrorCode e = elements[i]->validate(); error_code_vector.push_back(e); if (e.none()) continue;