mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
make -cellDist output compatible with manualDecomp
This commit is contained in:
@ -237,23 +237,28 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (writeCellDist)
|
if (writeCellDist)
|
||||||
{
|
{
|
||||||
|
const labelList& procIds = mesh.cellToProc();
|
||||||
|
|
||||||
// Write the decomposition as labelList for use with 'manual'
|
// Write the decomposition as labelList for use with 'manual'
|
||||||
// decomposition method.
|
// decomposition method.
|
||||||
|
labelIOList cellDecomposition
|
||||||
// FIXME: may attempt to write to a non-existent "region0/"
|
|
||||||
OFstream os
|
|
||||||
(
|
(
|
||||||
runTime.path()
|
IOobject
|
||||||
/ mesh.facesInstance()
|
(
|
||||||
/ regionName
|
"cellDecomposition",
|
||||||
/ "cellDecomposition"
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
procIds
|
||||||
);
|
);
|
||||||
|
cellDecomposition.write();
|
||||||
os << mesh.cellToProc();
|
|
||||||
|
|
||||||
Info<< nl << "Wrote decomposition to "
|
Info<< nl << "Wrote decomposition to "
|
||||||
<< os.name() << " for use in manual decomposition."
|
<< cellDecomposition.objectPath()
|
||||||
<< endl;
|
<< " for use in manual decomposition." << endl;
|
||||||
|
|
||||||
// Write as volScalarField for postprocessing.
|
// Write as volScalarField for postprocessing.
|
||||||
volScalarField cellDist
|
volScalarField cellDist
|
||||||
@ -271,7 +276,6 @@ int main(int argc, char *argv[])
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
const labelList& procIds = mesh.cellToProc();
|
|
||||||
forAll(procIds, celli)
|
forAll(procIds, celli)
|
||||||
{
|
{
|
||||||
cellDist[celli] = procIds[celli];
|
cellDist[celli] = procIds[celli];
|
||||||
|
|||||||
Reference in New Issue
Block a user