From 014f7a0891c9edd4a1b28fe5fdad06cd9bfc22f0 Mon Sep 17 00:00:00 2001 From: william Date: Fri, 20 Dec 2013 16:38:20 +0000 Subject: [PATCH] ENH: added packed particle number info to MPPIC Cloud --- .../clouds/Templates/MPPICCloud/MPPICCloud.C | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C index f22cac7b0f..eb436471ea 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C @@ -273,26 +273,33 @@ void Foam::MPPICCloud::info() tmp alpha = this->theta(); - Info<< " Min cell volume fraction = " - << gMin(alpha().internalField()) << endl; - Info<< " Max cell volume fraction = " - << gMax(alpha().internalField()) << endl; + const scalar alphaMin = gMin(alpha().internalField()); + const scalar alphaMax = gMax(alpha().internalField()); - label nOutside = 0; + Info<< " Min cell volume fraction = " << alphaMin << endl; + Info<< " Max cell volume fraction = " << alphaMax << endl; - forAllIter(typename CloudType, *this, iter) + if (alphaMax < SMALL) { - typename CloudType::parcelType& p = iter(); - const tetIndices tetIs(p.cell(), p.tetFace(), p.tetPt(), this->mesh()); - nOutside += !tetIs.tet(this->mesh()).inside(p.position()); + return; } - reduce(nOutside, plusOp