Sprucing up the tutorials folder and adding -dict to "collapseEdges"

Patch provided by Bruno Santos
Resolves patch application request http://www.openfoam.org/mantisbt/view.php?id=2015
This commit is contained in:
Henry Weller
2016-03-06 19:06:44 +00:00
parent 7fc1915e1d
commit 4bc77e6aff
34 changed files with 233 additions and 295 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,6 +80,7 @@ int main(int argc, char *argv[])
"Collapse faces that are in the supplied face set"
);
#include "addDictOption.H"
#include "addOverwriteOption.H"
#include "setRootCase.H"
#include "createTime.H"
@ -91,6 +92,13 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance();
const word dictName("collapseDict");
#include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl;
IOdictionary collapseDict(dictIO);
const bool overwrite = args.optionFound("overwrite");
const bool collapseFaces = args.optionFound("collapseFaces");
@ -155,7 +163,10 @@ int main(int argc, char *argv[])
{
meshFilterPtr.set(new polyMeshFilter(mesh, pointPriority));
meshFilterPtr.set
(
new polyMeshFilter(mesh, pointPriority, collapseDict)
);
polyMeshFilter& meshFilter = meshFilterPtr();
// newMesh will be empty until it is filtered
@ -177,7 +188,10 @@ int main(int argc, char *argv[])
if (collapseFaceSet)
{
meshFilterPtr.reset(new polyMeshFilter(mesh, pointPriority));
meshFilterPtr.reset
(
new polyMeshFilter(mesh, pointPriority, collapseDict)
);
polyMeshFilter& meshFilter = meshFilterPtr();
const autoPtr<fvMesh>& newMesh = meshFilter.filteredMesh();
@ -198,7 +212,10 @@ int main(int argc, char *argv[])
if (collapseFaces)
{
meshFilterPtr.reset(new polyMeshFilter(mesh, pointPriority));
meshFilterPtr.reset
(
new polyMeshFilter(mesh, pointPriority, collapseDict)
);
polyMeshFilter& meshFilter = meshFilterPtr();
const autoPtr<fvMesh>& newMesh = meshFilter.filteredMesh();