mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
This commit is contained in:
@ -67,7 +67,7 @@ Foam::decompositionModel::decompositionModel
|
||||
mesh.thisDb(),
|
||||
(fallback ? IOobject::READ_IF_PRESENT : IOobject::MUST_READ),
|
||||
IOobject::NO_WRITE,
|
||||
false, //io.registerObject(),
|
||||
IOobject::NO_REGISTER,
|
||||
true //io.globalObject()
|
||||
),
|
||||
decompDictFile
|
||||
|
||||
@ -51,7 +51,7 @@ Foam::dimFieldDecomposer::decomposeField
|
||||
procMesh_.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
procMesh_,
|
||||
field.dimensions(),
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::fvFieldDecomposer::decomposeField
|
||||
procMesh_.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
procMesh_,
|
||||
field.dimensions(),
|
||||
|
||||
@ -50,7 +50,7 @@ Foam::lagrangianFieldDecomposer::decomposeField
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
// Mapping internal field values
|
||||
Field<Type>(field, particleIndices_)
|
||||
@ -77,7 +77,7 @@ Foam::lagrangianFieldDecomposer::decomposeFieldField
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
// Mapping internal field values
|
||||
Field<Field<Type>>(field, particleIndices_)
|
||||
|
||||
@ -86,7 +86,7 @@ Foam::pointFieldDecomposer::decomposeField
|
||||
procMesh_.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
procMesh_,
|
||||
field.dimensions(),
|
||||
|
||||
@ -69,16 +69,17 @@ Foam::labelList Foam::manualDecomp::decompose
|
||||
const scalarField& pointWeights
|
||||
) const
|
||||
{
|
||||
labelIOList finalDecomp
|
||||
labelList finalDecomp
|
||||
(
|
||||
IOobject
|
||||
labelIOList::readContents
|
||||
(
|
||||
dataFile_,
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
IOobject
|
||||
(
|
||||
dataFile_,
|
||||
mesh.facesInstance(),
|
||||
mesh.thisDb(),
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -95,21 +96,21 @@ Foam::labelList Foam::manualDecomp::decompose
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const label minVal = min(finalDecomp);
|
||||
const label maxVal = max(finalDecomp);
|
||||
|
||||
if (minVal < 0 || maxVal >= nDomains_)
|
||||
const MinMax<label> range = minMax(finalDecomp);
|
||||
|
||||
if (range.min() < 0 || range.max() >= nDomains_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "According to the decomposition, cells assigned to "
|
||||
<< "impossible processor numbers. Min processor = "
|
||||
<< minVal << " Max processor = " << maxVal
|
||||
<< range.min() << " Max processor = " << range.max()
|
||||
<< ".\n" << "Manual decomposition data read from file "
|
||||
<< dataFile_ << "." << endl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return std::move(finalDecomp);
|
||||
return finalDecomp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ void Foam::faMeshDecomposition::distributeFaces()
|
||||
procFvMesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
IOobject::NO_REGISTER
|
||||
);
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ void Foam::faMeshDecomposition::decomposeMesh()
|
||||
procFvMesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
IOobject::NO_REGISTER
|
||||
);
|
||||
|
||||
|
||||
@ -1326,7 +1326,7 @@ bool Foam::faMeshDecomposition::writeDecomposition()
|
||||
procMesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
IOobject::NO_REGISTER
|
||||
);
|
||||
|
||||
// pointProcAddressing
|
||||
|
||||
@ -672,7 +672,7 @@ void Foam::faMeshReconstructor::writeAddressing(const word& timeName) const
|
||||
procMesh_.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
IOobject::NO_REGISTER
|
||||
);
|
||||
|
||||
// boundaryProcAddressing
|
||||
|
||||
@ -195,7 +195,7 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh)
|
||||
meshes_[proci].thisDb(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // not registered
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user