]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Debug
authorageay <ageay>
Tue, 21 Jul 2009 16:10:32 +0000 (16:10 +0000)
committerageay <ageay>
Tue, 21 Jul 2009 16:10:32 +0000 (16:10 +0000)
src/ParaMEDMEM/BlockTopology.cxx

index 83a2b7040f209709844af978c6f6b8f8fec2b018..90d0cb012dbc6a0f1067a35619ea24e7257e3d51 100644 (file)
@@ -86,13 +86,13 @@ namespace ParaMEDMEM
       {
         int axis_size=_local_array_indices[idim].size()-1;
         int axis_nb_elem=_local_array_indices[idim][axis_size];
-        increment=increment/axis_nb_elem;
+        increment=axis_nb_elem==0?0:increment/axis_nb_elem;
         proc_increment = proc_increment/(axis_size);
         int proc_axis=subdomain_id/proc_increment;
         subdomain_id=subdomain_id%proc_increment;
         int local_axis_nb_elem=_local_array_indices[idim][proc_axis+1]-_local_array_indices[idim][proc_axis];
         local_increment = (local_axis_nb_elem==0)?0:(local_increment/local_axis_nb_elem);
-        int iaxis=loc/local_increment+_local_array_indices[idim][proc_axis];
+        int iaxis=((local_increment==0)?0:(loc/local_increment))+_local_array_indices[idim][proc_axis];
         global+=increment*iaxis;
         loc = (local_increment==0)?0:(loc%local_increment);
       }