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

Difference between runTime.run() and runTime.loop()

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 28, 2011, 04:57
Default Difference between runTime.run() and runTime.loop()
  #1
Member
 
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 6
JimKnopf is on a distinguished road
Hi there!

Though I don't have a problem, recently I was wondering why there are two strategies to iterate in time.

First there is runTime.loop() which is used as a condition for a while loop.

Second there is runTime.run() as a condition for the while loop and runTime++ for iterating

Does this make sense? I don't get. Maybe someone can enlighten me.

greetz
Jim
JimKnopf is offline   Reply With Quote

Old   October 28, 2011, 11:08
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 397
Rep Power: 12
marupio is on a distinguished road
Read src/OpenFOAM/db/Time/time.H, it has comments describing the difference. I think .loop increments runTime, whereas .run is only a test if the run should continue, but there may be some fine differences with function objects.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:01.