Skip to content
Snippets Groups Projects
Commit 644a76b4 authored by laurence's avatar laurence
Browse files

ENH: Add time selection to checkCvMesh

parent 7f652713
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -42,6 +42,8 @@ using namespace Foam; ...@@ -42,6 +42,8 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
timeSelector::addOptions();
# include "addOverwriteOption.H" # include "addOverwriteOption.H"
# include "setRootCase.H" # include "setRootCase.H"
...@@ -49,7 +51,7 @@ int main(int argc, char *argv[]) ...@@ -49,7 +51,7 @@ int main(int argc, char *argv[])
instantList timeDirs = timeSelector::select0(runTime, args); instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H" # include "createNamedPolyMesh.H"
runTime.functionObjects().off(); runTime.functionObjects().off();
...@@ -57,14 +59,11 @@ int main(int argc, char *argv[]) ...@@ -57,14 +59,11 @@ int main(int argc, char *argv[])
{ {
runTime.setTime(timeDirs[timeI], timeI); runTime.setTime(timeDirs[timeI], timeI);
Info<< "Create mesh for time = " << runTime.timeName() Info<< "Time = " << runTime.timeName()
<< nl << endl; << nl << endl;
mesh.readUpdate(); mesh.readUpdate();
Info<< "Read mesh in = "
<< runTime.cpuTimeIncrement() << " s" << endl;
// Check patches and faceZones are synchronised // Check patches and faceZones are synchronised
mesh.boundaryMesh().checkParallelSync(true); mesh.boundaryMesh().checkParallelSync(true);
meshRefinement::checkCoupledFaceZones(mesh); meshRefinement::checkCoupledFaceZones(mesh);
...@@ -87,8 +86,10 @@ int main(int argc, char *argv[]) ...@@ -87,8 +86,10 @@ int main(int argc, char *argv[])
= cvMeshDict.subDict("meshQualityControls"); = cvMeshDict.subDict("meshQualityControls");
Info<< "Checking initial mesh ..." << endl; Info<< "Checking mesh ..." << endl;
faceSet wrongFaces(mesh, "wrongFaces", mesh.nFaces()/100); faceSet wrongFaces(mesh, "wrongFaces", mesh.nFaces()/100);
motionSmoother::checkMesh(false, mesh, meshQualityDict, wrongFaces); motionSmoother::checkMesh(false, mesh, meshQualityDict, wrongFaces);
const label nInitErrors = returnReduce const label nInitErrors = returnReduce
...@@ -117,6 +118,5 @@ int main(int argc, char *argv[]) ...@@ -117,6 +118,5 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl; Info<< "End\n" << endl;
return 0; return 0;
} }
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