Commit 4b60453c authored by Mark Olesen's avatar Mark Olesen
Browse files

use while (runTime.loop() { .. } where possible in solvers

- change system/controlDict to use functions {..} instead of functions (..);
  * This is internally more efficient
- fixed formatting of system/controlDict functions entry

- pedantic change: use 'return 0' instead of 'return(0)' in the applications,
  since return is a C/C++ keyword, not a function.
parent 8b5457a8
......@@ -55,9 +55,8 @@ int main(int argc, char *argv[])
Info<< nl << "Starting time loop" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readPISOControls.H"
......@@ -123,7 +122,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -53,10 +53,8 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
Info<< "Evolving " << kinematicCloud.name() << endl;
......@@ -72,7 +70,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -48,9 +48,8 @@ int main(int argc, char *argv[])
Info<< "\nCalculating temperature distribution\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
......@@ -72,7 +71,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -50,9 +50,8 @@ int main(int argc, char *argv[])
# include "CourantNo.H"
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
......@@ -72,7 +71,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -130,7 +130,7 @@ scalar StCoNum = 0.0;
Info<< "\n end\n";
return(0);
return 0;
}
......
......@@ -195,7 +195,7 @@ scalar StCoNum = 0.0;
Info<< "\n end\n";
return(0);
return 0;
}
......
......@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -94,7 +94,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -220,7 +220,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
// ************************************************************************* //
......@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -51,9 +51,8 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readSIMPLEControls.H"
......
......@@ -49,9 +49,8 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readSIMPLEControls.H"
......
......@@ -47,9 +47,8 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
surfaceScalarField phiv
......@@ -124,7 +123,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -53,9 +53,8 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.value() << nl << endl;
# include "readPISOControls.H"
......@@ -187,7 +186,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -52,9 +52,8 @@ int main(int argc, char *argv[])
autoPtr<Foam::motionSolver> motionPtr = motionSolver::New(mesh);
while (runTime.run())
while (runTime.loop())
{
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readPISOControls.H"
......@@ -134,7 +133,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment