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

Lack of Info statement blocks the code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2015, 12:12
Default Lack of Info statement blocks the code
  #1
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi all,

I was just trying to update IHFOAM to work under OpenFOAM versions 2.3 and 2.4 and found the most puzzling programming glitch ever.

When I get to run a very simple example, the codes gets stuck updating one of the wave generation boundary conditions, inside an infinite loop because of some nan values. First strange thing: the same loop is used by the other BC that gets updated first, and works without any problems.

To assess what is happening and where, I place a bunch of Info statements, with which I detect the nan values. The most strange thing comes next, if I place any dummy Info statements much after where the initial code gets blocked, everything works flawlessly. The code works as intended, and no nan values are obtained.

The same code worked on previous versions and I am totally clueless on how a silly thing as an Info line in the future, may influence the past... Any ideas? Maybe a bug of the compiler?

I know this is little info for anyone to take any conclusion, but I will continue to struggle a couple of days and will post the code and example next week.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 1, 2015, 05:51
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Problem solved, my bad for using a variable without being initialized first. I will fix this bug and update the code very soon.

Cheers!
Phicau is offline   Reply With Quote

Reply


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
[ICEM] Advice on genetrating 2D blocks required user_1 ANSYS Meshing & Geometry 0 December 3, 2014 05:46
[mesh manipulation] Combining multiple mesh blocks ingojahn OpenFOAM Meshing & Mesh Conversion 1 August 18, 2014 03:19
public CFD Code development Heinz Wilkening Main CFD Forum 38 March 5, 1999 11:44
What kind of Cmmercial CFD code you feel well? Lans Main CFD Forum 13 October 27, 1998 10:20
is there any info. about body-fitted code? kuno Main CFD Forum 1 July 28, 1998 19:14


All times are GMT -4. The time now is 23:34.