BUG: searchableSurface: double increment; distribute functionality

This commit is contained in:
mattijs
2013-08-14 09:22:36 +01:00
parent 9628cc2ff4
commit b0bdd05626
2 changed files with 13 additions and 12 deletions

View File

@ -376,7 +376,7 @@ void Foam::searchableSurfaceCollection::boundingSpheres
forAll(subCentres, i) forAll(subCentres, i)
{ {
centres[coordI++] = transform_[surfI].globalPosition centres[coordI] = transform_[surfI].globalPosition
( (
cmptMultiply cmptMultiply
( (
@ -384,7 +384,8 @@ void Foam::searchableSurfaceCollection::boundingSpheres
scale_[surfI] scale_[surfI]
) )
); );
radiusSqr[coordI++] = maxScale*subRadiusSqr[i]; radiusSqr[coordI] = maxScale*subRadiusSqr[i];
coordI++;
} }
} }
} }

View File

@ -261,16 +261,16 @@ public:
// bounding boxes. The bounds are hints to the surface as for // bounding boxes. The bounds are hints to the surface as for
// the range of queries it can expect. faceMap/pointMap can be // the range of queries it can expect. faceMap/pointMap can be
// set if the surface has done any redistribution. // set if the surface has done any redistribution.
virtual void distribute //virtual void distribute
( //(
const List<treeBoundBox>& bbs, // const List<treeBoundBox>& bbs,
const bool keepNonLocal, // const bool keepNonLocal,
autoPtr<mapDistribute>& faceMap, // autoPtr<mapDistribute>& faceMap,
autoPtr<mapDistribute>& pointMap // autoPtr<mapDistribute>& pointMap
) //)
{ //{
subGeom_[0].distribute(bbs, keepNonLocal, faceMap, pointMap); // subGeom_[0].distribute(bbs, keepNonLocal, faceMap, pointMap);
} //}
//- WIP. Store element-wise field. //- WIP. Store element-wise field.
virtual void setField(const labelList& values) virtual void setField(const labelList& values)