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

Provoking a clean exit from the main loop

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 21, 2006, 01:54
Default I am looking for a (simple) me
  #1
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
I am looking for a (simple) method to exit cleanly from the main calculation loop.
As pseudo-code:

for (runTime++; !runTime.end(); runTime++) {
solve_equations();
if ( isConverged() or user_signal())
{
runTime.writeNow() and exit_loop;
}
}

Looking through Time*.H, it would appear that something like altering the stop flag to 'saWriteNow' might do the trick, but I would really appreciate some pointers about the correct approach.

Thanks,
/mark
olesen is offline   Reply With Quote

 


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
How to get the case nameroot outside main normunds OpenFOAM Running, Solving & CFD 2 May 18, 2007 04:31
Main Diffenrences between commercian packages ?? Abou Main CFD Forum 8 October 16, 2006 08:36
axisymmetric main flow + injection Stephan FLUENT 1 January 19, 2006 11:43
loop(p,I->p) how this loop works? Sinan FLUENT 0 January 18, 2005 18:04
Main Star-CD Commands Maxime Perelli Siemens 1 April 17, 2001 08:35


All times are GMT -4. The time now is 18:32.