diff --git a/etc/controlDict b/etc/controlDict index d6635ecd1817ac3088b32a051a62226da31ef9e9..a29be8a5e382d8919c76360a19acd09ec0805410 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -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; diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.C index 592f203cf13b865a4ffbb7d6ce554e5e24c94633..fd309be0a84fc1ed27a6fd08d14abd2abc22d6e5 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.C @@ -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(); } } diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.H b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.H index c161c81a17d6dbe57a54e1e1d5fa06dd9dbb0e48..437dd1001b40b9c62afd459f05c186aa898cb80c 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.H +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeControlSurfaces.H @@ -89,6 +89,10 @@ class cellSizeControlSurfaces public: + //- Runtime type information + ClassName("cellSizeControlSurfaces"); + + // Constructors //- Construct from dictionary and references to conformalVoronoiMesh and diff --git a/src/mesh/conformalVoronoiMesh/initialPointsMethod/hierarchicalDensityWeightedStochastic/hierarchicalDensityWeightedStochastic.C b/src/mesh/conformalVoronoiMesh/initialPointsMethod/hierarchicalDensityWeightedStochastic/hierarchicalDensityWeightedStochastic.C index 464b4e3702c7ab1774800202f665aecef4530f95..25fbad2bbd61c9bf31d307cb760109bfb1edfdc2 100644 --- a/src/mesh/conformalVoronoiMesh/initialPointsMethod/hierarchicalDensityWeightedStochastic/hierarchicalDensityWeightedStochastic.C +++ b/src/mesh/conformalVoronoiMesh/initialPointsMethod/hierarchicalDensityWeightedStochastic/hierarchicalDensityWeightedStochastic.C @@ -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,