mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: octree.C : tree building criterion needs to look at any change in tree.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -149,6 +149,7 @@ Foam::octree<Type>::octree
|
||||
// - has some guaranteed maximum size (maxShapeRatio)
|
||||
|
||||
label oldNLeaves = -1; // make test below pass first time.
|
||||
label oldNNodes = -1;
|
||||
deepestLevel_ = 1;
|
||||
while
|
||||
(
|
||||
@ -169,11 +170,11 @@ Foam::octree<Type>::octree
|
||||
break;
|
||||
}
|
||||
|
||||
if (oldNLeaves == nLeaves())
|
||||
if ((oldNLeaves == nLeaves()) && (oldNNodes == nNodes()))
|
||||
{
|
||||
if (debug & 1)
|
||||
{
|
||||
Pout<< "octree : exiting since nLeaves does not change"
|
||||
Pout<< "octree : exiting since nLeaves and nNodes do not change"
|
||||
<< endl;
|
||||
}
|
||||
break;
|
||||
@ -185,6 +186,7 @@ Foam::octree<Type>::octree
|
||||
}
|
||||
|
||||
oldNLeaves = nLeaves();
|
||||
oldNNodes = nNodes();
|
||||
|
||||
topNode_->redistribute
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user