ENH: indexedOctree: print max leaf size

This commit is contained in:
mattijs
2019-09-12 13:54:26 +01:00
committed by Andrew Heather
parent 356995bf07
commit 88c1626b5b

View File

@ -2239,8 +2239,10 @@ Foam::indexedOctree<Type>::indexedOctree
{
// Count number of references into shapes (i.e. contents)
label nEntries = 0;
label maxEntries = 0;
forAll(contents, i)
{
maxEntries = max(maxEntries, contents[i].size());
nEntries += contents[i].size();
}
@ -2253,6 +2255,8 @@ Foam::indexedOctree<Type>::indexedOctree
<< " nEntries per shape (duplicity):"
<< nEntries/shapes.size()
<< nl
<< " max nEntries:" << maxEntries
<< nl
<< endl;
}
@ -2328,8 +2332,10 @@ Foam::indexedOctree<Type>::indexedOctree
if (debug)
{
label nEntries = 0;
label maxEntries = 0;
forAll(contents_, i)
{
maxEntries = max(maxEntries, contents_[i].size());
nEntries += contents_[i].size();
}
@ -2348,6 +2354,8 @@ Foam::indexedOctree<Type>::indexedOctree
<< scalar(nEntries)/contents.size() << nl
<< " per shape (duplicity):"
<< scalar(nEntries)/shapes.size() << nl
<< " max nEntries:" << maxEntries
<< nl
<< " total memory:" << memSize-oldMemSize
<< endl;
}