From: michael Date: Wed, 24 Nov 2021 15:18:30 +0000 (+0100) Subject: Added function checkFastEquiv to compare meshes before setting input fields X-Git-Tag: V9_8_0~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9163d561fc1bc95315a9585ee5905957b167c15;p=tools%2Fsolverlab.git Added function checkFastEquiv to compare meshes before setting input fields --- diff --git a/CDMATH/mesh/inc/Mesh.hxx b/CDMATH/mesh/inc/Mesh.hxx index b5a69d8..a7ea9c9 100644 --- a/CDMATH/mesh/inc/Mesh.hxx +++ b/CDMATH/mesh/inc/Mesh.hxx @@ -344,6 +344,15 @@ public: //---------------------------------------------------------------- bool isQuadrangular() const ; bool isHexahedral() const ; bool isStructured() const ; + + // epsilon used in mesh comparisons + double getComparisonEpsilon() const {return _epsilon;}; + void setComparisonEpsilon(double epsilon){ _epsilon=epsilon;}; + // Quick comparison of two meshes to see if they are identical with high probability (three cells are compared) + void checkFastEquivalWith( Mesh m) const { return getMEDCouplingMesh()->checkFastEquivalWith(m.getMEDCouplingMesh(),1e-6);}; + // Deep comparison of two meshes to see if they are identical Except for their names and units + bool isEqualWithoutConsideringStr( Mesh m) const { return getMEDCouplingMesh()->isEqualWithoutConsideringStr(m.getMEDCouplingMesh(),1e-6);}; + std::vector< std::string > getElementTypesNames() const ; /** * \brief Compute the minimum value over all cells of the ratio cell perimeter/cell vaolume @@ -468,6 +477,8 @@ private: //---------------------------------------------------------------- std::vector< int > _boundaryNodeIds; /* Boundary mesh */ const MEDCoupling::MEDCouplingUMesh * _boundaryMesh; + + double _epsilon; }; #endif /* MESH_HXX_ */