Merge commit 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2008-06-26 14:08:49 +02:00
89 changed files with 3755 additions and 44940 deletions

View File

@ -312,7 +312,7 @@ label collapseHighAspectFaces
if (lengths[1] > edgeRatio*lengths[0])
{
edgeI = fEdges[lengths.indices()[0]];
}
}
}
@ -456,6 +456,7 @@ label simplifyFaces
int main(int argc, char *argv[])
{
argList::noParallel();
argList::validOptions.insert("overwrite", "");
argList::validArgs.append("edge length [m]");
argList::validArgs.append("merge angle (degrees)");
@ -465,6 +466,7 @@ int main(int argc, char *argv[])
scalar minLen(readScalar(IStringStream(args.additionalArgs()[0])()));
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.options().found("overwrite");
scalar maxCos = Foam::cos(angle*180/mathematicalConstant::pi);
@ -580,7 +582,10 @@ int main(int argc, char *argv[])
if (meshChanged)
{
// Write resulting mesh
runTime++;
if (!overwrite)
{
runTime++;
}
Info << "Writing collapsed mesh to time " << runTime.value() << endl;

View File

@ -92,7 +92,7 @@ void checkSnapMesh
scalar relMinVol(readScalar(snapDict.lookup("minVol")));
const scalar minCellVol = min(mesh.cellVolumes());
const scalar minPyrVol = relMinVol*minCellVol;
// Min area
// Min area
scalar minArea(readScalar(snapDict.lookup("minArea")));
if (maxNonOrtho < 180.0-SMALL)
@ -435,6 +435,7 @@ int main(int argc, char *argv[])
argList::validArgs.append("feature angle [0..180]");
argList::validOptions.insert("concaveAngle", "[0..180]");
argList::validOptions.insert("snapMesh", "");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -457,6 +458,7 @@ int main(int argc, char *argv[])
scalar concaveSin = Foam::sin(concaveAngle*mathematicalConstant::pi/180.0);
bool snapMeshDict = args.options().found("snapMesh");
bool overwrite = args.options().found("overwrite");
Info<< "Merging all faces of a cell" << nl
<< " - which are on the same patch" << nl
@ -468,7 +470,10 @@ int main(int argc, char *argv[])
<< " (sin:" << concaveSin << ')' << nl
<< endl;
runTime++;
if (!overwrite)
{
runTime++;
}
// Merge faces on same patch
label nChanged = mergePatchFaces

View File

@ -328,10 +328,14 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
int main(int argc, char *argv[])
{
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
bool overwrite = args.options().found("overwrite");
Info<< "Reading modifyMeshDict\n" << endl;
IOdictionary dict
@ -366,7 +370,7 @@ int main(int argc, char *argv[])
bool cellsToSplit = cellsToPyramidise.size() > 0;
//List<Tuple<pointField,point> >
//List<Tuple<pointField,point> >
// cellsToCreate(dict.lookup("cellsToCreate"));
Info<< "Read from " << dict.name() << nl
@ -541,7 +545,10 @@ int main(int argc, char *argv[])
cutter.updateMesh(morphMap());
runTime++;
if (!overwrite)
{
runTime++;
}
// Write resulting mesh
Info << "Writing modified mesh to time " << runTime.value() << endl;
@ -572,7 +579,7 @@ int main(int argc, char *argv[])
// Topo change container
polyTopoChange meshMod(mesh);
// Insert
// Insert
cutter.setRefinement(meshMod);
// Do changes
@ -587,7 +594,10 @@ int main(int argc, char *argv[])
//cutter.updateMesh(morphMap());
runTime++;
if (!overwrite)
{
runTime++;
}
// Write resulting mesh
Info << "Writing modified mesh to time " << runTime.value() << endl;
@ -623,7 +633,10 @@ int main(int argc, char *argv[])
cutter.updateMesh(morphMap());
runTime++;
if (!overwrite)
{
runTime++;
}
// Write resulting mesh
Info << "Writing modified mesh to time " << runTime.value() << endl;

View File

@ -52,6 +52,7 @@ using namespace Foam;
// Main program:
int main(int argc, char *argv[])
{
argList::validOptions.insert("overwrite", "");
argList::validArgs.append("cellSet");
# include "setRootCase.H"
# include "createTime.H"
@ -59,6 +60,7 @@ int main(int argc, char *argv[])
pointMesh pMesh(mesh);
word cellSetName(args.args()[1]);
bool overwrite = args.options().found("overwrite");
Info<< "Reading cells to refine from cellSet " << cellSetName
<< nl << endl;
@ -110,7 +112,7 @@ int main(int argc, char *argv[])
// Read point fields
PtrList<pointScalarField> psFlds;
ReadFields(pMesh, objects, psFlds);
PtrList<pointVectorField> pvFlds;
ReadFields(pMesh, objects, pvFlds);
@ -149,7 +151,10 @@ int main(int argc, char *argv[])
// Play refinement commands into mesh changer.
meshCutter.setRefinement(newCellsToRefine, meshMod);
runTime++;
if (!overwrite)
{
runTime++;
}
// Create mesh, return map from old to new mesh.
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);

View File

@ -50,6 +50,7 @@ int main(int argc, char *argv[])
Foam::argList::validArgs.append("patchName");
Foam::argList::validArgs.append("edgeWeight");
Foam::argList::validOptions.insert("useSet", "cellSet");
Foam::argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -57,7 +58,8 @@ int main(int argc, char *argv[])
word patchName(args.additionalArgs()[0]);
scalar weight(readScalar(IStringStream(args.additionalArgs()[1])()));
scalar weight(readScalar(IStringStream(args.additionalArgs()[1])()));
bool overwrite = args.options().found("overwrite");
label patchID = mesh.boundaryMesh().findPatchID(patchName);
@ -212,7 +214,10 @@ int main(int argc, char *argv[])
// Do all changes
Info<< "Morphing ..." << endl;
runTime++;
if (!overwrite)
{
runTime++;
}
autoPtr<mapPolyMesh> morphMap = meshMod.changeMesh(mesh, false);

View File

@ -48,12 +48,15 @@ using namespace Foam;
int main(int argc, char *argv[])
{
Foam::argList::validOptions.insert("overwrite", "");
Foam::argList::validArgs.append("faceSet");
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
bool overwrite = args.options().found("overwrite");
word setName(args.additionalArgs()[0]);
// Read faces
@ -159,7 +162,10 @@ int main(int argc, char *argv[])
// Update numbering of cells/vertices.
faceRemover.updateMesh(morphMap);
runTime++;
if (!overwrite)
{
runTime++;
}
// Take over refinement levels and write to new time directory.
Pout<< "Writing mesh to time " << runTime.timeName() << endl;

View File

@ -527,6 +527,7 @@ int main(int argc, char *argv[])
argList::validOptions.insert("set", "cellSet name");
argList::validOptions.insert("geometry", "");
argList::validOptions.insert("tol", "edge snap tolerance");
argList::validOptions.insert("overwrite", "");
argList::validArgs.append("edge angle [0..360]");
# include "setRootCase.H"
@ -541,6 +542,7 @@ int main(int argc, char *argv[])
bool readSet = args.options().found("set");
bool geometry = args.options().found("geometry");
bool overwrite = args.options().found("overwrite");
scalar edgeTol = 0.2;
@ -574,7 +576,7 @@ int main(int argc, char *argv[])
// Cell circumference cutter
geomCellLooper cellCutter(mesh);
// Snap all edge cuts close to endpoints to vertices.
geomCellLooper::setSnapTol(edgeTol);
geomCellLooper::setSnapTol(edgeTol);
// Candidate cells to cut
cellSet cellsToCut(mesh, "cellsToCut", mesh.nCells()/100);
@ -612,7 +614,7 @@ int main(int argc, char *argv[])
minCos,
minSin,
cellsToCut,
cutCells,
cellLoops,
cellEdgeWeights
@ -669,7 +671,10 @@ int main(int argc, char *argv[])
// Do all changes
Info<< "Morphing ..." << endl;
runTime++;
if (!overwrite)
{
runTime++;
}
autoPtr<mapPolyMesh> morphMap = meshMod.changeMesh(mesh, false);

View File

@ -89,11 +89,13 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::validArgs.append("Neutral file");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
fileName neuFile(args.additionalArgs()[0]);
bool overwrite = args.options().found("overwrite");
IFstream str(neuFile);
@ -298,7 +300,10 @@ int main(int argc, char *argv[])
}
runTime++;
if (!overwrite)
{
runTime++;
}
polyMesh mesh
(
@ -321,7 +326,7 @@ int main(int argc, char *argv[])
Info<< "Writing mesh to " << runTime.constant() << endl << endl;
mesh.write();
Info<< "End\n" << endl;

View File

@ -43,12 +43,14 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("feature angle[0-180]");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.options().found("overwrite");
scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0);
@ -58,7 +60,10 @@ int main(int argc, char *argv[])
polyDualMesh dualMesh(mesh, minCos);
runTime++;
if (!overwrite)
{
runTime++;
}
Pout<< "Writing dualMesh to " << runTime.timeName() << endl;

View File

@ -75,12 +75,14 @@ int main(int argc, char *argv[])
{
argList::validArgs.append("file prefix");
argList::validOptions.insert("noFaceFile", "");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
bool readFaceFile = !args.options().found("noFaceFile");
bool overwrite = args.options().found("overwrite");
fileName prefix(args.additionalArgs()[0]);
@ -244,7 +246,7 @@ int main(int argc, char *argv[])
<< "Element attributes (third elemenent in .ele header)"
<< " not used" << endl;
}
const cellModel& tet = *(cellModeller::lookup("tet"));
@ -438,7 +440,7 @@ int main(int argc, char *argv[])
word defaultFacesType = polyPatch::typeName;
wordList patchPhysicalTypes(nPatches, polyPatch::typeName);
if (readFaceFile)
{
// Sort boundaryFaces by patch using boundaryPatch.
@ -464,7 +466,10 @@ int main(int argc, char *argv[])
Info<< endl;
}
runTime++;
if (!overwrite)
{
runTime++;
}
polyMesh mesh
(
@ -487,7 +492,7 @@ int main(int argc, char *argv[])
Info<< "Writing mesh to " << runTime.constant() << endl << endl;
mesh.write();
Info<< "End\n" << endl;

View File

@ -58,11 +58,13 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::validArgs.append("thickness");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
scalar thickness(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.options().found("overwrite");
// Check that mesh is 2D
@ -164,7 +166,7 @@ int main(int argc, char *argv[])
// Insert changes into meshMod
extruder.setRefinement
(
extrudeDir,
extrudeDir,
thickness,
frontPatchI,
meshMod
@ -175,7 +177,10 @@ int main(int argc, char *argv[])
mesh.updateMesh(morphMap);
runTime++;
if (!overwrite)
{
runTime++;
}
// Take over refinement levels and write to new time directory.
Pout<< "Writing extruded mesh to time " << runTime.timeName() << nl

View File

@ -42,12 +42,18 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::noParallel();
# include "setRootCase.H"
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
runTime++;
bool overwrite = args.options().found("overwrite");
if (!overwrite)
{
runTime++;
}
Info<< "Time = " << runTime.timeName() << nl
<< "Attaching sliding interface" << endl;

View File

@ -71,6 +71,7 @@ int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("feature angle[0-180]");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -88,6 +89,7 @@ int main(int argc, char *argv[])
boundaryMesh bMesh;
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
bool overwrite = args.options().found("overwrite");
scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0);
@ -106,7 +108,7 @@ int main(int argc, char *argv[])
collectFeatureEdges(bMesh, markedEdges);
// (new) patch ID for every face in mesh.
labelList patchIDs(bMesh.mesh().size(), -1);
@ -209,15 +211,18 @@ int main(int argc, char *argv[])
newPatchI,
mesh.boundaryMesh()
).ptr();
newPatchI++;
}
runTime++;
if (!overwrite)
{
runTime++;
}
// Change patches
repatchPolyTopoChanger polyMeshRepatcher(mesh);
repatchPolyTopoChanger polyMeshRepatcher(mesh);
polyMeshRepatcher.changePatches(newPatchPtrList);

View File

@ -54,6 +54,7 @@ int main(int argc, char *argv[])
{
argList::validArgs.append("set");
argList::validArgs.append("patch");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -81,6 +82,8 @@ int main(int argc, char *argv[])
<< "Cannot find patch " << patchName << exit(FatalError);
}
bool overwrite = args.options().found("overwrite");
// Read objects in time directory
IOobjectList objects(mesh, runTime.timeName());
@ -226,7 +229,10 @@ int main(int argc, char *argv[])
Pout<< "Converted locally " << nBaffled
<< " faces into boundary faces on patch " << patchName << nl << endl;
runTime++;
if (!overwrite)
{
runTime++;
}
// Change the mesh. Change points directly (no inflation).
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);

View File

@ -154,11 +154,13 @@ void filterPatches(polyMesh& mesh)
int main(int argc, char *argv[])
{
argList::noParallel();
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createPolyMesh.H"
bool overwrite = args.options().found("overwrite");
Info<< "Reading createPatchDict\n" << endl;
@ -355,7 +357,10 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);
runTime++;
if (!overwrite)
{
runTime++;
}
// Write resulting mesh
Info<< "Writing repatched mesh to " << runTime.timeName() << endl;

View File

@ -251,11 +251,13 @@ labelList getAllNonManifoldPoints
int main(int argc, char *argv[])
{
argList::validOptions.insert("split", "");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
bool split = args.options().found("split");
bool overwrite = args.options().found("overwrite");
// Collect all boundary faces
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
@ -402,7 +404,10 @@ int main(int argc, char *argv[])
insertDuplicateMerge(mesh, duplicates, meshMod);
}
runTime++;
if (!overwrite)
{
runTime++;
}
// Change the mesh. No inflation.
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);

View File

@ -294,6 +294,7 @@ label twoDNess(const polyMesh& mesh)
int main(int argc, char *argv[])
{
Foam::argList::validOptions.insert("dict", "");
Foam::argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -307,6 +308,7 @@ int main(int argc, char *argv[])
//
bool readDict = args.options().found("dict");
bool overwrite = args.options().found("overwrite");
// List of cells to refine
labelList refCells;
@ -413,7 +415,10 @@ int main(int argc, char *argv[])
string oldTimeName(runTime.timeName());
runTime++;
if (!overwrite)
{
runTime++;
}
// Multi-directional refinement (does multiple iterations)
@ -431,7 +436,7 @@ int main(int argc, char *argv[])
// Create cellSet with added cells for easy inspection
cellSet newCells(mesh, "refinedCells", refCells.size());
forAll(oldToNew, oldCellI)
{
const labelList& added = oldToNew[oldCellI];
@ -445,7 +450,7 @@ int main(int argc, char *argv[])
Pout<< "Writing refined cells (" << newCells.size() << ") to cellSet "
<< newCells.instance()/newCells.local()/newCells.name()
<< endl << endl;
newCells.write();
@ -473,7 +478,7 @@ int main(int argc, char *argv[])
+ runTime.timeName()
+ " to cells in mesh at "
+ oldTimeName;
forAll(oldToNew, oldCellI)
{
@ -500,7 +505,7 @@ int main(int argc, char *argv[])
// Some statistics.
printEdgeStats(mesh);
Info<< "End\n" << endl;

View File

@ -228,7 +228,7 @@ labelList regionFaceOrder
oldToNewFace[sortKey.indices()[i]] = newFaceI++;
}
}
}
// Leave patch faces intact.
for (label faceI = newFaceI; faceI < mesh.nFaces(); faceI++)
@ -368,7 +368,8 @@ int main(int argc, char *argv[])
argList::validOptions.insert("blockOrder", "");
argList::validOptions.insert("orderPoints", "");
argList::validOptions.insert("writeMaps", "");
argList::validOptions.insert("overwrite", "");
# include "addTimeOptions.H"
# include "setRootCase.H"
@ -411,6 +412,7 @@ int main(int argc, char *argv[])
<< endl;
}
bool overwrite = args.options().found("overwrite");
label band = getBand(mesh.faceOwner(), mesh.faceNeighbour());
@ -503,7 +505,7 @@ int main(int argc, char *argv[])
forAll(cellToRegion, cellI)
{
cellDist[cellI] = cellToRegion[cellI];
cellDist[cellI] = cellToRegion[cellI];
}
cellDist.write();
@ -528,7 +530,10 @@ int main(int argc, char *argv[])
)
);
runTime++;
if (!overwrite)
{
runTime++;
}
// Change the mesh.
map = reorderMesh(mesh, cellOrder, faceOrder);
@ -539,7 +544,10 @@ int main(int argc, char *argv[])
polyTopoChange meshMod(mesh);
runTime++;
if (!overwrite)
{
runTime++;
}
// Change the mesh.
map = meshMod.changeMesh

