CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   lduMatrix::debug does not work anymore in 2.2.1 (https://www.cfd-online.com/Forums/openfoam-programming-development/123615-ldumatrix-debug-does-not-work-anymore-2-2-1-a.html)

AnjaMiehe September 17, 2013 08:12

lduMatrix::debug does not work anymore in 2.2.1
 
Hello there,

I used lduMatrix::debug = 0 so silence the output for subiterations and set it to lduMatrix::debug = 1 afterwards.

In OpenFOAM 2.1., everything works fine. In 2.2.0 or 2.2.1 the statement lduMatrix::debug = 0 does not silence the output of the solver anymore. Searching through the forums, Doxygen and the code, I could not find out what did change and adopt the line accordingly.

Does anyone know, what is the matter?
Thank you very much in advance,
Regards, Anja

AnjaMiehe April 8, 2014 07:43

Hello there,

I solved my problem. They changed only the name of it. Instead of
Code:

lduMatrix::debug
it is now
Code:

solverPerformance::debug
In order to silence a solver, just set
Code:

solverPerformance::debug=0;
and with
Code:

solverPerformance::debug=1;
you enable again the output afterwards.

rajeevsrisai January 17, 2018 00:30

silence output to terminal
 
Hi, I am pretty new to openfoam. Can you please guide be about where to change "solverPerformance::debug=0;"?
Thank you.

vkoppejan October 15, 2018 10:46

So...

I just spent half an hour figuring this out.

There are to solver performance classes:

Code:

solverPerformance
and

Code:

SolverPerformance
Note the first capital S.

The latter is templated, and allows you to set

Code:

SolverPerformance<scalar>::debug=0
or

Code:

SolverPerformance<vector>::debug=0
and so forth for all other template options.

This finally silenced all my solvers. One more tip, I use them as follows:

Code:

#ifndef FULLDEBUG
  SolverPerformance<vector>::debug = 0;
#endif

Code:

<awesome code wiht to much output>
Code:

#ifndef FULLDEBUG
  SolverPerformance<vector>::debug = 1;
#endif


This gives me solver output in debug builds but not in opt and prof builds. Yes this is uaf and not c++onic but it works. I'm very happy to get tips on how to implement this nices


All times are GMT -4. The time now is 05:42.