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.
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
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.
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.
|All times are GMT -4. The time now is 12:51.|