ENH: code modernization for decompose/reconstruct
- simplify procAddressing read/write - avoid accessing points in faMeshReconstructor. Can rely on the patch meshPoints (labelList), which does not need access to a pointField - report number of points on decomposed mesh. Can be useful additional information. Additional statistics for finite area decomposition - provide bundled reconstructAllFields for various reconstructors - remove reconstructPar checks for very old face addressing (from foam2.0 - ie, older than OpenFOAM itself) - bundle all reading into fieldsDistributor tools, where it can be reused by various utilities as required. - combine decomposition fields as respective fieldsCache which eliminates most of the clutter from decomposePar and similfies reuse in the future. STYLE: remove old wordHashSet selection (deprecated in 2018) BUG: incorrect face flip handling for faMeshReconstructor - a latent bug which is not yet triggered since the faMesh faces are currently only definable on boundary faces (which never flip)
This commit is contained in:
committed by
Andrew Heather
parent
eccc998ed2
commit
3b6761afed
@ -77,7 +77,7 @@ void Foam::faMeshReconstructor::calcAddressing
|
||||
for (label& facei : faFaceProcAddr_)
|
||||
{
|
||||
// Use finiteVolume info, ignoring face flips
|
||||
facei = mag(fvFaceProcAddr[facei] - 1);
|
||||
facei = mag(fvFaceProcAddr[facei])-1;
|
||||
}
|
||||
|
||||
|
||||
@ -449,7 +449,7 @@ void Foam::faMeshReconstructor::initPatch() const
|
||||
|
||||
void Foam::faMeshReconstructor::createMesh()
|
||||
{
|
||||
const Time& runTime = procMesh_.mesh().time();
|
||||
const Time& runTime = procMesh_.thisDb().time();
|
||||
|
||||
// Time for non-parallel case (w/o functionObjects or libs)
|
||||
serialRunTime_ = Time::New(runTime.globalPath().toAbsolute());
|
||||
@ -654,7 +654,7 @@ void Foam::faMeshReconstructor::writeAddressing(const word& timeName) const
|
||||
"procAddressing",
|
||||
timeName,
|
||||
faMesh::meshSubDir,
|
||||
procMesh_.mesh(), // The polyMesh
|
||||
procMesh_.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
@ -662,19 +662,19 @@ void Foam::faMeshReconstructor::writeAddressing(const word& timeName) const
|
||||
|
||||
// boundaryProcAddressing
|
||||
ioAddr.rename("boundaryProcAddressing");
|
||||
labelIOList(ioAddr, faBoundaryProcAddr_).write();
|
||||
IOListRef<label>(ioAddr, faBoundaryProcAddr_).write();
|
||||
|
||||
// faceProcAddressing
|
||||
ioAddr.rename("faceProcAddressing");
|
||||
labelIOList(ioAddr, faFaceProcAddr_).write();
|
||||
IOListRef<label>(ioAddr, faFaceProcAddr_).write();
|
||||
|
||||
// pointProcAddressing
|
||||
ioAddr.rename("pointProcAddressing");
|
||||
labelIOList(ioAddr, faPointProcAddr_).write();
|
||||
IOListRef<label>(ioAddr, faPointProcAddr_).write();
|
||||
|
||||
// edgeProcAddressing
|
||||
ioAddr.rename("edgeProcAddressing");
|
||||
labelIOList(ioAddr, faEdgeProcAddr_).write();
|
||||
IOListRef<label>(ioAddr, faEdgeProcAddr_).write();
|
||||
}
|
||||
|
||||
|
||||
@ -699,7 +699,7 @@ void Foam::faMeshReconstructor::writeMesh(const word& timeName) const
|
||||
IOobject io(fullMesh.boundary());
|
||||
|
||||
io.rename("faceLabels");
|
||||
labelIOList(io, singlePatchFaceLabels_).write();
|
||||
IOListRef<label>(io, singlePatchFaceLabels_).write();
|
||||
|
||||
fullMesh.boundary().write();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user