|
[Sponsors] |
September 24, 2013, 10:27 |
Debug Switches
|
#1 |
Member
Join Date: Oct 2011
Posts: 37
Rep Power: 15 |
Hi together
I created my own boundary condition derived from a fixedValue boundary condition. I've seen that at the beginning of each class there is the statement. namespace Foam { defineTypeNameAndDebug(impMPPolyPatch, 0); addToRunTimeSelectionTable(polyPatch, impMPPolyPatch, word); addToRunTimeSelectionTable(polyPatch, impMPPolyPatch, dictionary); } The boundary condition works nicely but I would like to switch on/off some Info statements and saw the possibility of doing this with the debug switches. Problems is that nether of what I try, whether adding impMPPolyPatch = 1 to the global OpenFOAM controlDict in etc nor in system/controlDict seams to change this switch. Can somebody give me a hint? Thanks in advance Lucian |
|
September 29, 2013, 08:23 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Lucian,
A few questions:
Nonetheless, my guess is that if you are loading the new BC through the "libs" entry on "controlDict", it's not reloading the debug flags from either "controlDict" files. Best regards, Bruno
__________________
|
|
September 30, 2013, 03:23 |
|
#3 | |
Member
Join Date: Oct 2011
Posts: 37
Rep Power: 15 |
Hi Bruno.
Yes I've created an own library with all the boundary conditions I use. In the Make/files I compile them into $FOAM_LIBBIN and afterwards I include the boundaries by loading with libs from controlDict. Anyway I found a way to bypass this issue. During the call of the constructor I set the value of a boolean to the value I set in the controlDict. And It works for both, case controlDict and global controlDict. bool myDebugFlag = Foam::debug::debugSwitch("impMPPolyPatch",0); This seams to look for impMPPolyPatch or sets myDebugFlag to zero if its not existing. I still don't really get why its possible to search for impMPPolyPatch like this, but the defineTypeNameAndDebug seams not to work. Kind regards Peter Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
create the file *.foam | phongstar | OpenFOAM | 12 | October 14, 2018 19:06 |
Switching to debug mode? | NJG | OpenFOAM Installation | 4 | March 4, 2013 19:08 |
how to use gdb to debug openfoam? | houkensjtu | OpenFOAM Programming & Development | 2 | October 16, 2012 03:05 |
Eclipse - case debug error | Bufacchi | OpenFOAM | 1 | February 7, 2012 16:15 |
How to compile OF-1.5 in the debug mode? | sandy | OpenFOAM Running, Solving & CFD | 4 | July 8, 2009 09:43 |