mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: checkMesh: output mask field. Fixes #958.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
#include "vtkSurfaceWriter.H"
|
||||
#include "writer.H"
|
||||
|
||||
#include "cyclicAMIPolyPatch.H"
|
||||
#include "cyclicACMIPolyPatch.H"
|
||||
#include "Time.H"
|
||||
|
||||
// Find wedge with opposite orientation. Note: does not actually check that
|
||||
@ -1033,6 +1033,40 @@ Foam::label Foam::checkGeometry
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if (isA<cyclicACMIPolyPatch>(pbm[patchi]))
|
||||
{
|
||||
const cyclicACMIPolyPatch& pp =
|
||||
refCast<const cyclicACMIPolyPatch>(pbm[patchi]);
|
||||
scalarField mergedMask;
|
||||
globalFaces().gather
|
||||
(
|
||||
UPstream::worldComm,
|
||||
ListOps::create<label>
|
||||
(
|
||||
UPstream::procID(UPstream::worldComm),
|
||||
labelOp<int>() // int -> label
|
||||
),
|
||||
pp.mask(),
|
||||
mergedMask
|
||||
);
|
||||
if (Pstream::master())
|
||||
{
|
||||
wr.write
|
||||
(
|
||||
functionObject::outputPrefix,
|
||||
"src_" + tmName,
|
||||
meshedSurfRef
|
||||
(
|
||||
mergedPoints,
|
||||
mergedFaces
|
||||
),
|
||||
"mask",
|
||||
mergedMask,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
// Collect geometry
|
||||
@ -1087,6 +1121,40 @@ Foam::label Foam::checkGeometry
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if (isA<cyclicACMIPolyPatch>(pbm[patchi]))
|
||||
{
|
||||
const cyclicACMIPolyPatch& pp =
|
||||
refCast<const cyclicACMIPolyPatch>(pbm[patchi]);
|
||||
scalarField mergedMask;
|
||||
globalFaces().gather
|
||||
(
|
||||
UPstream::worldComm,
|
||||
ListOps::create<label>
|
||||
(
|
||||
UPstream::procID(UPstream::worldComm),
|
||||
labelOp<int>() // int -> label
|
||||
),
|
||||
pp.neighbPatch().mask(),
|
||||
mergedMask
|
||||
);
|
||||
if (Pstream::master())
|
||||
{
|
||||
wr.write
|
||||
(
|
||||
functionObject::outputPrefix,
|
||||
"tgt_" + tmName,
|
||||
meshedSurfRef
|
||||
(
|
||||
mergedPoints,
|
||||
mergedFaces
|
||||
),
|
||||
"mask",
|
||||
mergedMask,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user