CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Debug Switches

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Peter Müller

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2013, 09:27
Default Debug Switches
  #1
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 14
Peter Müller is on a distinguished road
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
Peter Müller is offline   Reply With Quote

Old   September 29, 2013, 07:23
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Lucian,

A few questions:
  1. Can you share an example case?
  2. And how exactly are you loading the boundary condition to memory?

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
__________________
wyldckat is offline   Reply With Quote

Old   September 30, 2013, 02:23
Default
  #3
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 14
Peter Müller is on a distinguished road
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:
Originally Posted by wyldckat View Post
Hi Lucian,

A few questions:
  1. Can you share an example case?
  2. And how exactly are you loading the boundary condition to memory?

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
wyldckat likes this.
Peter Müller is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
create the file *.foam phongstar OpenFOAM 12 October 14, 2018 18:06
Switching to debug mode? NJG OpenFOAM Installation 4 March 4, 2013 18:08
how to use gdb to debug openfoam? houkensjtu OpenFOAM Programming & Development 2 October 16, 2012 02:05
Eclipse - case debug error Bufacchi OpenFOAM 1 February 7, 2012 15:15
How to compile OF-1.5 in the debug mode? sandy OpenFOAM Running, Solving & CFD 4 July 8, 2009 08:43


All times are GMT -4. The time now is 00:41.