CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Difference between and runTime.loop()

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

LinkBack Thread Tools Display Modes
Old   October 28, 2011, 04:57
Default Difference between and runTime.loop()
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 7
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 as a condition for the while loop and runTime++ for iterating

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

JimKnopf is offline   Reply With Quote

Old   October 28, 2011, 11:08
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 407
Rep Power: 13
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


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 14:19.