]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Performance regression on SALOME_TESTS/Grids/smesh/bugs_16/S9
authoreap <eap@opencascade.com>
Tue, 1 Apr 2014 16:48:00 +0000 (20:48 +0400)
committereap <eap@opencascade.com>
Tue, 1 Apr 2014 16:48:00 +0000 (20:48 +0400)
src/SMESHUtils/SMESH_MeshAlgos.cxx

index 23a285f616ad0f9c9e5c6ce0ccba545f47b776a0..957828474e306b0d3bb07286179f454aaf297c1c 100644 (file)
@@ -759,10 +759,10 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
     {
       gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox()->CornerMin() +
                                  _ebbTree->getBox()->CornerMax() );
-      double radius;
+      double radius = -1;
       if ( _ebbTree->getBox()->IsOut( point.XYZ() ))
         radius = point.Distance( boxCenter ) - 0.5 * _ebbTree->maxSize();
-      else
+      if ( radius < 0 )
         radius = _ebbTree->maxSize() / pow( 2., _ebbTree->getHeight()) / 2;
       while ( suspectElems.empty() )
       {