mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: foamToEnsight : indentation
This commit is contained in:
@ -575,99 +575,99 @@ void ensightPointField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
label ensightPatchI = eMesh.patchPartOffset();
|
label ensightPatchI = eMesh.patchPartOffset();
|
||||||
|
|
||||||
forAll(allPatchNames, patchi)
|
forAll(allPatchNames, patchi)
|
||||||
{
|
{
|
||||||
const word& patchName = allPatchNames[patchi];
|
const word& patchName = allPatchNames[patchi];
|
||||||
|
|
||||||
eMesh.barrier();
|
eMesh.barrier();
|
||||||
|
|
||||||
if (patchNames.empty() || patchNames.found(patchName))
|
if (patchNames.empty() || patchNames.found(patchName))
|
||||||
{
|
{
|
||||||
const fvPatch& p = mesh.boundary()[patchi];
|
const fvPatch& p = mesh.boundary()[patchi];
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
returnReduce(p.size(), sumOp<label>())
|
returnReduce(p.size(), sumOp<label>())
|
||||||
> 0
|
> 0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Renumber the patch points/faces into unique points
|
// Renumber the patch points/faces into unique points
|
||||||
labelList pointToGlobal;
|
labelList pointToGlobal;
|
||||||
labelList uniqueMeshPointLabels;
|
labelList uniqueMeshPointLabels;
|
||||||
autoPtr<globalIndex> globalPointsPtr =
|
autoPtr<globalIndex> globalPointsPtr =
|
||||||
mesh.globalData().mergePoints
|
mesh.globalData().mergePoints
|
||||||
(
|
(
|
||||||
p.patch().meshPoints(),
|
p.patch().meshPoints(),
|
||||||
p.patch().meshPointMap(),
|
p.patch().meshPointMap(),
|
||||||
pointToGlobal,
|
pointToGlobal,
|
||||||
uniqueMeshPointLabels
|
uniqueMeshPointLabels
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile.writePartHeader(ensightPatchI);
|
ensightFile.writePartHeader(ensightPatchI);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeField
|
writeField
|
||||||
(
|
(
|
||||||
"coordinates",
|
"coordinates",
|
||||||
Field<Type>(pf.internalField(), uniqueMeshPointLabels),
|
Field<Type>(pf.internalField(), uniqueMeshPointLabels),
|
||||||
ensightFile
|
ensightFile
|
||||||
);
|
);
|
||||||
|
|
||||||
ensightPatchI++;
|
ensightPatchI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// write faceZones, if requested
|
// write faceZones, if requested
|
||||||
if (faceZoneNames.size())
|
if (faceZoneNames.size())
|
||||||
{
|
{
|
||||||
forAllConstIter(wordHashSet, faceZoneNames, iter)
|
forAllConstIter(wordHashSet, faceZoneNames, iter)
|
||||||
{
|
{
|
||||||
const word& faceZoneName = iter.key();
|
const word& faceZoneName = iter.key();
|
||||||
|
|
||||||
eMesh.barrier();
|
eMesh.barrier();
|
||||||
|
|
||||||
label zoneID = mesh.faceZones().findZoneID(faceZoneName);
|
label zoneID = mesh.faceZones().findZoneID(faceZoneName);
|
||||||
|
|
||||||
const faceZone& fz = mesh.faceZones()[zoneID];
|
const faceZone& fz = mesh.faceZones()[zoneID];
|
||||||
|
|
||||||
if (returnReduce(fz().nPoints(), sumOp<label>()) > 0)
|
if (returnReduce(fz().nPoints(), sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
// Renumber the faceZone points/faces into unique points
|
// Renumber the faceZone points/faces into unique points
|
||||||
labelList pointToGlobal;
|
labelList pointToGlobal;
|
||||||
labelList uniqueMeshPointLabels;
|
labelList uniqueMeshPointLabels;
|
||||||
autoPtr<globalIndex> globalPointsPtr =
|
autoPtr<globalIndex> globalPointsPtr =
|
||||||
mesh.globalData().mergePoints
|
mesh.globalData().mergePoints
|
||||||
(
|
(
|
||||||
fz().meshPoints(),
|
fz().meshPoints(),
|
||||||
fz().meshPointMap(),
|
fz().meshPointMap(),
|
||||||
pointToGlobal,
|
pointToGlobal,
|
||||||
uniqueMeshPointLabels
|
uniqueMeshPointLabels
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile.writePartHeader(ensightPatchI);
|
ensightFile.writePartHeader(ensightPatchI);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeField
|
writeField
|
||||||
(
|
(
|
||||||
"coordinates",
|
"coordinates",
|
||||||
Field<Type>
|
Field<Type>
|
||||||
(
|
(
|
||||||
pf.internalField(),
|
pf.internalField(),
|
||||||
uniqueMeshPointLabels
|
uniqueMeshPointLabels
|
||||||
),
|
),
|
||||||
ensightFile
|
ensightFile
|
||||||
);
|
);
|
||||||
|
|
||||||
ensightPatchI++;
|
ensightPatchI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user