Added mesh check frequency option, fix
This commit is contained in:
parent
e5967d4fd3
commit
413c004eff
2 changed files with 6 additions and 4 deletions
|
@ -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();
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
mesh.checkMesh(true);
|
if (runTime.timeIndex() % checkFrequency == 0)
|
||||||
|
{
|
||||||
|
mesh.checkMesh(true);
|
||||||
|
}
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|
Reference in a new issue