mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Writing cellCentres to polyMesh dir and optional reading.
This commit is contained in:
@ -96,16 +96,20 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"cellCentres",
|
||||
runTime.constant(),
|
||||
mesh.pointsInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Read " << overrideCCs.size() << " cell centres" << endl;
|
||||
if (overrideCCs.headerOk())
|
||||
{
|
||||
Info<< "Read " << overrideCCs.size() << " cell centres" << endl;
|
||||
|
||||
mesh.overrideCellCentres(overrideCCs);
|
||||
mesh.overrideCellCentres(overrideCCs);
|
||||
}
|
||||
|
||||
// Reconstruct globalMeshData
|
||||
mesh.globalData();
|
||||
|
||||
@ -167,7 +167,7 @@ Foam::label Foam::checkTopology
|
||||
if (nOneCells > 0)
|
||||
{
|
||||
Info<< " <<Writing " << nOneCells
|
||||
<< " cells with with single non-boundary face to set "
|
||||
<< " cells with with zero or one non-boundary face to set "
|
||||
<< oneCells.name()
|
||||
<< endl;
|
||||
oneCells.instance() = mesh.pointsInstance();
|
||||
@ -179,7 +179,7 @@ Foam::label Foam::checkTopology
|
||||
if (nTwoCells > 0)
|
||||
{
|
||||
Info<< " <<Writing " << nTwoCells
|
||||
<< " cells with with single non-boundary face to set "
|
||||
<< " cells with with two non-boundary faces to set "
|
||||
<< twoCells.name()
|
||||
<< endl;
|
||||
twoCells.instance() = mesh.pointsInstance();
|
||||
|
||||
@ -96,14 +96,13 @@ void Foam::conformalVoronoiMesh::calcDualMesh
|
||||
indexDualVertices(points, boundaryPts);
|
||||
|
||||
{
|
||||
// No-risk face filtering to get rid of zero area faces and
|
||||
// establish if the mesh can be produced at all to the
|
||||
// Ideally requires a no-risk face filtering to get rid of zero area
|
||||
// faces and establish if the mesh can be produced at all to the
|
||||
// specified criteria
|
||||
|
||||
Info<< nl << "Merging close points" << endl;
|
||||
|
||||
// There is no guarantee that a merge of close points is
|
||||
// no-risk, but it seems to work using 1e-4 as the mergeClosenessCoeff
|
||||
// There is no guarantee that a merge of close points is no-risk
|
||||
mergeCloseDualVertices(points, boundaryPts);
|
||||
}
|
||||
|
||||
|
||||
@ -275,7 +275,8 @@ void Foam::conformalVoronoiMesh::writeMesh
|
||||
IOobject
|
||||
(
|
||||
"cellCentres",
|
||||
instance,
|
||||
mesh.pointsInstance(),
|
||||
fvMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
|
||||
Reference in New Issue
Block a user