mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRG: Integrated Foundation code to commit ba4dbed
This commit is contained in:
@ -48,4 +48,3 @@
|
||||
}
|
||||
|
||||
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
||||
|
||||
|
||||
@ -48,4 +48,3 @@
|
||||
}
|
||||
|
||||
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -468,7 +468,8 @@ void readCells
|
||||
IOWarningInFunction(is)
|
||||
<< "Cell type " << feID << " not supported" << endl;
|
||||
}
|
||||
is.getLine(line); // Do nothing
|
||||
|
||||
is.getLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -82,6 +82,11 @@ int main(int argc, char *argv[])
|
||||
"blockTopology",
|
||||
"write block edges and centres as .obj files"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noClean",
|
||||
"keep the existing files in the polyMesh"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
@ -171,6 +176,30 @@ int main(int argc, char *argv[])
|
||||
dictPath = runTime.system()/regionPath/dictName;
|
||||
}
|
||||
|
||||
if (!args.optionFound("noClean"))
|
||||
{
|
||||
fileName polyMeshPath
|
||||
(
|
||||
runTime.path()/runTime.constant()/regionPath/polyMesh::meshSubDir
|
||||
);
|
||||
|
||||
if (exists(polyMeshPath))
|
||||
{
|
||||
if (exists(polyMeshPath/dictName))
|
||||
{
|
||||
Info<< "Not deleting polyMesh directory " << nl
|
||||
<< " " << polyMeshPath << nl
|
||||
<< " because it contains " << dictName << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Deleting polyMesh directory" << nl
|
||||
<< " " << polyMeshPath << endl;
|
||||
rmDir(polyMeshPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IOobject meshDictIO
|
||||
(
|
||||
dictPath,
|
||||
|
||||
@ -666,15 +666,6 @@ void writeMesh
|
||||
}
|
||||
refinementHistory::removeFiles(mesh);
|
||||
|
||||
//label flag = meshRefinement::MESH;
|
||||
//if (writeLevel)
|
||||
//{
|
||||
// flag |= meshRefinement::SCALARLEVELS;
|
||||
//}
|
||||
//if (debug & meshRefinement::OBJINTERSECTIONS)
|
||||
//{
|
||||
// flag |= meshRefinement::OBJINTERSECTIONS;
|
||||
//}
|
||||
meshRefiner.write
|
||||
(
|
||||
debugLevel,
|
||||
@ -726,117 +717,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
autoPtr<fvMesh> meshPtr;
|
||||
|
||||
// if (surfaceSimplify)
|
||||
// {
|
||||
// IOdictionary foamyHexMeshDict
|
||||
// (
|
||||
// IOobject
|
||||
// (
|
||||
// "foamyHexMeshDict",
|
||||
// runTime.system(),
|
||||
// runTime,
|
||||
// IOobject::MUST_READ_IF_MODIFIED,
|
||||
// IOobject::NO_WRITE
|
||||
// )
|
||||
// );
|
||||
//
|
||||
// const dictionary& motionDict =
|
||||
// foamyHexMeshDict.subDict("motionControl");
|
||||
//
|
||||
// const scalar defaultCellSize =
|
||||
// readScalar(motionDict.lookup("defaultCellSize"));
|
||||
//
|
||||
// Info<< "Constructing single cell mesh from boundBox" << nl << endl;
|
||||
//
|
||||
// boundBox bb(args.optionRead<boundBox>("surfaceSimplify"));
|
||||
//
|
||||
// labelList owner(6, label(0));
|
||||
// labelList neighbour(0);
|
||||
//
|
||||
// const cellModel& hexa = *(cellModeller::lookup("hex"));
|
||||
// faceList faces = hexa.modelFaces();
|
||||
//
|
||||
// meshPtr.set
|
||||
// (
|
||||
// new fvMesh
|
||||
// (
|
||||
// IOobject
|
||||
// (
|
||||
// fvMesh::defaultRegion,
|
||||
// runTime.timeName(),
|
||||
// runTime,
|
||||
// IOobject::NO_READ
|
||||
// ),
|
||||
// xferMove<Field<vector>>(bb.points()()),
|
||||
// faces.xfer(),
|
||||
// owner.xfer(),
|
||||
// neighbour.xfer()
|
||||
// )
|
||||
// );
|
||||
//
|
||||
// List<polyPatch*> patches(1);
|
||||
//
|
||||
// patches[0] = new wallPolyPatch
|
||||
// (
|
||||
// "boundary",
|
||||
// 6,
|
||||
// 0,
|
||||
// 0,
|
||||
// meshPtr().boundaryMesh(),
|
||||
// wallPolyPatch::typeName
|
||||
// );
|
||||
//
|
||||
// meshPtr().addFvPatches(patches);
|
||||
//
|
||||
// const scalar initialCellSize = ::pow(meshPtr().V()[0], 1.0/3.0);
|
||||
// const label initialRefLevels =
|
||||
// ::log(initialCellSize/defaultCellSize)/::log(2);
|
||||
//
|
||||
// Info<< "Default cell size = " << defaultCellSize << endl;
|
||||
// Info<< "Initial cell size = " << initialCellSize << endl;
|
||||
//
|
||||
// Info<< "Initial refinement levels = " << initialRefLevels << endl;
|
||||
//
|
||||
// Info<< "Mesh starting size = " << meshPtr().nCells() << endl;
|
||||
//
|
||||
// // meshCutter must be destroyed before writing the mesh otherwise it
|
||||
// // writes the cellLevel/pointLevel files
|
||||
// {
|
||||
// hexRef8 meshCutter(meshPtr(), false);
|
||||
//
|
||||
// for (label refinei = 0; refinei < initialRefLevels; ++refinei)
|
||||
// {
|
||||
// // Mesh changing engine.
|
||||
// polyTopoChange meshMod(meshPtr(), true);
|
||||
//
|
||||
// // Play refinement commands into mesh changer.
|
||||
// meshCutter.setRefinement
|
||||
// (
|
||||
// identity(meshPtr().nCells()),
|
||||
// meshMod
|
||||
// );
|
||||
//
|
||||
// // Create mesh (no inflation), return map from old to new mesh
|
||||
// autoPtr<mapPolyMesh> map =
|
||||
// meshMod.changeMesh(meshPtr(), false);
|
||||
//
|
||||
// // Update fields
|
||||
// meshPtr().updateMesh(map);
|
||||
//
|
||||
// // Delete mesh volumes.
|
||||
// meshPtr().clearOut();
|
||||
//
|
||||
// Info<< "Refinement Iteration " << refinei + 1
|
||||
// << ", Mesh size = " << meshPtr().nCells() << endl;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Info<< "Mesh end size = " << meshPtr().nCells() << endl;
|
||||
//
|
||||
// Info<< "Create mesh" << endl;
|
||||
// meshPtr().write();
|
||||
// }
|
||||
// else
|
||||
{
|
||||
word regionName;
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -87,10 +87,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createNamedPolyMesh.H"
|
||||
|
||||
const fileName setsSubPath(mesh.dbDir()/polyMesh::meshSubDir/"sets");
|
||||
|
||||
// Search for list of objects for the time of the mesh
|
||||
word setsInstance = runTime.findInstance
|
||||
(
|
||||
polyMesh::meshSubDir/"sets",
|
||||
setsSubPath,
|
||||
word::null,
|
||||
IOobject::MUST_READ,
|
||||
mesh.facesInstance()
|
||||
@ -98,7 +100,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
IOobjectList objects(mesh, setsInstance, polyMesh::meshSubDir/"sets");
|
||||
|
||||
Info<< "Searched : " << setsInstance/polyMesh::meshSubDir/"sets"
|
||||
Info<< "Searched : " << setsInstance/setsSubPath
|
||||
<< nl
|
||||
<< "Found : " << objects.names() << nl
|
||||
<< endl;
|
||||
|
||||
Reference in New Issue
Block a user