boundBox, octree cleanup

- added boundBox(const tmp<pointField>&) constructor for use with
    coordinate systems
  - moved some methods from treeBoundBox to boundBox and use VectorSpace ops
This commit is contained in:
Mark Olesen
2009-01-01 17:03:19 +01:00
parent 28b200bcd9
commit 973b9ea0ce
38 changed files with 813 additions and 976 deletions

View File

@ -224,8 +224,8 @@ void Foam::displacementSBRStressFvMotionSolver::updateMesh
);
// Note: boundBox does reduce
const vector span0 = boundBox(points0_, true).span();
const vector span = boundBox(points, true).span();
const vector span0 = boundBox(points0_).span();
const vector span = boundBox(points).span();
vector scaleFactors(cmptDivide(span0, span));
@ -246,13 +246,11 @@ void Foam::displacementSBRStressFvMotionSolver::updateMesh
else
{
// New point. Assume motion is scaling.
newPoints0[pointI] =
points0_[oldPointI]
+ cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
newPoints0[pointI] = points0_[oldPointI] + cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
}
}
else

View File

@ -433,8 +433,8 @@ void Foam::displacementInterpolationFvMotionSolver::updateMesh
);
// Note: boundBox does reduce
const vector span0 = boundBox(points0_, true).span();
const vector span = boundBox(points, true).span();
const vector span0 = boundBox(points0_).span();
const vector span = boundBox(points).span();
vector scaleFactors(cmptDivide(span0, span));
@ -455,13 +455,11 @@ void Foam::displacementInterpolationFvMotionSolver::updateMesh
else
{
// New point. Assume motion is scaling.
newPoints0[pointI] =
points0_[oldPointI]
+ cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
newPoints0[pointI] = points0_[oldPointI] + cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
}
}
else

View File

@ -272,8 +272,8 @@ void Foam::displacementLaplacianFvMotionSolver::updateMesh
);
// Note: boundBox does reduce
const vector span0 = boundBox(points0_, true).span();
const vector span = boundBox(points, true).span();
const vector span0 = boundBox(points0_).span();
const vector span = boundBox(points).span();
vector scaleFactors(cmptDivide(span0, span));
@ -294,13 +294,11 @@ void Foam::displacementLaplacianFvMotionSolver::updateMesh
else
{
// New point. Assume motion is scaling.
newPoints0[pointI] =
points0_[oldPointI]
+ cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
newPoints0[pointI] = points0_[oldPointI] + cmptMultiply
(
scaleFactors,
points[pointI]-points[masterPointI]
);
}
}
else