ENH: polyMesh: remove support for read in cellCentres
This commit is contained in:
parent
9ff346bb11
commit
592271921b
@ -91,26 +91,6 @@ int main(int argc, char *argv[])
|
||||
// Clear mesh before checking
|
||||
mesh.clearOut();
|
||||
|
||||
pointIOField overrideCCs
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellCentres",
|
||||
mesh.pointsInstance(),
|
||||
polyMesh::meshSubDir,
|
||||
runTime,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
if (overrideCCs.headerOk())
|
||||
{
|
||||
Info<< "Read " << overrideCCs.size() << " cell centres" << endl;
|
||||
|
||||
mesh.overrideCellCentres(overrideCCs);
|
||||
}
|
||||
|
||||
// Reconstruct globalMeshData
|
||||
mesh.globalData();
|
||||
|
||||
|
@ -295,31 +295,6 @@ Foam::polyMesh::polyMesh(const IOobject& io)
|
||||
neighbour_.write();
|
||||
}
|
||||
|
||||
// Read cell centres if present
|
||||
pointIOField cellCentres
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellCentres",
|
||||
time().findInstance
|
||||
(
|
||||
meshDir(),
|
||||
"cellCentres",
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
if (cellCentres.headerOk())
|
||||
{
|
||||
Pout<< "Reading cell centres" << endl;
|
||||
overrideCellCentres(cellCentres);
|
||||
}
|
||||
|
||||
// Calculate topology for the patches (processor-processor comms etc.)
|
||||
boundary_.updateMesh();
|
||||
|
||||
|
@ -496,12 +496,6 @@ public:
|
||||
const scalarField& cellVolumes() const;
|
||||
const vectorField& faceAreas() const;
|
||||
|
||||
// Override cell centres with supplied positions
|
||||
void overrideCellCentres
|
||||
(
|
||||
const vectorField& cellCtrs
|
||||
) const;
|
||||
|
||||
|
||||
// Mesh motion
|
||||
|
||||
|
@ -28,7 +28,6 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "primitiveMesh.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -169,66 +168,4 @@ const Foam::scalarField& Foam::primitiveMesh::cellVolumes() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::primitiveMesh::overrideCellCentres
|
||||
(
|
||||
const vectorField& newCellCtrs
|
||||
) const
|
||||
{
|
||||
if (newCellCtrs.size() != nCells())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::primitiveMesh::overrideCellCentres"
|
||||
"("
|
||||
"const vectorField& newCellCtrs"
|
||||
") const"
|
||||
)
|
||||
<< "Size of new cell centres for override " << newCellCtrs.size()
|
||||
<< " not equal to the number of cells in the mesh " << nCells()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "void Foam::primitiveMesh::overrideCellCentres"
|
||||
<< "(const vectorField& newCellCtrs) const : "
|
||||
<< "overriding cell centres." << endl;
|
||||
}
|
||||
|
||||
deleteDemandDrivenData(cellCentresPtr_);
|
||||
deleteDemandDrivenData(cellVolumesPtr_);
|
||||
|
||||
// Calculate the cell volumes - these are invariant with respect
|
||||
// to the centre.
|
||||
calcCellCentresAndVols();
|
||||
|
||||
*cellCentresPtr_ = newCellCtrs;
|
||||
|
||||
// Set internal face centres to the midpoint of the cell-centre delta vector
|
||||
|
||||
// if (debug)
|
||||
// {
|
||||
// Pout<< "void Foam::primitiveMesh::overrideCellCentres"
|
||||
// << "(const vectorField& newCellCtrs) const : "
|
||||
// << "overriding internal face centres." << endl;
|
||||
// }
|
||||
|
||||
// deleteDemandDrivenData(faceCentresPtr_);
|
||||
// deleteDemandDrivenData(faceAreasPtr_);
|
||||
|
||||
// calcFaceCentresAndAreas();
|
||||
|
||||
// vectorField& fCtrs = *faceCentresPtr_;
|
||||
|
||||
// const vectorField& C = cellCentres();
|
||||
// const labelUList& owner = faceOwner();
|
||||
// const labelUList& neighbour = faceNeighbour();
|
||||
|
||||
// forAll(neighbour, faceI)
|
||||
// {
|
||||
// fCtrs[faceI] = 0.5*(C[neighbour[faceI]] + C[owner[faceI]]);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
Loading…
Reference in New Issue
Block a user