decomposePar, reconstructPar: Renamed cellDist to cellProc

The cellProc field is the field of cell-processor labels.

The names "distribution" and "dist" have been removed as these are
ambiguous in relation to other forms of distribution and to distance.
This commit is contained in:
Will Bainbridge
2022-07-20 15:36:31 +01:00
parent 52f262859a
commit dafe3fa004
12 changed files with 55 additions and 60 deletions

View File

@ -32,9 +32,9 @@ Usage
\b decomposePar [OPTION]
Options:
- \par -cellDist
Write the cell distribution as a labelList, for use with 'manual'
decomposition method or as a volScalarField for post-processing.
- \par -cellProc
Write cell processor indices as a volScalarField::Internal for
post-processing.
- \par -region \<regionName\> \n
Decompose named region. Does not check for existence of processor*.
@ -164,7 +164,7 @@ void decomposeUniform
void writeDecomposition(const domainDecomposition& meshes)
{
// Write as volScalarField for postprocessing.
// Write as volScalarField::Internal for postprocessing.
volScalarField::Internal cellProc
(
IOobject
@ -182,7 +182,7 @@ void writeDecomposition(const domainDecomposition& meshes)
cellProc.write();
Info<< "Wrote decomposition as volScalarField to "
Info<< "Wrote decomposition as volScalarField::Internal to "
<< cellProc.name() << " for use in postprocessing."
<< nl << endl;
}
@ -206,9 +206,9 @@ int main(int argc, char *argv[])
#include "addAllRegionsOption.H"
argList::addBoolOption
(
"cellDist",
"write cell distribution as a labelList - for use with 'manual' "
"decomposition method or as a volScalarField for post-processing."
"cellProc",
"write cell processor indices as a volScalarField::Internal for "
"post-processing."
);
argList::addBoolOption
(
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
bool region = args.optionFound("region");
bool writeCellDist = args.optionFound("cellDist");
bool writeCellProc = args.optionFound("cellProc");
bool copyZero = args.optionFound("copyZero");
bool copyUniform = args.optionFound("copyUniform");
bool decomposeFieldsOnly = args.optionFound("fields");
@ -396,7 +396,7 @@ int main(int argc, char *argv[])
domainDecomposition meshes(runTimes, regionName);
if (!decomposeFieldsOnly || !copyZero)
{
if (meshes.readDecompose(decomposeSets) && writeCellDist)
if (meshes.readDecompose(decomposeSets) && writeCellProc)
{
writeDecomposition(meshes);
fileHandler().flush();
@ -445,7 +445,7 @@ int main(int argc, char *argv[])
// Write the decomposition, if necessary
if
(
writeCellDist
writeCellProc
&& meshes.completeMesh().facesInstance()
== runTimes.completeTime().timeName()
)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,11 +41,11 @@ void Foam::readFields
// Search list of objects for fields of type GeomField
IOobjectList fieldObjects(objects.lookupClass(GeoField::typeName));
// Remove the cellDist field
IOobjectList::iterator celDistIter = fieldObjects.find("cellDist");
if (celDistIter != fieldObjects.end())
// Remove the cellProc field
IOobjectList::iterator cellProcIter = fieldObjects.find("cellProc");
if (cellProcIter != fieldObjects.end())
{
fieldObjects.erase(celDistIter);
fieldObjects.erase(cellProcIter);
}
// Get sorted set of names (different processors might read objects in