View File

@ -118,6 +118,7 @@ int main(int argc, char *argv[])
Foam::argList::validArgs.append("faceSet");
Foam::argList::validArgs.append("masterPatch");
Foam::argList::validArgs.append("slavePatch");
Foam::argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -126,6 +127,7 @@ int main(int argc, char *argv[])
word setName(args.additionalArgs()[0]);
word masterPatch(args.additionalArgs()[1]);
word slavePatch(args.additionalArgs()[2]);
bool overwrite = args.options().found("overwrite");
// List of faces to split
faceSet facesSet(mesh, setName);
@ -252,7 +254,10 @@ int main(int argc, char *argv[])
Info<< nl << "Constructed topologyModifier:" << endl;
splitter[0].writeDict(Info);
runTime++;
if (!overwrite)
{
runTime++;
}
splitter.attach();

View File

@ -720,7 +720,7 @@ autoPtr<mapPolyMesh> createRegionMesh
{
exposedPatchIDs[i] = interfaceToPatch[interface]+1;
}
}
}
}
// Remove faces
@ -1118,6 +1118,7 @@ int main(int argc, char *argv[])
argList::validOptions.insert("makeCellZones", "");
argList::validOptions.insert("largestOnly", "");
argList::validOptions.insert("insidePoint", "point");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
@ -1134,6 +1135,7 @@ int main(int argc, char *argv[])
bool largestOnly = args.options().found("largestOnly");
bool insidePoint = args.options().found("insidePoint");
bool useCellZones = args.options().found("cellZones");
bool overwrite = args.options().found("overwrite");
if (insidePoint && largestOnly)
{
@ -1469,7 +1471,11 @@ int main(int argc, char *argv[])
}
}
mesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
runTime++;
if (!overwrite)
{
runTime++;
}
Info<< "Writing cellZones as new mesh to time " << runTime.timeName()
<< nl << endl;
@ -1510,7 +1516,10 @@ int main(int argc, char *argv[])
);
runTime++;
if (!overwrite)
{
runTime++;
}
// Create regions

