Skip to content
Snippets Groups Projects
Commit c334f758 authored by mattijs's avatar mattijs
Browse files

BUG: octree.C : tree building criterion needs to look at any change in tree.

parent a2919d80
Branches
Tags
No related merge requests found
......@@ -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
(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment