ENH: Renaming "corners" in boundBox to "points". Overridden in treeBoundBox.

Keeping both functions to ensure that the octant ordering specified in
treeBoundBox is obeyed at the octree level, irrespective of the implementation
of the basic boundBox.
This commit is contained in:
graham
2010-12-10 20:34:31 +00:00
parent e49ce4a622
commit 2d7f45738a
7 changed files with 17 additions and 13 deletions

View File

@ -212,7 +212,7 @@ int main(int argc, char *argv[])
// write bounding box corners // write bounding box corners
if (args.optionFound("blockMesh")) if (args.optionFound("blockMesh"))
{ {
pointField cornerPts = boundBox(surf.points()).corners(); pointField cornerPts = boundBox(surf.points()).points();
Info<<"// blockMeshDict info" << nl; Info<<"// blockMeshDict info" << nl;

View File

@ -111,7 +111,7 @@ Foam::boundBox::boundBox(Istream& is)
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::pointField> Foam::boundBox::corners() const Foam::tmp<Foam::pointField> Foam::boundBox::points() const
{ {
tmp<pointField> tPts = tmp<pointField>(new pointField(8)); tmp<pointField> tPts = tmp<pointField>(new pointField(8));
pointField& pt = tPts(); pointField& pt = tPts();

View File

@ -177,7 +177,7 @@ public:
} }
//- Return corner points in an order corresponding to a 'hex' cell //- Return corner points in an order corresponding to a 'hex' cell
tmp<pointField> corners() const; tmp<pointField> points() const;
// Query // Query

View File

@ -179,7 +179,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
treeBoundBox tempTransformedBb treeBoundBox tempTransformedBb
( (
transform.invTransform(cellBbsToExchange[bbI].corners()) transform.invTransform(cellBbsToExchange[bbI].points())
); );
treeBoundBox extendedBb treeBoundBox extendedBb
@ -396,7 +396,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
treeBoundBox tempTransformedBb treeBoundBox tempTransformedBb
( (
transform.invTransform(wallFaceBbsToExchange[bbI].corners()) transform.invTransform(wallFaceBbsToExchange[bbI].points())
); );
treeBoundBox extendedBb treeBoundBox extendedBb
@ -701,7 +701,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
( (
transform.transform transform.transform
( (
allExtendedProcBbs[procI].corners() allExtendedProcBbs[procI].points()
) )
); );
@ -748,7 +748,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
( (
transform.transform transform.transform
( (
allExtendedProcBbs[procI].corners() allExtendedProcBbs[procI].points()
) )
); );
@ -791,7 +791,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
( (
transform.transform transform.transform
( (
allExtendedProcBbs[procI].corners() allExtendedProcBbs[procI].points()
) )
); );

View File

@ -486,7 +486,7 @@ void Foam::conformalVoronoiMesh::createFeaturePoints()
{ {
Info<< nl << "Creating bounding points" << endl; Info<< nl << "Creating bounding points" << endl;
pointField farPts = geometryToConformTo_.bounds().corners(); pointField farPts = geometryToConformTo_.bounds().points();
// Shift corners of bounds relative to origin // Shift corners of bounds relative to origin
farPts -= geometryToConformTo_.bounds().midpoint(); farPts -= geometryToConformTo_.bounds().midpoint();

View File

@ -192,15 +192,19 @@ Foam::treeBoundBox::treeBoundBox(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::pointField Foam::treeBoundBox::points() const Foam::tmp<Foam::pointField> Foam::treeBoundBox::points() const
{ {
pointField points(8); tmp<pointField> tPts = tmp<pointField>(new pointField(8));
pointField& points = tPts();
forAll(points, octant) forAll(points, octant)
{ {
points[octant] = corner(octant); points[octant] = corner(octant);
} }
return points;
return tPts;
} }

View File

@ -191,7 +191,7 @@ public:
inline scalar typDim() const; inline scalar typDim() const;
//- vertex coordinates. In octant coding. //- vertex coordinates. In octant coding.
pointField points() const; tmp<pointField> points() const;
// Check // Check