]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Added function checkFastEquiv to compare meshes before setting input fields
authormichael <michael@localhost.localdomain>
Wed, 24 Nov 2021 15:18:30 +0000 (16:18 +0100)
committermichael <michael@localhost.localdomain>
Wed, 24 Nov 2021 15:18:30 +0000 (16:18 +0100)
CDMATH/mesh/inc/Mesh.hxx

index b5a69d8b074a6b7e5037d0d650dca067179b3388..a7ea9c9471064f8e2f6b608e1e6ac25bd98daa37 100644 (file)
@@ -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_ */