ENH: Writing cellCentres to polyMesh dir and optional reading.

This commit is contained in:
graham
2010-10-14 18:02:22 +01:00
parent d0ab427bb3
commit df58543799
4 changed files with 15 additions and 11 deletions

View File

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

View File

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

View File

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

View File

@ -275,7 +275,8 @@ void Foam::conformalVoronoiMesh::writeMesh
IOobject
(
"cellCentres",
instance,
mesh.pointsInstance(),
fvMesh::meshSubDir,
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE