Added mesh check frequency option, fix

This commit is contained in:
Hrvoje Jasak 2012-10-08 13:35:44 +01:00
parent e5967d4fd3
commit 413c004eff
2 changed files with 6 additions and 4 deletions

View file

@ -42,7 +42,7 @@ Author
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::validOptions.insert("checkFrequency", ""); argList::validOptions.insert("checkFrequency", "int");
# include "setRootCase.H" # include "setRootCase.H"
# include "createEngineTime.H" # include "createEngineTime.H"
@ -50,7 +50,6 @@ int main(int argc, char *argv[])
// Read check frequency // Read check frequency
label checkFrequency = 1; label checkFrequency = 1;
args.optionReadIfPresent("checkFrequency", checkFrequency); args.optionReadIfPresent("checkFrequency", checkFrequency);
fileName path = runTime.caseName(); fileName path = runTime.caseName();

View file

@ -40,7 +40,7 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::validOptions.insert("checkFrequency", ""); argList::validOptions.insert("checkFrequency", "int");
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
@ -64,7 +64,10 @@ int main(int argc, char *argv[])
# include "checkVolContinuity.H" # include "checkVolContinuity.H"
if (runTime.timeIndex() % checkFrequency == 0)
{
mesh.checkMesh(true); mesh.checkMesh(true);
}
runTime.write(); runTime.write();