From: eap Date: Wed, 12 May 2010 10:16:26 +0000 (+0000) Subject: 0020873: [CEA] Failure with ParaMedMem X-Git-Tag: V5_1_main_FINAL~116 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9d488ce45f5e4a9e91f12eab6f6ac0b16334fd72;p=tools%2Fmedcoupling.git 0020873: [CEA] Failure with ParaMedMem * Correct work of an empty directed box --- diff --git a/src/ParaMEDMEM/ElementLocator.cxx b/src/ParaMEDMEM/ElementLocator.cxx index 1ae99850c..ac4ac94f7 100644 --- a/src/ParaMEDMEM/ElementLocator.cxx +++ b/src/ParaMEDMEM/ElementLocator.cxx @@ -157,6 +157,7 @@ namespace ParaMEDMEM _local_cell_mesh->getNumberOfNodes(), _local_cell_mesh_space_dim); std::vector dbbData = dbb.getData(); + if ( dbbData.size() < bbSize ) dbbData.resize(bbSize,0); double * minmax= &dbbData[0]; #else int bbSize = 2*_local_cell_mesh_space_dim; @@ -185,7 +186,9 @@ namespace ParaMEDMEM _distant_proc_ids.push_back(rank); } } +#ifndef USE_DIRECTED_BB delete [] minmax; +#endif }