mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: checkMesh: write cellZone, faceZone info. See #1543.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -163,7 +163,9 @@ int main(int argc, char *argv[])
|
||||
"minTetVolume",
|
||||
"minPyrVolume",
|
||||
"cellRegion",
|
||||
"wallDistance"
|
||||
"wallDistance",
|
||||
"cellZone",
|
||||
"faceZone"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -586,5 +586,62 @@ void Foam::writeFields
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedFields.found("cellZone"))
|
||||
{
|
||||
volScalarField cellZone
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellZone",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(scalar(-1)),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
const cellZoneMesh& czs = mesh.cellZones();
|
||||
for (const auto& zone : czs)
|
||||
{
|
||||
UIndirectList<scalar>(cellZone, zone) = zone.index();
|
||||
}
|
||||
|
||||
cellZone.correctBoundaryConditions();
|
||||
Info<< " Writing cell zoning to " << cellZone.name() << endl;
|
||||
cellZone.write();
|
||||
}
|
||||
if (selectedFields.found("faceZone"))
|
||||
{
|
||||
surfaceScalarField faceZone
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"faceZone",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(scalar(-1)),
|
||||
calculatedFvsPatchScalarField::typeName
|
||||
);
|
||||
|
||||
const faceZoneMesh& czs = mesh.faceZones();
|
||||
for (const auto& zone : czs)
|
||||
{
|
||||
UIndirectList<scalar>(faceZone, zone) = zone.index();
|
||||
}
|
||||
|
||||
//faceZone.correctBoundaryConditions();
|
||||
Info<< " Writing face zoning to " << faceZone.name() << endl;
|
||||
faceZone.write();
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user