diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index eb5ec14d8f..d634603649 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -463,7 +463,7 @@ const Foam::indexedOctree& Foam::meshSearch::boundaryTree() treeBoundBox overallBb(mesh_.points()); Random rndGen(123456); - overallBb.extend(rndGen, 1E-4); + overallBb = overallBb.extend(rndGen, 1E-4); overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); @@ -497,7 +497,7 @@ const Foam::indexedOctree& Foam::meshSearch::cellTree() treeBoundBox overallBb(mesh_.points()); Random rndGen(123456); - overallBb.extend(rndGen, 1E-4); + overallBb = overallBb.extend(rndGen, 1E-4); overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); @@ -531,7 +531,7 @@ const Foam::indexedOctree& treeBoundBox overallBb(mesh_.cellCentres()); Random rndGen(123456); - overallBb.extend(rndGen, 1E-4); + overallBb = overallBb.extend(rndGen, 1E-4); overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);