View File

@ -131,6 +131,8 @@ int main(int argc, char *argv[])
Foam::argList::validOptions.insert("partial", "");
Foam::argList::validOptions.insert("perfect", "");
Foam::argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
@ -141,6 +143,7 @@ int main(int argc, char *argv[])
bool partialCover = args.options().found("partial");
bool perfectCover = args.options().found("perfect");
bool overwrite = args.options().found("overwrite");
if (partialCover && perfectCover)
{
@ -349,7 +352,7 @@ int main(int argc, char *argv[])
IOobjectList objects(mesh, runTime.timeName());
// Read all current fvFields so they will get mapped
Info<< "Reading all current volfields" << endl;
Info<< "Reading all current volfields" << endl;
PtrList<volScalarField> volScalarFields;
readFields(mesh, objects, volScalarFields);
@ -366,7 +369,7 @@ int main(int argc, char *argv[])
readFields(mesh, objects, volTensorFields);
//- uncomment if you want to interpolate surface fields (usually bad idea)
//Info<< "Reading all current surfaceFields" << endl;
//Info<< "Reading all current surfaceFields" << endl;
//PtrList<surfaceScalarField> surfaceScalarFields;
//readFields(mesh, objects, surfaceScalarFields);
//
@ -376,7 +379,10 @@ int main(int argc, char *argv[])
//PtrList<surfaceTensorField> surfaceTensorFields;
//readFields(mesh, objects, surfaceTensorFields);
runTime++;
if (!overwrite)
{
runTime++;
}
// Execute all polyMeshModifiers
autoPtr<mapPolyMesh> morphMap = stitcher.changeMesh(true);

View File

@ -60,7 +60,7 @@ void subsetVolFields
Info<< "Subsetting field " << fieldName << endl;
GeometricField<Type, fvPatchField, volMesh> fld
GeometricField<Type, fvPatchField, volMesh> fld
(
IOobject
(
@ -94,7 +94,7 @@ void subsetSurfaceFields
Info<< "Subsetting field " << fieldName << endl;
GeometricField<Type, fvsPatchField, surfaceMesh> fld
GeometricField<Type, fvsPatchField, surfaceMesh> fld
(
IOobject
(
@ -129,7 +129,7 @@ void subsetPointFields
Info<< "Subsetting field " << fieldName << endl;
GeometricField<Type, pointPatchField, pointMesh> fld
GeometricField<Type, pointPatchField, pointMesh> fld
(
IOobject
(
@ -153,12 +153,14 @@ int main(int argc, char *argv[])
{
argList::validArgs.append("set");
argList::validOptions.insert("patch", "patch name");
argList::validOptions.insert("overwrite", "");
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
word setName(args.additionalArgs()[0]);
bool overwrite = args.options().found("overwrite");
Info<< "Reading cell set from " << setName << endl << endl;
@ -324,14 +326,17 @@ int main(int argc, char *argv[])
// Write mesh and fields to new time
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
runTime++;
if (!overwrite)
{
runTime++;
}
Info<< "Writing subsetted mesh and fields to time " << runTime.value()
<< endl;
subsetter.subMesh().write();
// Subsetting adds 'subset' prefix. Rename field to be like original.
// Subsetting adds 'subset' prefix. Rename field to be like original.
forAll(scalarFlds, i)
{
scalarFlds[i].rename(scalarNames[i]);