]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
MEDCouplingFieldDouble.__getitem__ on components
authorageay <ageay>
Wed, 10 Apr 2013 11:08:58 +0000 (11:08 +0000)
committerageay <ageay>
Wed, 10 Apr 2013 11:08:58 +0000 (11:08 +0000)
src/MEDCoupling_Swig/MEDCouplingCommon.i

index a8c98fc41301dc4ab37bb284f301afb2fcc2e7b5..2cf90fc0507ef61fefbaa413b2b34ee618036844 100644 (file)
@@ -3327,7 +3327,7 @@ namespace ParaMEDMEM
                 }
               case 3:
                 {
-                  int nbOfComp=(slic.second.first-1-slic.first)/slic.second.second+1;
+                  int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(slic.first,slic.second.first,slic.second.second,"MEDCouplingFieldDouble::__getitem__ : invalid range in 2nd parameter (components) !");
                   std::vector<int> v2(nbOfComp);
                   for(int i=0;i<nbOfComp;i++)
                     v2[i]=slic.first+i*slic.second.second;