From 9d488ce45f5e4a9e91f12eab6f6ac0b16334fd72 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 12 May 2010 10:16:26 +0000 Subject: [PATCH] 0020873: [CEA] Failure with ParaMedMem * Correct work of an empty directed box --- src/ParaMEDMEM/ElementLocator.cxx | 3 +++ 1 file changed, 3 insertions(+) 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 } -- 2.39.2