Commit 89869371 authored by Henry Weller's avatar Henry Weller
Browse files

Rationalize the autoMesh library: autoHexMesh -> snappyHexMesh

autoRefine -> snappyRefine
autoLayer -> snappyLayer
autoSnap -> snappySnap
parent 83800449
autoRefineMesh.C
snappyRefineMesh.C
EXE = $(FOAM_APPBIN)/autoRefineMesh
EXE = $(FOAM_APPBIN)/snappyRefineMesh
......@@ -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
......@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
autoRefineMesh
snappyRefineMesh
Description
Utility to refine cells near to a surface.
......@@ -670,7 +670,7 @@ int main(int argc, char *argv[])
(
IOobject
(
"autoRefineMeshDict",
"snappyRefineMeshDict",
runTime.system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
......
......@@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
object autoRefineMeshDict;
object snappyRefineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -32,9 +32,9 @@ Description
#include "argList.H"
#include "Time.H"
#include "fvMesh.H"
#include "autoRefineDriver.H"
#include "autoSnapDriver.H"
#include "autoLayerDriver.H"
#include "snappyRefineDriver.H"
#include "snappySnapDriver.H"
#include "snappyLayerDriver.H"
#include "searchableSurfaces.H"
#include "refinementSurfaces.H"
#include "refinementFeatures.H"
......@@ -868,9 +868,9 @@ int main(int argc, char *argv[])
if (debugLevel > 0)
{
meshRefinement::debug = debugLevel;
autoRefineDriver::debug = debugLevel;
autoSnapDriver::debug = debugLevel;
autoLayerDriver::debug = debugLevel;
snappyRefineDriver::debug = debugLevel;
snappySnapDriver::debug = debugLevel;
snappyLayerDriver::debug = debugLevel;
}
// Set file writing level
......@@ -1326,7 +1326,7 @@ int main(int argc, char *argv[])
{
cpuTime timer;
autoRefineDriver refineDriver
snappyRefineDriver refineDriver
(
meshRefiner,
decomposer,
......@@ -1367,7 +1367,7 @@ int main(int argc, char *argv[])
{
cpuTime timer;
autoSnapDriver snapDriver
snappySnapDriver snapDriver
(
meshRefiner,
globalToMasterPatch,
......@@ -1408,7 +1408,7 @@ int main(int argc, char *argv[])
{
cpuTime timer;
autoLayerDriver layerDriver
snappyLayerDriver layerDriver
(
meshRefiner,
globalToMasterPatch,
......
......@@ -313,10 +313,10 @@ DebugSwitches
atomizationModel 0;
attachDetach 0;
autoDensity 0;
autoHexMeshDriver 0;
autoLayerDriver 0;
autoRefineDriver 0;
autoSnapDriver 0;
snappyHexMeshDriver 0;
snappyLayerDriver 0;
snappyRefineDriver 0;
snappySnapDriver 0;
bC11H10 0;
backgroundMeshDecomposition 0;
backward 0;
......
autoHexMeshDriver/autoLayerDriver.C
/* autoHexMeshDriver/autoLayerDriverShrink.C */
autoHexMeshDriver/autoSnapDriver.C
autoHexMeshDriver/autoSnapDriverFeature.C
autoHexMeshDriver/autoRefineDriver.C
snappyHexMeshDriver/snappyLayerDriver.C
/* snappyHexMeshDriver/snappyLayerDriverShrink.C */
snappyHexMeshDriver/snappySnapDriver.C
snappyHexMeshDriver/snappySnapDriverFeature.C
snappyHexMeshDriver/snappyRefineDriver.C
autoHexMeshDriver/layerParameters/layerParameters.C
autoHexMeshDriver/refinementParameters/refinementParameters.C
autoHexMeshDriver/snapParameters/snapParameters.C
autoHexMeshDriver/pointData/pointData.C
snappyHexMeshDriver/layerParameters/layerParameters.C
snappyHexMeshDriver/refinementParameters/refinementParameters.C
snappyHexMeshDriver/snapParameters/snapParameters.C
snappyHexMeshDriver/pointData/pointData.C
meshRefinement/meshRefinementBaffles.C
meshRefinement/meshRefinement.C
......
......@@ -862,18 +862,18 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion
(
const label patchPointI,
pointField& patchDisp,
List<autoLayerDriver::extrudeMode>& extrudeStatus
List<snappyLayerDriver::extrudeMode>& extrudeStatus
)
{
if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDE)
if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
{
extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
patchDisp[patchPointI] = vector::zero;
return true;
}
else if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDEREMOVE)
else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
{
extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
patchDisp[patchPointI] = vector::zero;
return true;
}
......@@ -888,7 +888,7 @@ void Foam::medialAxisMeshMover::syncPatchDisplacement
(
const scalarField& minThickness,
pointField& patchDisp,
List<autoLayerDriver::extrudeMode>& extrudeStatus
List<snappyLayerDriver::extrudeMode>& extrudeStatus
) const
{
const indirectPrimitivePatch& pp = adaptPatchPtr_();
......@@ -1081,7 +1081,7 @@ handleFeatureAngleLayerTerminations
const scalar minCos,
const PackedBoolList& isPatchMasterPoint,
const labelList& meshEdges,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp,
label& nPointCounter
) const
......@@ -1099,7 +1099,7 @@ handleFeatureAngleLayerTerminations
forAll(f, fp)
{
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
{
extrudedFaces[faceI] = false;
break;
......@@ -1168,8 +1168,8 @@ handleFeatureAngleLayerTerminations
if
(
extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE
|| extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE
extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE
|| extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE
)
{
if (!eFaceExtrude[0] || !eFaceExtrude[1])
......@@ -1215,7 +1215,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
const PackedBoolList& isPatchMasterEdge,
const labelList& meshEdges,
const scalarField& minThickness,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp
) const
{
......@@ -1288,7 +1288,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
forAll(f, fp)
{
if (extrudeStatus[f[fp]] != autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[f[fp]] != snappyLayerDriver::NOEXTRUDE)
{
if (islandPoint[faceI] == -1)
{
......@@ -1312,7 +1312,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
// Check all surrounding faces that I am the islandPoint
forAll(pointFaces, patchPointI)
{
if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
{
const labelList& pFaces = pointFaces[patchPointI];
......@@ -1340,7 +1340,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
const face& f = pp.localFaces()[faceI];
forAll(f, fp)
{
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
{
extrudedFaces[faceI] = false;
break;
......@@ -1419,11 +1419,11 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
label v0 = e[0];
label v1 = e[1];
if (extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE)
{
isolatedPoint[v0] += 1;
}
if (extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE)
{
isolatedPoint[v1] += 1;
}
......@@ -1458,7 +1458,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
{
forAll(f, fp)
{
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
{
allPointsExtruded = false;
break;
......@@ -1700,7 +1700,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
(
const dictionary& coeffDict,
const scalarField& minThickness,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp
)
{
......@@ -1794,7 +1794,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
forAll(thickness, patchPointI)
{
if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
{
thickness[patchPointI] = 0.0;
}
......@@ -1843,7 +1843,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
forAll(meshPoints, patchPointI)
{
if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
{
label pointI = meshPoints[patchPointI];
......@@ -1937,7 +1937,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
// Update thickess for changed extrusion
forAll(thickness, patchPointI)
{
if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
{
thickness[patchPointI] = 0.0;
}
......@@ -2146,16 +2146,16 @@ bool Foam::medialAxisMeshMover::move
pp.meshPoints()
);
List<autoLayerDriver::extrudeMode> extrudeStatus
List<snappyLayerDriver::extrudeMode> extrudeStatus
(
pp.nPoints(),
autoLayerDriver::EXTRUDE
snappyLayerDriver::EXTRUDE
);
forAll(extrudeStatus, pointI)
{
if (mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
{
extrudeStatus[pointI] = autoLayerDriver::NOEXTRUDE;
extrudeStatus[pointI] = snappyLayerDriver::NOEXTRUDE;
}
}
......
......@@ -43,7 +43,7 @@ SourceFiles
#include "externalDisplacementMeshMover.H"
#include "motionSmootherAlgo.H"
#include "autoLayerDriver.H"
#include "snappyLayerDriver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -150,7 +150,7 @@ class medialAxisMeshMover
(
const label patchPointI,
pointField& patchDisp,
List<autoLayerDriver::extrudeMode>& extrudeStatus
List<snappyLayerDriver::extrudeMode>& extrudeStatus
);
//- Synchronise extrusion
......@@ -158,7 +158,7 @@ class medialAxisMeshMover
(
const scalarField& minThickness,
pointField& patchDisp,
List<autoLayerDriver::extrudeMode>& extrudeStatus
List<snappyLayerDriver::extrudeMode>& extrudeStatus
) const;
void smoothLambdaMuDisplacement
......@@ -184,7 +184,7 @@ class medialAxisMeshMover
const scalar minCos,
const PackedBoolList& isMasterPoint,
const labelList& meshEdges,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp,
label& nPointCounter
) const;
......@@ -200,7 +200,7 @@ class medialAxisMeshMover
const PackedBoolList& isMasterEdge,
const labelList& meshEdges,
const scalarField& minThickness,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp
) const;
......@@ -212,7 +212,7 @@ class medialAxisMeshMover
(
const dictionary&,
const scalarField& minThickness,
List<autoLayerDriver::extrudeMode>& extrudeStatus,
List<snappyLayerDriver::extrudeMode>& extrudeStatus,
pointField& patchDisp
);
......
......@@ -36,7 +36,7 @@ License
#include "polyMeshGeometry.H"
#include "IOmanip.H"
#include "unitConversion.H"
#include "autoSnapDriver.H"
#include "snappySnapDriver.H"
#include "snapParameters.H"
#include "motionSmoother.H"
......@@ -1090,7 +1090,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
{
pointField oldPoints(mesh_.points());
// Repeat (most of) autoSnapDriver::doSnap
// Repeat (most of) snappySnapDriver::doSnap
{
labelList adaptPatchIDs(meshedPatches());
......@@ -1108,7 +1108,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
// Distance to attract to nearest feature on surface
const scalarField snapDist
(
autoSnapDriver::calcSnapDistance(mesh_, snapParams, pp)
snappySnapDriver::calcSnapDistance(mesh_, snapParams, pp)
);
......@@ -1147,7 +1147,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
<< mesh_.time().cpuTimeIncrement() << " s\n" << nl << endl;
// Pre-smooth patch vertices (so before determining nearest)
autoSnapDriver::preSmoothPatch
snappySnapDriver::preSmoothPatch
(
*this,
snapParams,
......@@ -1160,7 +1160,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
vectorField nearestNormal;
const vectorField disp
(
autoSnapDriver::calcNearestSurface
snappySnapDriver::calcNearestSurface
(
*this,
snapDist, // attraction
......
......@@ -26,7 +26,7 @@ Description
\*----------------------------------------------------------------------------*/
#include "autoLayerDriver.H"
#include "snappyLayerDriver.H"
#include "fvMesh.H"
#include "Time.H"
#include "meshRefinement.H"
......@@ -65,7 +65,7 @@ Description
namespace Foam
{
defineTypeNameAndDebug(autoLayerDriver, 0);
defineTypeNameAndDebug(snappyLayerDriver, 0);
} // End namespace Foam
......@@ -73,7 +73,7 @@ defineTypeNameAndDebug(autoLayerDriver, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// For debugging: Dump displacement to .obj files
void Foam::autoLayerDriver::dumpDisplacement
void Foam::snappyLayerDriver::dumpDisplacement
(
const fileName& prefix,
const indirectPrimitivePatch& pp,
......@@ -105,7 +105,7 @@ void Foam::autoLayerDriver::dumpDisplacement
}
Foam::tmp<Foam::scalarField> Foam::autoLayerDriver::avgPointData
Foam::tmp<Foam::scalarField> Foam::snappyLayerDriver::avgPointData
(
const indirectPrimitivePatch& pp,
const scalarField& pointFld
......@@ -132,7 +132,7 @@ Foam::tmp<Foam::scalarField> Foam::autoLayerDriver::avgPointData
// Check that primitivePatch is not multiply connected. Collect non-manifold
// points in pointSet.
void Foam::autoLayerDriver::checkManifold
void Foam::snappyLayerDriver::checkManifold
(
const indirectPrimitivePatch& fp,
pointSet& nonManifoldPoints
......@@ -159,7 +159,7 @@ void Foam::autoLayerDriver::checkManifold
}
void Foam::autoLayerDriver::checkMeshManifold() const
void Foam::snappyLayerDriver::checkMeshManifold() const
{
const fvMesh& mesh = meshRefiner_.mesh();
......@@ -213,7 +213,7 @@ void Foam::autoLayerDriver::checkMeshManifold() const
// Unset extrusion on point. Returns true if anything unset.
bool Foam::autoLayerDriver::unmarkExtrusion
bool Foam::snappyLayerDriver::unmarkExtrusion
(
const label patchPointI,
pointField& patchDisp,
......@@ -243,7 +243,7 @@ bool Foam::autoLayerDriver::unmarkExtrusion
// Unset extrusion on face. Returns true if anything unset.
bool Foam::autoLayerDriver::unmarkExtrusion
bool Foam::snappyLayerDriver::unmarkExtrusion
(
const face& localFace,
pointField& patchDisp,
......@@ -274,7 +274,7 @@ bool Foam::autoLayerDriver::unmarkExtrusion
// No extrusion at non-manifold points.
void Foam::autoLayerDriver::handleNonManifolds
void Foam::snappyLayerDriver::handleNonManifolds
(
const indirectPrimitivePatch& pp,
const labelList& meshEdges,
......@@ -385,7 +385,7 @@ void Foam::autoLayerDriver::handleNonManifolds
// Parallel feature edge detection. Assumes non-manifold edges already handled.
void Foam::autoLayerDriver::handleFeatureAngle
void Foam::snappyLayerDriver::handleFeatureAngle
(
const indirectPrimitivePatch& pp,
const labelList& meshEdges,
......@@ -504,7 +504,7 @@ void Foam::autoLayerDriver::handleFeatureAngle
// layer and compares it to the space the warped face takes up. Disables
// extrusion if layer thickness is more than faceRatio of the thickness of
// the face.
void Foam::autoLayerDriver::handleWarpedFaces
void Foam::snappyLayerDriver::handleWarpedFaces
(
const indirectPrimitivePatch& pp,
const scalar faceRatio,
......@@ -578,7 +578,7 @@ void Foam::autoLayerDriver::handleWarpedFaces
//// No extrusion on cells with multiple patch faces. There ususally is a reason
//// why combinePatchFaces hasn't succeeded.
//void Foam::autoLayerDriver::handleMultiplePatchFaces
//void Foam::snappyLayerDriver::handleMultiplePatchFaces
//(
// const indirectPrimitivePatch& pp,
// pointField& patchDisp,
......@@ -679,7 +679,7 @@ void Foam::autoLayerDriver::handleWarpedFaces
//}
void Foam::autoLayerDriver::setNumLayers
void Foam::snappyLayerDriver::setNumLayers
(
const labelList& patchToNLayers,
const labelList& patchIDs,
......@@ -803,7 +803,7 @@ void Foam::autoLayerDriver::setNumLayers
// Construct pointVectorField with correct boundary conditions for adding
// layers
Foam::tmp<Foam::pointVectorField>
Foam::autoLayerDriver::makeLayerDisplacementField
Foam::snappyLayerDriver::makeLayerDisplacementField
(
const pointMesh& pMesh,
const labelList& numLayers
......@@ -877,7 +877,7 @@ Foam::autoLayerDriver::makeLayerDisplacementField
}
void Foam::autoLayerDriver::growNoExtrusion
void Foam::snappyLayerDriver::growNoExtrusion
(
const indirectPrimitivePatch& pp,
pointField& patchDisp,
......@@ -967,7 +967,7 @@ void Foam::autoLayerDriver::growNoExtrusion
}
void Foam::autoLayerDriver::determineSidePatches
void Foam::snappyLayerDriver::determineSidePatches
(
const globalIndex& globalFaces,
const labelListList& edgeGlobalFaces,
......@@ -1057,7 +1057,7 @@ void Foam::autoLayerDriver::determineSidePatches
}
void Foam::autoLayerDriver::calculateLayerThickness
void Foam::snappyLayerDriver::calculateLayerThickness
(
const indirectPrimitivePatch& pp,
const labelList& patchIDs,
......@@ -1345,7 +1345,7 @@ void Foam::autoLayerDriver::calculateLayerThickness
// Synchronize displacement among coupled patches.
void Foam::autoLayerDriver::syncPatchDisplacement
void Foam::snappyLayerDriver::syncPatchDisplacement
(
const indirectPrimitivePatch& pp,
const scalarField& minThickness,
......@@ -1476,7 +1476,7 @@ void Foam::autoLayerDriver::syncPatchDisplacement
// of the faces using it.
// extrudeStatus is both input and output and gives the status of each
// patch point.
void Foam::autoLayerDriver::getPatchDisplacement
void Foam::snappyLayerDriver::getPatchDisplacement
(
const indirectPrimitivePatch& pp,
const scalarField& thickness,
......@@ -1612,7 +1612,7 @@ void Foam::autoLayerDriver::getPatchDisplacement
}
bool Foam::autoLayerDriver::sameEdgeNeighbour
bool Foam::snappyLayerDriver::sameEdgeNeighbour
(
const labelListList& globalEdgeFaces,
const label myGlobalFaceI,
......@@ -1632,7 +1632,7 @@ bool Foam::autoLayerDriver::sameEdgeNeighbour
}
void Foam::autoLayerDriver::getVertexString
void Foam::snappyLayerDriver::getVertexString
(
const indirectPrimitivePatch& pp,
const labelListList& globalEdgeFaces,
......@@ -1711,7 +1711,7 @@ void Foam::autoLayerDriver::getVertexString
// Truncates displacement
// - for all patchFaces in the faceset displacement gets set to zero
// - all displacement < minThickness gets set to zero
Foam::label Foam::autoLayerDriver::truncateDisplacement
Foam::label Foam::snappyLayerDriver::truncateDisplacement
(