Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
d9c203b9
Commit
d9c203b9
authored
Sep 09, 2008
by
mattijs
Browse files
extent also ensures 3Dness
parent
0d1d3014
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/meshTools/octree/treeBoundBox.H
View file @
d9c203b9
...
...
@@ -314,6 +314,7 @@ public:
//- Return slightly wider bounding box
// Extends all dimensions with s*span*Random::scalar01()
// and guarantees in any direction s*mag(span) minimum width
inline
treeBoundBox
extend
(
Random
&
,
const
scalar
s
)
const
;
// Friend Operators
...
...
src/meshTools/octree/treeBoundBoxI.H
View file @
d9c203b9
...
...
@@ -437,7 +437,15 @@ inline treeBoundBox treeBoundBox::extend(Random& rndGen, const scalar s) const
{
treeBoundBox
bb
(
*
this
);
const
vector
span
(
bb
.
max
()
-
bb
.
min
());
vector
span
(
bb
.
max
()
-
bb
.
min
());
// Make 3D
scalar
magSpan
=
Foam
::
mag
(
span
);
for
(
direction
dir
=
0
;
dir
<
vector
::
nComponents
;
dir
++
)
{
span
[
dir
]
=
Foam
::
max
(
s
*
magSpan
,
span
[
dir
]);
}
bb
.
min
()
-=
cmptMultiply
(
s
*
rndGen
.
vector01
(),
span
);
bb
.
max
()
+=
cmptMultiply
(
s
*
rndGen
.
vector01
(),
span
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment