From: ageay Date: Tue, 21 Jul 2009 16:10:32 +0000 (+0000) Subject: Debug X-Git-Tag: V5_1_main_FINAL~373 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84fb6384de2845444dff28fb941dd077e6618ad8;p=tools%2Fmedcoupling.git Debug --- diff --git a/src/ParaMEDMEM/BlockTopology.cxx b/src/ParaMEDMEM/BlockTopology.cxx index 83a2b7040..90d0cb012 100644 --- a/src/ParaMEDMEM/BlockTopology.cxx +++ b/src/ParaMEDMEM/BlockTopology.cxx @@ -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); }