mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Change name from cvMesh to foamyHexMesh
This commit is contained in:
@ -11,7 +11,7 @@ wmake snappyHexMesh
|
|||||||
|
|
||||||
if [ -d "$CGAL_ARCH_PATH" ]
|
if [ -d "$CGAL_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
cvMesh/Allwmake
|
foamyHexMesh/Allwmake
|
||||||
cv2DMesh/Allwmake
|
cv2DMesh/Allwmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
cvMesh.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/cvMesh
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
foamyHexMesh.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/foamyHexMesh
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -345,7 +345,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
labelList owner(Triangulation::number_of_finite_facets());
|
labelList owner(Triangulation::number_of_finite_facets());
|
||||||
labelList neighbour(Triangulation::number_of_finite_facets());
|
labelList neighbour(Triangulation::number_of_finite_facets());
|
||||||
|
|
||||||
wordList patchNames(1, "cvMesh_defaultPatch");
|
wordList patchNames(1, "foamyHexMesh_defaultPatch");
|
||||||
wordList patchTypes(1, wallPolyPatch::typeName);
|
wordList patchTypes(1, wallPolyPatch::typeName);
|
||||||
|
|
||||||
PtrList<dictionary> patchDicts(1);
|
PtrList<dictionary> patchDicts(1);
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -608,7 +608,8 @@ bool Foam::backgroundMeshDecomposition::refineCell
|
|||||||
}
|
}
|
||||||
else if (volType == volumeType::INSIDE)
|
else if (volType == volumeType::INSIDE)
|
||||||
{
|
{
|
||||||
// scalar s = cvMesh_.cellShapeControl_.cellSize(cellBb.midpoint());
|
// scalar s =
|
||||||
|
// foamyHexMesh_.cellShapeControl_.cellSize(cellBb.midpoint());
|
||||||
|
|
||||||
// Estimate the number of points in the cell by the size at the cell
|
// Estimate the number of points in the cell by the size at the cell
|
||||||
// midpoint
|
// midpoint
|
||||||
@ -835,7 +836,7 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition
|
|||||||
"Foam::backgroundMeshDecomposition::backgroundMeshDecomposition"
|
"Foam::backgroundMeshDecomposition::backgroundMeshDecomposition"
|
||||||
"("
|
"("
|
||||||
"const dictionary& coeffsDict, "
|
"const dictionary& coeffsDict, "
|
||||||
"const conformalVoronoiMesh& cvMesh"
|
"const conformalVoronoiMesh& foamyHexMesh"
|
||||||
")"
|
")"
|
||||||
)
|
)
|
||||||
<< "This cannot be used when not running in parallel."
|
<< "This cannot be used when not running in parallel."
|
||||||
@ -197,7 +197,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components in cvMesh operation
|
//- Construct from components in foamyHexMesh operation
|
||||||
backgroundMeshDecomposition
|
backgroundMeshDecomposition
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
@ -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-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,17 +47,20 @@ defineTypeNameAndDebug(cellShapeControl, 0);
|
|||||||
Foam::cellShapeControl::cellShapeControl
|
Foam::cellShapeControl::cellShapeControl
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const cvControls& cvMeshControls,
|
const cvControls& foamyHexMeshControls,
|
||||||
const searchableSurfaces& allGeometry,
|
const searchableSurfaces& allGeometry,
|
||||||
const conformationSurfaces& geometryToConformTo
|
const conformationSurfaces& geometryToConformTo
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dictionary(cvMeshControls.cvMeshDict().subDict("motionControl")),
|
dictionary
|
||||||
|
(
|
||||||
|
foamyHexMeshControls.foamyHexMeshDict().subDict("motionControl")
|
||||||
|
),
|
||||||
runTime_(runTime),
|
runTime_(runTime),
|
||||||
allGeometry_(allGeometry),
|
allGeometry_(allGeometry),
|
||||||
geometryToConformTo_(geometryToConformTo),
|
geometryToConformTo_(geometryToConformTo),
|
||||||
defaultCellSize_(cvMeshControls.defaultCellSize()),
|
defaultCellSize_(foamyHexMeshControls.defaultCellSize()),
|
||||||
minimumCellSize_(cvMeshControls.minimumCellSize()),
|
minimumCellSize_(foamyHexMeshControls.minimumCellSize()),
|
||||||
shapeControlMesh_(runTime),
|
shapeControlMesh_(runTime),
|
||||||
aspectRatio_(*this),
|
aspectRatio_(*this),
|
||||||
sizeAndAlignment_
|
sizeAndAlignment_
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
cellShapeControl
|
cellShapeControl
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const cvControls& cvMeshControls,
|
const cvControls& foamyHexMeshControls,
|
||||||
const searchableSurfaces& allGeometry,
|
const searchableSurfaces& allGeometry,
|
||||||
const conformationSurfaces& geometryToConformTo
|
const conformationSurfaces& geometryToConformTo
|
||||||
);
|
);
|
||||||
@ -90,7 +90,7 @@ defineTypeNameAndDebug(cellShapeControlMesh, 0);
|
|||||||
//
|
//
|
||||||
// const tensor Rp = rotationTensor(vector(0,0,1), np);
|
// const tensor Rp = rotationTensor(vector(0,0,1), np);
|
||||||
//
|
//
|
||||||
// const label s = 36;//cvMeshControls().alignmentSearchSpokes();
|
// const label s = 36;//foamyHexMeshControls().alignmentSearchSpokes();
|
||||||
//
|
//
|
||||||
// scalar closestSpokeHitDistance = GREAT;
|
// scalar closestSpokeHitDistance = GREAT;
|
||||||
//
|
//
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,7 +78,7 @@ void Foam::conformalVoronoiMesh::cellSizeMeshOverlapsBackground() const
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Pout<< "Cell Size Mesh Bounds = " << cellSizeMesh.bounds() << endl;
|
Pout<< "Cell Size Mesh Bounds = " << cellSizeMesh.bounds() << endl;
|
||||||
Pout<< "cvMesh Bounds = " << bb << endl;
|
Pout<< "foamyHexMesh Bounds = " << bb << endl;
|
||||||
|
|
||||||
fullyContained = false;
|
fullyContained = false;
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ void Foam::conformalVoronoiMesh::insertSurfacePointPairs
|
|||||||
|
|
||||||
insertPoints(pts, true);
|
insertPoints(pts, true);
|
||||||
|
|
||||||
if (cvMeshControls().objOutput() && fName != fileName::null)
|
if (foamyHexMeshControls().objOutput() && fName != fileName::null)
|
||||||
{
|
{
|
||||||
writePoints(fName, pts);
|
writePoints(fName, pts);
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ void Foam::conformalVoronoiMesh::insertEdgePointGroups
|
|||||||
|
|
||||||
insertPoints(pts, true);
|
insertPoints(pts, true);
|
||||||
|
|
||||||
if (cvMeshControls().objOutput() && fName != fileName::null)
|
if (foamyHexMeshControls().objOutput() && fName != fileName::null)
|
||||||
{
|
{
|
||||||
writePoints(fName, pts);
|
writePoints(fName, pts);
|
||||||
}
|
}
|
||||||
@ -439,12 +439,12 @@ void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dictionary& motionControlDict
|
||||||
|
= foamyHexMeshControls().foamyHexMeshDict().subDict("motionControl");
|
||||||
|
|
||||||
label nMaxIter = readLabel
|
label nMaxIter = readLabel
|
||||||
(
|
(
|
||||||
cvMeshControls().cvMeshDict().subDict("motionControl").lookup
|
motionControlDict.lookup("maxRefinementIterations")
|
||||||
(
|
|
||||||
"maxRefinementIterations"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Maximum number of refinement iterations : " << nMaxIter << endl;
|
Info<< "Maximum number of refinement iterations : " << nMaxIter << endl;
|
||||||
@ -481,10 +481,7 @@ void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
|
|||||||
|
|
||||||
label maxSmoothingIterations = readLabel
|
label maxSmoothingIterations = readLabel
|
||||||
(
|
(
|
||||||
cvMeshControls().cvMeshDict().subDict("motionControl").lookup
|
motionControlDict.lookup("maxSmoothingIterations")
|
||||||
(
|
|
||||||
"maxSmoothingIterations"
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
meshAlignmentSmoother.smoothAlignments(maxSmoothingIterations);
|
meshAlignmentSmoother.smoothAlignments(maxSmoothingIterations);
|
||||||
|
|
||||||
@ -501,10 +498,18 @@ void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
|
|||||||
cellSizeMesh.write();
|
cellSizeMesh.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().printVertexInfo())
|
if (foamyHexMeshControls().printVertexInfo())
|
||||||
{
|
{
|
||||||
cellSizeMesh.printVertexInfo(Info);
|
cellSizeMesh.printVertexInfo(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Info<< "Estimated number of cells in final mesh = "
|
||||||
|
// << returnReduce
|
||||||
|
// (
|
||||||
|
// cellSizeMesh.estimateCellCount(decomposition_),
|
||||||
|
// sumOp<label>()
|
||||||
|
// )
|
||||||
|
// << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -896,13 +901,13 @@ bool Foam::conformalVoronoiMesh::ownerAndNeighbour
|
|||||||
Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const dictionary& cvMeshDict
|
const dictionary& foamyHexMeshDict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DistributedDelaunayMesh<Delaunay>(),
|
DistributedDelaunayMesh<Delaunay>(),
|
||||||
runTime_(runTime),
|
runTime_(runTime),
|
||||||
rndGen_(64293*Pstream::myProcNo()),
|
rndGen_(64293*Pstream::myProcNo()),
|
||||||
cvMeshControls_(cvMeshDict),
|
foamyHexMeshControls_(foamyHexMeshDict),
|
||||||
allGeometry_
|
allGeometry_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -914,19 +919,19 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
cvMeshDict.subDict("geometry")
|
foamyHexMeshDict.subDict("geometry")
|
||||||
),
|
),
|
||||||
geometryToConformTo_
|
geometryToConformTo_
|
||||||
(
|
(
|
||||||
runTime_,
|
runTime_,
|
||||||
rndGen_,
|
rndGen_,
|
||||||
allGeometry_,
|
allGeometry_,
|
||||||
cvMeshDict.subDict("surfaceConformation")
|
foamyHexMeshDict.subDict("surfaceConformation")
|
||||||
),
|
),
|
||||||
cellShapeControl_
|
cellShapeControl_
|
||||||
(
|
(
|
||||||
runTime_,
|
runTime_,
|
||||||
cvMeshControls_,
|
foamyHexMeshControls_,
|
||||||
allGeometry_,
|
allGeometry_,
|
||||||
geometryToConformTo_
|
geometryToConformTo_
|
||||||
),
|
),
|
||||||
@ -944,7 +949,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
(
|
(
|
||||||
initialPointsMethod::New
|
initialPointsMethod::New
|
||||||
(
|
(
|
||||||
cvMeshDict.subDict("initialPoints"),
|
foamyHexMeshDict.subDict("initialPoints"),
|
||||||
*this
|
*this
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -952,7 +957,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
(
|
(
|
||||||
relaxationModel::New
|
relaxationModel::New
|
||||||
(
|
(
|
||||||
cvMeshDict.subDict("motionControl"),
|
foamyHexMeshDict.subDict("motionControl"),
|
||||||
runTime_
|
runTime_
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -960,14 +965,14 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
(
|
(
|
||||||
faceAreaWeightModel::New
|
faceAreaWeightModel::New
|
||||||
(
|
(
|
||||||
cvMeshDict.subDict("motionControl")
|
foamyHexMeshDict.subDict("motionControl")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
decomposition_()
|
decomposition_()
|
||||||
{
|
{
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
geometryToConformTo_.writeFeatureObj("cvMesh");
|
geometryToConformTo_.writeFeatureObj("foamyHexMesh");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
@ -979,7 +984,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
runTime_,
|
runTime_,
|
||||||
rndGen_,
|
rndGen_,
|
||||||
geometryToConformTo_,
|
geometryToConformTo_,
|
||||||
cvMeshDict.subDict("backgroundMeshDecomposition")
|
foamyHexMeshDict.subDict("backgroundMeshDecomposition")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1024,12 +1029,12 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
|
|
||||||
cellSizeMeshOverlapsBackground();
|
cellSizeMeshOverlapsBackground();
|
||||||
|
|
||||||
if (cvMeshControls().printVertexInfo())
|
if (foamyHexMeshControls().printVertexInfo())
|
||||||
{
|
{
|
||||||
printVertexInfo(Info);
|
printVertexInfo(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
writePoints
|
writePoints
|
||||||
(
|
(
|
||||||
@ -1238,7 +1243,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
alignmentDotProd
|
alignmentDotProd
|
||||||
> cvMeshControls().cosAlignmentAcceptanceAngle()
|
> foamyHexMeshControls().cosAlignmentAcceptanceAngle()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar targetCellSize = averageCellSize(vA, vB);
|
scalar targetCellSize = averageCellSize(vA, vB);
|
||||||
@ -1311,11 +1316,13 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
// )
|
// )
|
||||||
)
|
)
|
||||||
&& rABMag
|
&& rABMag
|
||||||
> cvMeshControls().insertionDistCoeff()*targetCellSize
|
> foamyHexMeshControls().insertionDistCoeff()
|
||||||
|
*targetCellSize
|
||||||
&& faceArea
|
&& faceArea
|
||||||
> cvMeshControls().faceAreaRatioCoeff()*targetFaceArea
|
> foamyHexMeshControls().faceAreaRatioCoeff()
|
||||||
|
*targetFaceArea
|
||||||
&& alignmentDotProd
|
&& alignmentDotProd
|
||||||
> cvMeshControls().cosInsertionAcceptanceAngle()
|
> foamyHexMeshControls().cosInsertionAcceptanceAngle()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Point insertion
|
// Point insertion
|
||||||
@ -1344,7 +1351,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
|| (vB->internalPoint() && !vB->referred())
|
|| (vB->internalPoint() && !vB->referred())
|
||||||
)
|
)
|
||||||
&& rABMag
|
&& rABMag
|
||||||
< cvMeshControls().removalDistCoeff()
|
< foamyHexMeshControls().removalDistCoeff()
|
||||||
*targetCellSize
|
*targetCellSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1465,7 +1472,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
pointsToInsert.shrink();
|
pointsToInsert.shrink();
|
||||||
|
|
||||||
// Save displacements to file.
|
// Save displacements to file.
|
||||||
if (cvMeshControls().objOutput() && runTime_.outputTime())
|
if (foamyHexMeshControls().objOutput() && runTime_.outputTime())
|
||||||
{
|
{
|
||||||
Pout<< "Writing point displacement vectors to file." << endl;
|
Pout<< "Writing point displacement vectors to file." << endl;
|
||||||
OFstream str("displacements_" + runTime_.timeName() + ".obj");
|
OFstream str("displacements_" + runTime_.timeName() + ".obj");
|
||||||
@ -1578,7 +1585,7 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
|
|
||||||
conformToSurface();
|
conformToSurface();
|
||||||
|
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
writePoints
|
writePoints
|
||||||
(
|
(
|
||||||
@ -1587,14 +1594,14 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().objOutput() && runTime_.outputTime())
|
if (foamyHexMeshControls().objOutput() && runTime_.outputTime())
|
||||||
{
|
{
|
||||||
writeBoundaryPoints("boundaryPoints_" + runTime_.timeName() + ".obj");
|
writeBoundaryPoints("boundaryPoints_" + runTime_.timeName() + ".obj");
|
||||||
}
|
}
|
||||||
|
|
||||||
timeCheck("After conformToSurface");
|
timeCheck("After conformToSurface");
|
||||||
|
|
||||||
if (cvMeshControls().printVertexInfo())
|
if (foamyHexMeshControls().printVertexInfo())
|
||||||
{
|
{
|
||||||
printVertexInfo(Info);
|
printVertexInfo(Info);
|
||||||
}
|
}
|
||||||
@ -1736,7 +1743,7 @@ void Foam::conformalVoronoiMesh::checkCoPlanarCells() const
|
|||||||
++cit
|
++cit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const scalar quality = cvMeshChecks::coplanarTet(cit, 1e-16);
|
const scalar quality = foamyHexMeshChecks::coplanarTet(cit, 1e-16);
|
||||||
|
|
||||||
if (quality == 0)
|
if (quality == 0)
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ private:
|
|||||||
mutable Random rndGen_;
|
mutable Random rndGen_;
|
||||||
|
|
||||||
//- Controls for the conformal Voronoi meshing process
|
//- Controls for the conformal Voronoi meshing process
|
||||||
cvControls cvMeshControls_;
|
cvControls foamyHexMeshControls_;
|
||||||
|
|
||||||
//- All geometry of the meshing process, including surfaces to be
|
//- All geometry of the meshing process, including surfaces to be
|
||||||
// conformed to and those to be used for refinement
|
// conformed to and those to be used for refinement
|
||||||
@ -989,11 +989,11 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from Time and cvMeshDict
|
//- Construct from Time and foamyHexMeshDict
|
||||||
conformalVoronoiMesh
|
conformalVoronoiMesh
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const dictionary& cvMeshDict
|
const dictionary& foamyHexMeshDict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1055,8 +1055,8 @@ public:
|
|||||||
//- Return the cellShapeControl object
|
//- Return the cellShapeControl object
|
||||||
inline const cellShapeControl& cellShapeControls() const;
|
inline const cellShapeControl& cellShapeControls() const;
|
||||||
|
|
||||||
//- Return the cvMeshControls object
|
//- Return the foamyHexMeshControls object
|
||||||
inline const cvControls& cvMeshControls() const;
|
inline const cvControls& foamyHexMeshControls() const;
|
||||||
|
|
||||||
|
|
||||||
// Write
|
// Write
|
||||||
@ -643,7 +643,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh
|
|||||||
|
|
||||||
patchNames.setSize(patchNames.size() + 1);
|
patchNames.setSize(patchNames.size() + 1);
|
||||||
|
|
||||||
patchNames[patchNames.size() - 1] = "cvMesh_defaultPatch";
|
patchNames[patchNames.size() - 1] = "foamyHexMesh_defaultPatch";
|
||||||
patchTypes.setSize(patchNames.size(), wallPolyPatch::typeName);
|
patchTypes.setSize(patchNames.size(), wallPolyPatch::typeName);
|
||||||
|
|
||||||
label nPatches = patchNames.size();
|
label nPatches = patchNames.size();
|
||||||
@ -916,7 +916,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
|||||||
// << endl;
|
// << endl;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// if (++iterI > cvMeshControls().maxCollapseIterations())
|
// if (++iterI > foamyHexMeshControls().maxCollapseIterations())
|
||||||
// {
|
// {
|
||||||
// Info<< " maxCollapseIterations reached, stopping collapse"
|
// Info<< " maxCollapseIterations reached, stopping collapse"
|
||||||
// << endl;
|
// << endl;
|
||||||
@ -938,7 +938,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
|||||||
////
|
////
|
||||||
//// label fC = cit->filterCount();
|
//// label fC = cit->filterCount();
|
||||||
////
|
////
|
||||||
//// if (fC > cvMeshControls().filterCountSkipThreshold())
|
//// if (fC > foamyHexMeshControls().filterCountSkipThreshold())
|
||||||
//// {
|
//// {
|
||||||
//// // This vertex has been limited too many times, skip
|
//// // This vertex has been limited too many times, skip
|
||||||
//// continue;
|
//// continue;
|
||||||
@ -967,7 +967,8 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
|||||||
//// pt += (surfHit.hitPoint() - pt)
|
//// pt += (surfHit.hitPoint() - pt)
|
||||||
//// *pow
|
//// *pow
|
||||||
//// (
|
//// (
|
||||||
//// cvMeshControls().filterErrorReductionCoeff(),
|
//// foamyHexMeshControls()
|
||||||
|
//// .filterErrorReductionCoeff(),
|
||||||
//// fC
|
//// fC
|
||||||
//// );
|
//// );
|
||||||
//// }
|
//// }
|
||||||
@ -990,7 +991,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
|||||||
//
|
//
|
||||||
// const scalar cosPerpendicularToleranceAngle = cos
|
// const scalar cosPerpendicularToleranceAngle = cos
|
||||||
// (
|
// (
|
||||||
// degToRad(cvMeshControls().surfaceStepFaceAngle())
|
// degToRad(foamyHexMeshControls().surfaceStepFaceAngle())
|
||||||
// );
|
// );
|
||||||
//
|
//
|
||||||
// for
|
// for
|
||||||
@ -1036,7 +1037,7 @@ Foam::label Foam::conformalVoronoiMesh::mergeIdenticalDualVertices
|
|||||||
//
|
//
|
||||||
// label maxFC = maxFilterCount(eit);
|
// label maxFC = maxFilterCount(eit);
|
||||||
//
|
//
|
||||||
// if (maxFC > cvMeshControls().filterCountSkipThreshold())
|
// if (maxFC > foamyHexMeshControls().filterCountSkipThreshold())
|
||||||
// {
|
// {
|
||||||
// // A vertex on this face has been limited too many
|
// // A vertex on this face has been limited too many
|
||||||
// // times, skip
|
// // times, skip
|
||||||
@ -1212,7 +1213,7 @@ Foam::conformalVoronoiMesh::createPolyMeshFromPoints
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"cvMesh_temporary",
|
"foamyHexMesh_temporary",
|
||||||
runTime_.timeName(),
|
runTime_.timeName(),
|
||||||
runTime_,
|
runTime_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -1328,9 +1329,13 @@ void Foam::conformalVoronoiMesh::checkCellSizing()
|
|||||||
<< " cells "<< endl;
|
<< " cells "<< endl;
|
||||||
|
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
= cvMeshControls().cvMeshDict().subDict("meshQualityControls");
|
= foamyHexMeshControls().foamyHexMeshDict();
|
||||||
|
|
||||||
const scalar maxNonOrtho = readScalar(dict.lookup("maxNonOrtho", true));
|
const dictionary& meshQualityDict
|
||||||
|
= dict.subDict("meshQualityControls");
|
||||||
|
|
||||||
|
const scalar maxNonOrtho =
|
||||||
|
readScalar(meshQualityDict.lookup("maxNonOrtho", true));
|
||||||
|
|
||||||
label nWrongFaces = 0;
|
label nWrongFaces = 0;
|
||||||
|
|
||||||
@ -1368,7 +1373,7 @@ void Foam::conformalVoronoiMesh::checkCellSizing()
|
|||||||
// (
|
// (
|
||||||
// false,
|
// false,
|
||||||
// pMesh,
|
// pMesh,
|
||||||
// cvMeshControls().cvMeshDict().subDict("meshQualityControls"),
|
// meshQualityDict,
|
||||||
// checkFaces,
|
// checkFaces,
|
||||||
// wrongFaces
|
// wrongFaces
|
||||||
// );
|
// );
|
||||||
@ -1433,7 +1438,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findOffsetPatchFaces
|
|||||||
cellSet offsetBoundaryCells
|
cellSet offsetBoundaryCells
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
"cvMesh_protrudingCells",
|
"foamyHexMesh_protrudingCells",
|
||||||
mesh.nCells()/1000
|
mesh.nCells()/1000
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1476,7 +1481,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findOffsetPatchFaces
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
offsetBoundaryCells.write();
|
offsetBoundaryCells.write();
|
||||||
}
|
}
|
||||||
@ -1515,11 +1520,17 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
|
|||||||
<< returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>())
|
<< returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>())
|
||||||
<< " faces from check, < " << faceAreaLimit << " area" << endl;
|
<< " faces from check, < " << faceAreaLimit << " area" << endl;
|
||||||
|
|
||||||
|
const dictionary& dict
|
||||||
|
= foamyHexMeshControls().foamyHexMeshDict();
|
||||||
|
|
||||||
|
const dictionary& meshQualityDict
|
||||||
|
= dict.subDict("meshQualityControls");
|
||||||
|
|
||||||
motionSmoother::checkMesh
|
motionSmoother::checkMesh
|
||||||
(
|
(
|
||||||
false,
|
false,
|
||||||
pMesh,
|
pMesh,
|
||||||
cvMeshControls().cvMeshDict().subDict("meshQualityControls"),
|
meshQualityDict,
|
||||||
checkFaces,
|
checkFaces,
|
||||||
wrongFaces
|
wrongFaces
|
||||||
);
|
);
|
||||||
@ -1869,7 +1880,7 @@ Foam::label Foam::conformalVoronoiMesh::createPatchInfo
|
|||||||
|
|
||||||
patchNames.setSize(patchNames.size() + 1);
|
patchNames.setSize(patchNames.size() + 1);
|
||||||
label defaultPatchIndex = patchNames.size() - 1;
|
label defaultPatchIndex = patchNames.size() - 1;
|
||||||
patchNames[defaultPatchIndex] = "cvMesh_defaultPatch";
|
patchNames[defaultPatchIndex] = "foamyHexMesh_defaultPatch";
|
||||||
patchDicts.set(defaultPatchIndex, new dictionary());
|
patchDicts.set(defaultPatchIndex, new dictionary());
|
||||||
|
|
||||||
label nProcPatches = 0;
|
label nProcPatches = 0;
|
||||||
@ -2249,7 +2260,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]);
|
patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (cvMeshControls().objOutput())
|
// if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
Info<< "Writing processor interfaces" << endl;
|
Info<< "Writing processor interfaces" << endl;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ Foam::conformalVoronoiMesh::reconformationControl() const
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
runTime_.timeIndex()
|
runTime_.timeIndex()
|
||||||
% cvMeshControls().surfaceConformationRebuildFrequency() == 0
|
% foamyHexMeshControls().surfaceConformationRebuildFrequency() == 0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return rmOn;
|
return rmOn;
|
||||||
@ -196,7 +196,7 @@ Foam::label Foam::conformalVoronoiMesh::findVerticesNearBoundaries()
|
|||||||
//
|
//
|
||||||
// const scalar range = sqr
|
// const scalar range = sqr
|
||||||
// (
|
// (
|
||||||
// cvMeshControls().nearBoundaryDistanceCoeff()
|
// foamyHexMeshControls().nearBoundaryDistanceCoeff()
|
||||||
// *targetCellSize(pt)
|
// *targetCellSize(pt)
|
||||||
// );
|
// );
|
||||||
//
|
//
|
||||||
@ -287,10 +287,10 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation()
|
|||||||
timeCheck("After set near boundary");
|
timeCheck("After set near boundary");
|
||||||
|
|
||||||
const scalar edgeSearchDistCoeffSqr =
|
const scalar edgeSearchDistCoeffSqr =
|
||||||
cvMeshControls().edgeSearchDistCoeffSqr();
|
foamyHexMeshControls().edgeSearchDistCoeffSqr();
|
||||||
|
|
||||||
const scalar surfacePtReplaceDistCoeffSqr =
|
const scalar surfacePtReplaceDistCoeffSqr =
|
||||||
cvMeshControls().surfacePtReplaceDistCoeffSqr();
|
foamyHexMeshControls().surfacePtReplaceDistCoeffSqr();
|
||||||
|
|
||||||
const label AtoV = label(6/Foam::pow(scalar(number_of_vertices()), 3));
|
const label AtoV = label(6/Foam::pow(scalar(number_of_vertices()), 3));
|
||||||
|
|
||||||
@ -429,10 +429,10 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation()
|
|||||||
|
|
||||||
label iterationNo = 0;
|
label iterationNo = 0;
|
||||||
|
|
||||||
label maxIterations = cvMeshControls().maxConformationIterations();
|
label maxIterations = foamyHexMeshControls().maxConformationIterations();
|
||||||
|
|
||||||
scalar iterationToInitialHitRatioLimit =
|
scalar iterationToInitialHitRatioLimit =
|
||||||
cvMeshControls().iterationToInitialHitRatioLimit();
|
foamyHexMeshControls().iterationToInitialHitRatioLimit();
|
||||||
|
|
||||||
label hitLimit = label(iterationToInitialHitRatioLimit*initialTotalHits);
|
label hitLimit = label(iterationToInitialHitRatioLimit*initialTotalHits);
|
||||||
|
|
||||||
@ -1022,7 +1022,7 @@ bool Foam::conformalVoronoiMesh::dualCellSurfaceAllIntersections
|
|||||||
const scalar minSepDist =
|
const scalar minSepDist =
|
||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
cvMeshControls().removalDistCoeff()
|
foamyHexMeshControls().removalDistCoeff()
|
||||||
*targetCellSize(p)
|
*targetCellSize(p)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1455,7 +1455,7 @@ void Foam::conformalVoronoiMesh::limitDisplacement
|
|||||||
scalar searchDistanceSqr = sqr
|
scalar searchDistanceSqr = sqr
|
||||||
(
|
(
|
||||||
2*vit->targetCellSize()
|
2*vit->targetCellSize()
|
||||||
*cvMeshControls().pointPairDistanceCoeff()
|
*foamyHexMeshControls().pointPairDistanceCoeff()
|
||||||
);
|
);
|
||||||
|
|
||||||
geometryToConformTo_.findSurfaceNearest
|
geometryToConformTo_.findSurfaceNearest
|
||||||
@ -1803,7 +1803,8 @@ bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
|||||||
mag(cosAngle) < searchConeAngle
|
mag(cosAngle) < searchConeAngle
|
||||||
&& (
|
&& (
|
||||||
mag(lineBetweenPoints)
|
mag(lineBetweenPoints)
|
||||||
> cvMeshControls().pointPairDistanceCoeff()*targetCellSize(pt)
|
> foamyHexMeshControls().pointPairDistanceCoeff()
|
||||||
|
*targetCellSize(pt)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -349,7 +349,7 @@ bool Foam::conformalVoronoiMesh::createSpecialisedFeaturePoint
|
|||||||
+ radAngleBetween(concaveEdgePlaneANormal, concaveEdgePlaneBNormal)
|
+ radAngleBetween(concaveEdgePlaneANormal, concaveEdgePlaneBNormal)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (totalAngle > cvMeshControls().maxQuadAngle())
|
if (totalAngle > foamyHexMeshControls().maxQuadAngle())
|
||||||
{
|
{
|
||||||
// Add additional mitreing points
|
// Add additional mitreing points
|
||||||
//scalar angleSign = 1.0;
|
//scalar angleSign = 1.0;
|
||||||
@ -691,7 +691,7 @@ bool Foam::conformalVoronoiMesh::createSpecialisedFeaturePoint
|
|||||||
+ radAngleBetween(convexEdgePlaneANormal, convexEdgePlaneBNormal)
|
+ radAngleBetween(convexEdgePlaneANormal, convexEdgePlaneBNormal)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (totalAngle > cvMeshControls().maxQuadAngle())
|
if (totalAngle > foamyHexMeshControls().maxQuadAngle())
|
||||||
{
|
{
|
||||||
// Add additional mitreing points
|
// Add additional mitreing points
|
||||||
//scalar angleSign = 1.0;
|
//scalar angleSign = 1.0;
|
||||||
@ -222,7 +222,7 @@ void Foam::conformalVoronoiMesh::createInternalEdgePointGroup
|
|||||||
radToDeg(constant::mathematical::pi + radAngleBetween(nA, nB));
|
radToDeg(constant::mathematical::pi + radAngleBetween(nA, nB));
|
||||||
|
|
||||||
// Number of quadrants the angle should be split into
|
// Number of quadrants the angle should be split into
|
||||||
int nQuads = int(totalAngle/cvMeshControls().maxQuadAngle()) + 1;
|
int nQuads = int(totalAngle/foamyHexMeshControls().maxQuadAngle()) + 1;
|
||||||
|
|
||||||
// The number of additional master points needed to obtain the
|
// The number of additional master points needed to obtain the
|
||||||
// required number of quadrants.
|
// required number of quadrants.
|
||||||
@ -404,7 +404,7 @@ void Foam::conformalVoronoiMesh::createMixedFeaturePoints
|
|||||||
DynamicList<Vb>& pts
|
DynamicList<Vb>& pts
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (cvMeshControls().mixedFeaturePointPPDistanceCoeff() < 0)
|
if (foamyHexMeshControls().mixedFeaturePointPPDistanceCoeff() < 0)
|
||||||
{
|
{
|
||||||
Info<< nl << "Skipping specialised handling for mixed feature points"
|
Info<< nl << "Skipping specialised handling for mixed feature points"
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -445,7 +445,7 @@ void Foam::conformalVoronoiMesh::createMixedFeaturePoints
|
|||||||
|
|
||||||
bool specialisedSuccess = false;
|
bool specialisedSuccess = false;
|
||||||
|
|
||||||
if (cvMeshControls().specialiseFeaturePoints())
|
if (foamyHexMeshControls().specialiseFeaturePoints())
|
||||||
{
|
{
|
||||||
specialisedSuccess = createSpecialisedFeaturePoint
|
specialisedSuccess = createSpecialisedFeaturePoint
|
||||||
(
|
(
|
||||||
@ -607,7 +607,7 @@ void Foam::conformalVoronoiMesh::insertFeaturePoints()
|
|||||||
// Insert the created points, distributing to the appropriate processor
|
// Insert the created points, distributing to the appropriate processor
|
||||||
insertPoints(pts, true);
|
insertPoints(pts, true);
|
||||||
|
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
writePoints("featureVertices.obj", pts);
|
writePoints("featureVertices.obj", pts);
|
||||||
}
|
}
|
||||||
@ -642,7 +642,7 @@ void Foam::conformalVoronoiMesh::constructFeaturePointLocations()
|
|||||||
{
|
{
|
||||||
const extendedFeatureEdgeMesh& feMesh(feMeshes[i]);
|
const extendedFeatureEdgeMesh& feMesh(feMeshes[i]);
|
||||||
|
|
||||||
if (cvMeshControls().mixedFeaturePointPPDistanceCoeff() < 0)
|
if (foamyHexMeshControls().mixedFeaturePointPPDistanceCoeff() < 0)
|
||||||
{
|
{
|
||||||
// Ignoring mixed feature points
|
// Ignoring mixed feature points
|
||||||
for
|
for
|
||||||
@ -27,7 +27,7 @@ License
|
|||||||
|
|
||||||
inline Foam::scalar Foam::conformalVoronoiMesh::defaultCellSize() const
|
inline Foam::scalar Foam::conformalVoronoiMesh::defaultCellSize() const
|
||||||
{
|
{
|
||||||
return cvMeshControls().defaultCellSize();
|
return foamyHexMeshControls().defaultCellSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::pointPairDistance
|
|||||||
const Foam::point& pt
|
const Foam::point& pt
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return targetCellSize(pt)*cvMeshControls().pointPairDistanceCoeff();
|
return targetCellSize(pt)*foamyHexMeshControls().pointPairDistanceCoeff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::mixedFeaturePointDistance
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
pointPairDistance(pt)
|
pointPairDistance(pt)
|
||||||
*cvMeshControls().mixedFeaturePointPPDistanceCoeff();
|
*foamyHexMeshControls().mixedFeaturePointPPDistanceCoeff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::featurePointExclusionDistanceSqr
|
|||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
targetCellSize(pt)
|
targetCellSize(pt)
|
||||||
*cvMeshControls().featurePointExclusionDistanceCoeff()
|
*foamyHexMeshControls().featurePointExclusionDistanceCoeff()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::featureEdgeExclusionDistanceSqr
|
|||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
targetCellSize(pt)
|
targetCellSize(pt)
|
||||||
*cvMeshControls().featureEdgeExclusionDistanceCoeff()
|
*foamyHexMeshControls().featureEdgeExclusionDistanceCoeff()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ inline Foam::scalar Foam::conformalVoronoiMesh::surfacePtExclusionDistanceSqr
|
|||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
targetCellSize(pt)
|
targetCellSize(pt)
|
||||||
*cvMeshControls().surfacePtExclusionDistanceCoeff()
|
*foamyHexMeshControls().surfacePtExclusionDistanceCoeff()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +217,11 @@ inline Foam::scalar Foam::conformalVoronoiMesh::surfaceSearchDistanceSqr
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
sqr(targetCellSize(pt)*cvMeshControls().surfaceSearchDistanceCoeff());
|
sqr
|
||||||
|
(
|
||||||
|
targetCellSize(pt)
|
||||||
|
*foamyHexMeshControls().surfaceSearchDistanceCoeff()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -226,7 +230,9 @@ inline Foam::scalar Foam::conformalVoronoiMesh::maxSurfaceProtrusion
|
|||||||
const Foam::point& pt
|
const Foam::point& pt
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return targetCellSize(pt)*cvMeshControls().maxSurfaceProtrusionCoeff();
|
return
|
||||||
|
targetCellSize(pt)
|
||||||
|
*foamyHexMeshControls().maxSurfaceProtrusionCoeff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -683,9 +689,9 @@ Foam::conformalVoronoiMesh::cellShapeControls() const
|
|||||||
|
|
||||||
|
|
||||||
inline const Foam::cvControls&
|
inline const Foam::cvControls&
|
||||||
Foam::conformalVoronoiMesh::cvMeshControls() const
|
Foam::conformalVoronoiMesh::foamyHexMeshControls() const
|
||||||
{
|
{
|
||||||
return cvMeshControls_;
|
return foamyHexMeshControls_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ void Foam::conformalVoronoiMesh::timeCheck
|
|||||||
const string& description
|
const string& description
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
timeCheck(time(), description, cvMeshControls().timeChecks());
|
timeCheck(time(), description, foamyHexMeshControls().timeChecks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().writeTetDualMesh())
|
if (foamyHexMeshControls().writeTetDualMesh())
|
||||||
{
|
{
|
||||||
// Determine map from Delaunay vertex to Dual mesh
|
// Determine map from Delaunay vertex to Dual mesh
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -961,7 +961,7 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
const PackedBoolList& boundaryFacesToRemove
|
const PackedBoolList& boundaryFacesToRemove
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (cvMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
writeObjMesh(points, faces, word(meshName + ".obj"));
|
writeObjMesh(points, faces, word(meshName + ".obj"));
|
||||||
}
|
}
|
||||||
@ -1099,7 +1099,7 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
|
|
||||||
label nInitialBadFaces = 0;
|
label nInitialBadFaces = 0;
|
||||||
|
|
||||||
if (cvMeshControls().filterEdges())
|
if (foamyHexMeshControls().filterEdges())
|
||||||
{
|
{
|
||||||
Info<< nl << "Filtering edges on polyMesh" << nl << endl;
|
Info<< nl << "Filtering edges on polyMesh" << nl << endl;
|
||||||
|
|
||||||
@ -1117,7 +1117,7 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvMeshControls().filterFaces())
|
if (foamyHexMeshControls().filterFaces())
|
||||||
{
|
{
|
||||||
Info<< nl << "Filtering faces on polyMesh" << nl << endl;
|
Info<< nl << "Filtering faces on polyMesh" << nl << endl;
|
||||||
|
|
||||||
@ -1616,7 +1616,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
|
|||||||
cellSet protrudingCells
|
cellSet protrudingCells
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
"cvMesh_remainingProtrusions",
|
"foamyHexMesh_remainingProtrusions",
|
||||||
mesh.nCells()/1000
|
mesh.nCells()/1000
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1635,7 +1635,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
|
|||||||
|
|
||||||
reduce(protrudingCellsSize, sumOp<label>());
|
reduce(protrudingCellsSize, sumOp<label>());
|
||||||
|
|
||||||
if (cvMeshControls().objOutput() && protrudingCellsSize > 0)
|
if (foamyHexMeshControls().objOutput() && protrudingCellsSize > 0)
|
||||||
{
|
{
|
||||||
Info<< nl << "Found " << protrudingCellsSize
|
Info<< nl << "Found " << protrudingCellsSize
|
||||||
<< " cells protruding from the surface, writing cellSet "
|
<< " cells protruding from the surface, writing cellSet "
|
||||||
@ -90,7 +90,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
maxLoadUnbalance <= cvMeshControls().maxLoadUnbalance()
|
maxLoadUnbalance <= foamyHexMeshControls().maxLoadUnbalance()
|
||||||
|| maxLoadUnbalance <= previousLoadUnbalance
|
|| maxLoadUnbalance <= previousLoadUnbalance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,7 @@ License
|
|||||||
|
|
||||||
|
|
||||||
template<typename Cell>
|
template<typename Cell>
|
||||||
Foam::scalar Foam::cvMeshChecks::coplanarTet
|
Foam::scalar Foam::foamyHexMeshChecks::coplanarTet
|
||||||
(
|
(
|
||||||
Cell& c,
|
Cell& c,
|
||||||
const scalar tol
|
const scalar tol
|
||||||
@ -75,7 +75,7 @@ Foam::scalar Foam::cvMeshChecks::coplanarTet
|
|||||||
|
|
||||||
|
|
||||||
template<typename Cell>
|
template<typename Cell>
|
||||||
bool Foam::cvMeshChecks::closePoints
|
bool Foam::foamyHexMeshChecks::closePoints
|
||||||
(
|
(
|
||||||
Cell& c,
|
Cell& c,
|
||||||
const scalar tol
|
const scalar tol
|
||||||
@ -105,7 +105,7 @@ bool Foam::cvMeshChecks::closePoints
|
|||||||
|
|
||||||
|
|
||||||
template<typename Cell>
|
template<typename Cell>
|
||||||
bool Foam::cvMeshChecks::smallVolume
|
bool Foam::foamyHexMeshChecks::smallVolume
|
||||||
(
|
(
|
||||||
Cell& c,
|
Cell& c,
|
||||||
const scalar tol
|
const scalar tol
|
||||||
@ -31,7 +31,7 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace cvMeshChecks
|
namespace foamyHexMeshChecks
|
||||||
{
|
{
|
||||||
|
|
||||||
template<typename Cell>
|
template<typename Cell>
|
||||||
@ -58,7 +58,7 @@ namespace cvMeshChecks
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace cvMeshChecks
|
} // End namespace foamyHexMeshChecks
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -111,7 +111,7 @@ int CGAL::indexedCell<Gt, Cb>::cellIndex() const
|
|||||||
template<class Gt, class Cb>
|
template<class Gt, class Cb>
|
||||||
const Foam::point& CGAL::indexedCell<Gt, Cb>::dual()
|
const Foam::point& CGAL::indexedCell<Gt, Cb>::dual()
|
||||||
{
|
{
|
||||||
// if (Foam::cvMeshChecks::coplanarTet(*this, 1e-20) == 0)
|
// if (Foam::foamyHexMeshChecks::coplanarTet(*this, 1e-20) == 0)
|
||||||
// {
|
// {
|
||||||
// Do exact calc
|
// Do exact calc
|
||||||
// }
|
// }
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,14 +30,17 @@ License
|
|||||||
|
|
||||||
Foam::cvControls::cvControls
|
Foam::cvControls::cvControls
|
||||||
(
|
(
|
||||||
const dictionary& cvMeshDict
|
const dictionary& foamyHexMeshDict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cvMeshDict_(cvMeshDict)
|
foamyHexMeshDict_(foamyHexMeshDict)
|
||||||
{
|
{
|
||||||
// Surface conformation controls
|
// Surface conformation controls
|
||||||
|
|
||||||
const dictionary& surfDict(cvMeshDict_.subDict("surfaceConformation"));
|
const dictionary& surfDict
|
||||||
|
(
|
||||||
|
foamyHexMeshDict_.subDict("surfaceConformation")
|
||||||
|
);
|
||||||
|
|
||||||
pointPairDistanceCoeff_ = readScalar
|
pointPairDistanceCoeff_ = readScalar
|
||||||
(
|
(
|
||||||
@ -123,7 +126,7 @@ Foam::cvControls::cvControls
|
|||||||
|
|
||||||
// Motion control controls
|
// Motion control controls
|
||||||
|
|
||||||
const dictionary& motionDict(cvMeshDict_.subDict("motionControl"));
|
const dictionary& motionDict(foamyHexMeshDict_.subDict("motionControl"));
|
||||||
|
|
||||||
defaultCellSize_ = readScalar(motionDict.lookup("defaultCellSize"));
|
defaultCellSize_ = readScalar(motionDict.lookup("defaultCellSize"));
|
||||||
|
|
||||||
@ -193,7 +196,10 @@ Foam::cvControls::cvControls
|
|||||||
|
|
||||||
// polyMesh filtering controls
|
// polyMesh filtering controls
|
||||||
|
|
||||||
const dictionary& filteringDict(cvMeshDict_.subDict("polyMeshFiltering"));
|
const dictionary& filteringDict
|
||||||
|
(
|
||||||
|
foamyHexMeshDict_.subDict("polyMeshFiltering")
|
||||||
|
);
|
||||||
|
|
||||||
filterEdges_ = Switch
|
filterEdges_ = Switch
|
||||||
(
|
(
|
||||||
@ -55,8 +55,8 @@ class cvControls
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to the cvMeshDict
|
//- Reference to the foamyHexMeshDict
|
||||||
const dictionary& cvMeshDict_;
|
const dictionary& foamyHexMeshDict_;
|
||||||
|
|
||||||
// Surface conformation controls
|
// Surface conformation controls
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ public:
|
|||||||
//- Construct from references to conformalVoronoiMesh and dictionary
|
//- Construct from references to conformalVoronoiMesh and dictionary
|
||||||
cvControls
|
cvControls
|
||||||
(
|
(
|
||||||
const dictionary& cvMeshDict
|
const dictionary& foamyHexMeshDict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -216,8 +216,8 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the cvMeshDict
|
//- Return the foamyHexMeshDict
|
||||||
inline const dictionary& cvMeshDict() const;
|
inline const dictionary& foamyHexMeshDict() const;
|
||||||
|
|
||||||
//- Return the pointPairDistanceCoeff
|
//- Return the pointPairDistanceCoeff
|
||||||
inline scalar pointPairDistanceCoeff() const;
|
inline scalar pointPairDistanceCoeff() const;
|
||||||
@ -25,9 +25,9 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::dictionary& Foam::cvControls::cvMeshDict() const
|
inline const Foam::dictionary& Foam::cvControls::foamyHexMeshDict() const
|
||||||
{
|
{
|
||||||
return cvMeshDict_;
|
return foamyHexMeshDict_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user