]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Target MEDReader
authorageay <ageay>
Wed, 24 Jul 2013 12:31:22 +0000 (12:31 +0000)
committerageay <ageay>
Wed, 24 Jul 2013 12:31:22 +0000 (12:31 +0000)
src/MEDCoupling/MEDCouplingStructuredMesh.cxx

index 7dbde2cb1c79d644664bd8c7de9e97804e0114e1..2da06d22b16b493cbc6260de6d1cf5eeaec0686c 100644 (file)
@@ -522,6 +522,7 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
       return true;
     }
   GetPosFromId(startIds[sz-1],dim,&tmp2[0],&tmp3[0]);
+  int szExp(1);
   for(int i=0;i<dim;i++)
     {
       if(tmp3[i]<0 || tmp3[i]>=st[i])
@@ -530,7 +531,10 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
       tmp4[i]=partCompactFormat[i].second-partCompactFormat[i].first;
       if(tmp4[i]<=0)
         return false;
+      szExp*=tmp4[i];
     }
+  if(szExp!=(int)sz)
+    return false;
   const int *w(startIds);
   switch(dim)
     {