int oldNbOfNodes=getNumberOfNodes();
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da=m->buildPermArrayForMergeNode(prec,oldNbOfNodes,areNodesMerged,newNbOfNodes);
//mergeNodes
- if(!areNodesMerged)
+ if(!areNodesMerged && oldNbOfNodes != 0)
throw INTERP_KERNEL::Exception("checkDeepEquivalWith : Nodes are incompatible ! ");
const int *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<int>(),oldNbOfNodes-1));
if(pt!=da->getConstPointer()+da->getNbOfElems())
self.assertRaises(InterpKernelException, m.checkDeepEquivalWith, m2, 2, eps)
pass
+ def testSwig2CheckDeepEquivalWith2(self):
+ eps = 1.0e-8
+ m = MEDCouplingUMesh("tst", 2)
+ m.setCoords(DataArrayDouble([], 0,2))
+ m.setConnectivity(DataArrayInt([]), DataArrayInt([0]))
+ m2 = m.deepCpy()
+ m.checkDeepEquivalWith(m2, 0, eps) # Should not raise!
+ pass
+
def testCopyTinyStringsFromOnFields(self):
m=MEDCouplingDataForTest.build3DSurfTargetMesh_1();
nbOfCells=m.getNumberOfCells();