ENH: polyMeshIO: initial test of re-reading boundary file

This commit is contained in:
mattijs
2013-10-25 12:55:06 +01:00
parent 9c2cd307cd
commit cad5d30148

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,11 +74,14 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
// Find the point and cell instance
fileName pointsInst(time().findInstance(meshDir(), "points"));
fileName facesInst(time().findInstance(meshDir(), "faces"));
//fileName boundaryInst(time().findInstance(meshDir(), "boundary"));
if (debug)
{
Info<< "Faces instance: old = " << facesInstance()
<< " new = " << facesInst << nl
//<< "Boundary instance: old = " << boundary_.instance()
//<< " new = " << boundaryInst << nl
<< "Points instance: old = " << pointsInstance()
<< " new = " << pointsInst << endl;
}
@ -447,6 +450,50 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
//if (boundaryInst != boundary_.instance())
//{
// // Boundary file but no topology change
// if (debug)
// {
// Info<< "Boundary state change" << endl;
// }
//
// // Reset the boundary patches
// polyBoundaryMesh newBoundary
// (
// IOobject
// (
// "boundary",
// facesInst,
// meshSubDir,
// *this,
// IOobject::MUST_READ,
// IOobject::NO_WRITE,
// false
// ),
// *this
// );
//
//
//
//
// boundary_.clear();
// boundary_.setSize(newBoundary.size());
//
// forAll(newBoundary, patchI)
// {
// boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
// }
// // Calculate topology for the patches (processor-processor comms
// // etc.)
// boundary_.updateMesh();
//
// // Calculate the geometry for the patches (transformation tensors
// // etc.)
// boundary_.calcGeometry();
//}
return polyMesh::POINTS_MOVED;
}
else