mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Write out cell centres when running surfaceSimplify in snappyHexMesh.
Also provide option to not do inside outside test when reading points into foamyHexMesh from file
This commit is contained in:
@ -58,7 +58,8 @@ pointFile::pointFile
|
||||
cellShapeControls,
|
||||
decomposition
|
||||
),
|
||||
pointFileName_(detailsDict().lookup("pointFile"))
|
||||
pointFileName_(detailsDict().lookup("pointFile")),
|
||||
insideOutsideCheck_(detailsDict().lookup("insideOutsideCheck"))
|
||||
{}
|
||||
|
||||
|
||||
@ -139,12 +140,17 @@ List<Vb::Point> pointFile::initialPoints() const
|
||||
}
|
||||
}
|
||||
|
||||
Field<bool> insidePoints = geometryToConformTo().wellInside
|
||||
(
|
||||
points,
|
||||
minimumSurfaceDistanceCoeffSqr_
|
||||
*sqr(cellShapeControls().cellSize(points))
|
||||
);
|
||||
Field<bool> insidePoints(points.size(), true);
|
||||
|
||||
if (insideOutsideCheck_)
|
||||
{
|
||||
insidePoints = geometryToConformTo().wellInside
|
||||
(
|
||||
points,
|
||||
minimumSurfaceDistanceCoeffSqr_
|
||||
*sqr(cellShapeControls().cellSize(points))
|
||||
);
|
||||
}
|
||||
|
||||
DynamicList<Vb::Point> initialPoints(insidePoints.size()/10);
|
||||
|
||||
|
||||
@ -61,6 +61,9 @@ private:
|
||||
//- The initial cell spacing
|
||||
fileName pointFileName_;
|
||||
|
||||
//- Check if inserted points are inside or outside
|
||||
bool insideOutsideCheck_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -1521,6 +1521,21 @@ int main(int argc, char *argv[])
|
||||
includePatches,
|
||||
outFileName
|
||||
);
|
||||
|
||||
pointIOField cellCentres
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"internalCellCentres",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh.cellCentres()
|
||||
);
|
||||
|
||||
cellCentres.write();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user