mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: variable-specific debug flags (finiteArea solvers)
This commit is contained in:
committed by
Mark Olesen
parent
dabe506e9e
commit
f0fb0d4263
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,6 +60,13 @@ Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
|
||||
<< "solving faMatrix<Type>"
|
||||
<< endl;
|
||||
|
||||
const int logLevel =
|
||||
solverControls.getOrDefault<int>
|
||||
(
|
||||
"log",
|
||||
SolverPerformance<Type>::debug
|
||||
);
|
||||
|
||||
auto& psi =
|
||||
const_cast<GeometricField<Type, faPatchField, areaMesh>&>(psi_);
|
||||
|
||||
@ -141,7 +148,7 @@ Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
|
||||
solverControls
|
||||
)->solve(psiCmpt, sourceCmpt, cmpt);
|
||||
|
||||
if (SolverPerformance<Type>::debug)
|
||||
if (logLevel)
|
||||
{
|
||||
solverPerf.print(Info);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,7 +62,14 @@ Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve
|
||||
<< "solving faMatrix<scalar>"
|
||||
<< endl;
|
||||
|
||||
GeometricField<scalar, faPatchField, areaMesh>& psi =
|
||||
const int logLevel =
|
||||
solverControls.getOrDefault<int>
|
||||
(
|
||||
"log",
|
||||
solverPerformance::debug
|
||||
);
|
||||
|
||||
auto& psi =
|
||||
const_cast<GeometricField<scalar, faPatchField, areaMesh>&>(psi_);
|
||||
|
||||
scalarField saveDiag(diag());
|
||||
@ -82,7 +89,7 @@ Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve
|
||||
solverControls
|
||||
)->solve(psi.ref(), totalSource);
|
||||
|
||||
if (solverPerformance::debug)
|
||||
if (logLevel)
|
||||
{
|
||||
solverPerf.print(Info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user