Performance regression on SALOME_TESTS/Grids/smesh/bugs_16/S9

This commit is contained in:
eap 2014-04-01 20:48:00 +04:00
parent 712a8ce960
commit 32db05b07f

View File

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