From 84fb6384de2845444dff28fb941dd077e6618ad8 Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 21 Jul 2009 16:10:32 +0000 Subject: [PATCH] Debug --- src/ParaMEDMEM/BlockTopology.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.2