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:
laurence
2013-08-08 12:59:40 +01:00
parent 700215cab3
commit 0415e5689c
3 changed files with 31 additions and 7 deletions

View File

@ -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);

View File

@ -61,6 +61,9 @@ private:
//- The initial cell spacing
fileName pointFileName_;
//- Check if inserted points are inside or outside
bool insideOutsideCheck_;
public:

View File

@ -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();
}