From 9c09fd4f67af634d5b1ddc915a4d732c426695da Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Mon, 29 Dec 2014 11:11:43 +0000 Subject: [PATCH] viewFactor: moved some of the "noise" to print only on debug --- .../radiationModel/viewFactor/viewFactor.C | 43 +++++++++++++++---- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C index c382f3ed788..b5c7abe15a1 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C @@ -69,16 +69,19 @@ void Foam::radiation::viewFactor::initialise() if (debug) { - Pout<< "Selected patches:" << selectedPatches_ << endl; - Pout<< "Number of coarse faces:" << nLocalCoarseFaces_ << endl; + Pout<< "radiation::viewFactor::initialise() Selected patches:" + << selectedPatches_ << endl; + Pout<< "radiation::viewFactor::initialise() Number of coarse faces:" + << nLocalCoarseFaces_ << endl; } totalNCoarseFaces_ = nLocalCoarseFaces_; reduce(totalNCoarseFaces_, sumOp<label>()); - if (Pstream::master()) + if (debug && Pstream::master()) { - Info<< "Total number of clusters : " << totalNCoarseFaces_ << endl; + InfoIn("radiation::viewFactor::initialise()") + << "Total number of clusters : " << totalNCoarseFaces_ << endl; } labelListIOList subMap @@ -173,7 +176,11 @@ void Foam::radiation::viewFactor::initialise() new scalarSquareMatrix(totalNCoarseFaces_, totalNCoarseFaces_, 0.0) ); - Info<< "Insert elements in the matrix..." << endl; + if (debug) + { + InfoIn("radiation::viewFactor::initialise()") + << "Insert elements in the matrix..." << endl; + } for (label procI = 0; procI < Pstream::nProcs(); procI++) { @@ -191,7 +198,11 @@ void Foam::radiation::viewFactor::initialise() bool smoothing = readBool(coeffs_.lookup("smoothing")); if (smoothing) { - Info<< "Smoothing the matrix..." << endl; + if (debug) + { + InfoIn("radiation::viewFactor::initialise()") + << "Smoothing the matrix..." << endl; + } for (label i=0; i<totalNCoarseFaces_; i++) { @@ -543,6 +554,7 @@ void Foam::radiation::viewFactor::calculate() } Info<< "\nSolving view factor equations..." << endl; + // Negative coming into the fluid LUsolve(C, q); } @@ -566,7 +578,13 @@ void Foam::radiation::viewFactor::calculate() } } } - Info<< "\nDecomposing C matrix..." << endl; + + if (debug) + { + InfoIn("radiation::viewFactor::initialise()") + << "\nDecomposing C matrix..." << endl; + } + LUDecompose(CLU_(), pivotIndices_); } @@ -589,7 +607,12 @@ void Foam::radiation::viewFactor::calculate() } } - Info<< "\nLU Back substitute C matrix.." << endl; + if (debug) + { + InfoIn("radiation::viewFactor::initialise()") + << "\nLU Back substitute C matrix.." << endl; + } + LUBacksubstitute(CLU_(), pivotIndices_, q); iterCounter_ ++; } @@ -643,7 +666,9 @@ void Foam::radiation::viewFactor::calculate() const scalarField& Qrp = Qr_.boundaryField()[patchID]; const scalarField& magSf = mesh_.magSf().boundaryField()[patchID]; scalar heatFlux = gSum(Qrp*magSf); - Info<< "Total heat transfer rate at patch: " + + InfoIn("radiation::viewFactor::initialise()") + << "Total heat transfer rate at patch: " << patchID << " " << heatFlux << endl; } -- GitLab