ENH: debug switches and output.

This commit is contained in:
graham 2010-11-16 18:28:52 +00:00
parent f064cc57cf
commit 2dd05b8a1a
4 changed files with 46 additions and 5 deletions

View File

@ -316,6 +316,7 @@ DebugSwitches
cellPointFace 0;
cellPointWeight 0;
cellSet 0;
cellSizeControlSurfaces 0;
cellToCell 0;
cellToFace 0;
cellToPoint 0;
@ -498,6 +499,7 @@ DebugSwitches
hhuMixtureThermo<veryInhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hierarchical 0;
hierarchicalDensityWeightedStochastic 1;
hollowConeInjector 0;
iC3H8O 0;
indexedOctree 0;

View File

@ -27,6 +27,16 @@ License
#include "conformalVoronoiMesh.H"
#include "cellSizeFunction.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(cellSizeControlSurfaces, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::cellSizeControlSurfaces::cellSizeControlSurfaces
@ -218,6 +228,14 @@ Foam::scalar Foam::cellSizeControlSurfaces::cellSize
{
const cellSizeFunction& cSF = cellSizeFunctions_[i];
if (debug)
{
Info<< "size function "
<< allGeometry_.names()[surfaces_[i]]
<< " priority " << cSF.priority()
<< endl;
}
if (cSF.priority() < previousPriority)
{
return minSize;
@ -239,6 +257,11 @@ Foam::scalar Foam::cellSizeControlSurfaces::cellSize
minSize = sizeI;
}
if (debug)
{
Info<< "sizeI " << sizeI << " minSize " << minSize << endl;
}
previousPriority = cSF.priority();
}
}

View File

@ -89,6 +89,10 @@ class cellSizeControlSurfaces
public:
//- Runtime type information
ClassName("cellSizeControlSurfaces");
// Constructors
//- Construct from dictionary and references to conformalVoronoiMesh and

View File

@ -92,7 +92,10 @@ void Foam::hierarchicalDensityWeightedStochastic::recurseAndFill
word newName = recursionName + "_" + Foam::name(i);
// cvMesh_.timeCheck();
if (debug)
{
cvMesh_.timeCheck();
}
if (geometry.overlaps(subBB))
{
@ -114,7 +117,10 @@ void Foam::hierarchicalDensityWeightedStochastic::recurseAndFill
// word(newName + "_overlap")
// );
// Info<< newName + "_overlap " << subBB << endl;
if (debug)
{
Info<< newName + "_overlap " << subBB << endl;
}
if (!fillBox(initialPoints, subBB, true))
{
@ -136,7 +142,10 @@ void Foam::hierarchicalDensityWeightedStochastic::recurseAndFill
// newName + "_inside"
// );
// Info<< newName + "_inside " << subBB << endl;
if (debug)
{
Info<< newName + "_inside " << subBB << endl;
}
if (!fillBox(initialPoints, subBB, false))
{
@ -764,10 +773,13 @@ hierarchicalDensityWeightedStochastic::initialPoints() const
std::vector<Vb::Point> initialPoints;
// Info<< "Filling box " << hierBB << endl;
Info<< nl << " " << typeName << endl;
if (debug)
{
Info<< " Filling box " << hierBB << endl;
}
recurseAndFill
(
initialPoints,