fvMatrixSolve: print solver messages only if the SolverPerformance debug switch is set

etc/controlDict: Set SolverPerformance debug switch default to 1
This commit is contained in:
Henry 2013-07-03 22:16:40 +01:00
parent ac11cd2456
commit 0b7a873c07
4 changed files with 18 additions and 8 deletions

View File

@ -266,6 +266,7 @@ DebugSwitches
SingleKineticRateDevolatilisation 0;
SingleMixtureFraction 0;
Smagorinsky 0;
SolverPerformance 1;
SpalartAllmaras 0;
SpalartAllmarasDDES 0;
SpalartAllmarasIDDES 0;

View File

@ -65,8 +65,7 @@ bool Foam::SolverPerformance<Type>::checkConvergence
{
if (debug >= 2)
{
//Info<< solverName_
Pout<< solverName_
Info<< solverName_
<< ": Iteration " << noIterations_
<< " residual = " << finalResidual_
<< endl;

View File

@ -200,8 +200,10 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveSegregated
solverControls
)->solve(psiCmpt, sourceCmpt, cmpt);
//solverPerf.print(Info);
solverPerf.print(Info(this->mesh().comm()));
if (solverPerformance::debug)
{
solverPerf.print(Info(this->mesh().comm()));
}
solverPerfVec = max(solverPerfVec, solverPerf);
solverPerfVec.solverName() = solverPerf.solverName();
@ -265,8 +267,10 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveCoupled
coupledMatrixSolver->solve(psi)
);
//solverPerf.print(Info);
solverPerf.print(Info(this->mesh().comm()));
if (SolverPerformance<Type>::debug)
{
solverPerf.print(Info(this->mesh().comm()));
}
psi.correctBoundaryConditions();

View File

@ -118,7 +118,10 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
totalSource
);
solverPerf.print(Info(fvMat_.mesh().comm()));
if (solverPerformance::debug)
{
solverPerf.print(Info(fvMat_.mesh().comm()));
}
fvMat_.diag() = saveDiag;
@ -165,7 +168,10 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::solveSegregated
solverControls
)->solve(psi.internalField(), totalSource);
solverPerf.print(Info(mesh().comm()));
if (solverPerformance::debug)
{
solverPerf.print(Info(mesh().comm()));
}
diag() = saveDiag;