mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: indexedOctree: print max leaf size
This commit is contained in:
@ -2239,8 +2239,10 @@ Foam::indexedOctree<Type>::indexedOctree
|
|||||||
{
|
{
|
||||||
// Count number of references into shapes (i.e. contents)
|
// Count number of references into shapes (i.e. contents)
|
||||||
label nEntries = 0;
|
label nEntries = 0;
|
||||||
|
label maxEntries = 0;
|
||||||
forAll(contents, i)
|
forAll(contents, i)
|
||||||
{
|
{
|
||||||
|
maxEntries = max(maxEntries, contents[i].size());
|
||||||
nEntries += contents[i].size();
|
nEntries += contents[i].size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2253,6 +2255,8 @@ Foam::indexedOctree<Type>::indexedOctree
|
|||||||
<< " nEntries per shape (duplicity):"
|
<< " nEntries per shape (duplicity):"
|
||||||
<< nEntries/shapes.size()
|
<< nEntries/shapes.size()
|
||||||
<< nl
|
<< nl
|
||||||
|
<< " max nEntries:" << maxEntries
|
||||||
|
<< nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2328,8 +2332,10 @@ Foam::indexedOctree<Type>::indexedOctree
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
label nEntries = 0;
|
label nEntries = 0;
|
||||||
|
label maxEntries = 0;
|
||||||
forAll(contents_, i)
|
forAll(contents_, i)
|
||||||
{
|
{
|
||||||
|
maxEntries = max(maxEntries, contents_[i].size());
|
||||||
nEntries += contents_[i].size();
|
nEntries += contents_[i].size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2348,6 +2354,8 @@ Foam::indexedOctree<Type>::indexedOctree
|
|||||||
<< scalar(nEntries)/contents.size() << nl
|
<< scalar(nEntries)/contents.size() << nl
|
||||||
<< " per shape (duplicity):"
|
<< " per shape (duplicity):"
|
||||||
<< scalar(nEntries)/shapes.size() << nl
|
<< scalar(nEntries)/shapes.size() << nl
|
||||||
|
<< " max nEntries:" << maxEntries
|
||||||
|
<< nl
|
||||||
<< " total memory:" << memSize-oldMemSize
|
<< " total memory:" << memSize-oldMemSize
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user