Go to the documentation of this file.
52 int main(
int argc,
char *argv[])
56 "Corrects the orientation of faceZone"
69 Info<<
"Orienting faceZone " << zoneName
70 <<
" such that " << outsidePoint <<
" is outside"
79 <<
"Face zone " << fZone.
name()
80 <<
" is not parallel synchronised."
81 <<
" Any coupled face also needs its coupled version to be included"
82 <<
" and with opposite flipMap."
109 label nProtected = 0;
113 const label meshFacei = faceLabels[facei];
114 const label patchi = bm.
whichPatch(meshFacei);
120 && !isMasterFace[meshFacei]
129 Info<<
"Protected from visiting "
131 <<
" slaves of coupled faces" <<
nl <<
endl;
139 const label meshFacei = faceLabels[facei];
141 if (isMasterFace[meshFacei])
146 nMasterFaces[fEdges[fEdgeI]]++;
161 label nProtected = 0;
163 forAll(nMasterFaces, edgeI)
165 if (nMasterFaces[edgeI] > 2)
172 Info<<
"Protected from visiting "
174 <<
" non-manifold edges" <<
nl <<
endl;
196 forAll(allFaceInfo, facei)
200 unsetFacei = globalFaces.toGlobal(facei);
212 label proci = globalFaces.whichProcID(unsetFacei);
213 label seedFacei = globalFaces.toLocal(proci, unsetFacei);
214 Info<<
"Seeding from processor " << proci <<
" face " << seedFacei
221 vector d = outsidePoint-
patch.faceCentres()[seedFacei];
232 Pout<<
"Face " << seedFacei <<
" at "
233 <<
patch.faceCentres()[seedFacei]
234 <<
" with normal " << fn
235 <<
" needs to be flipped." <<
endl;
239 Pout<<
"Face " << seedFacei <<
" at "
240 <<
patch.faceCentres()[seedFacei]
241 <<
" with normal " << fn
242 <<
" points in positive direction (cos = " << (fn&d)/
mag(d)
250 label edgeI = fEdges[fEdgeI];
268 changedEdges.
append(edgeI);
269 changedInfo.
append(edgeInfo);
308 const label meshFacei = faceLabels[i];
312 allFaceInfo[i].flipStatus();
319 const label meshFacei = faceLabels[i];
320 const label patchi = bm.
whichPatch(meshFacei);
326 && !isMasterFace[meshFacei]
343 <<
"Incorrect status for face " << meshFacei
353 boolList newFlipMap(allFaceInfo.size(),
false);
355 forAll(allFaceInfo, facei)
359 newFlipMap[facei] =
false;
363 newFlipMap[facei] =
true;
368 <<
"Problem : unvisited face " << facei
373 if (fZone.
flipMap()[facei] != newFlipMap[facei])
382 Info<<
"Flipping " << nChanged <<
" out of "
383 << globalFaces.size() <<
" faces." <<
nl <<
endl;
385 mesh.
faceZones()[zoneName].resetAddressing(faceLabels, newFlipMap);
virtual const pointField & points() const
Transport of orientation for use in PatchEdgeFaceWave.
A class for handling words, derived from Foam::string.
const boolList & flipMap() const noexcept
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
static constexpr const zero Zero
Wave propagation of information along patch. Every iteration information goes through one layer of fa...
static void addNote(const string ¬e)
const polyBoundaryMesh & boundaryMesh() const
Ostream & endl(Ostream &os)
const edgeList & edges() const
const labelListList & pointEdges() const
T get(const label index) const
static void addArgument(const string &argName, const string &usage="")
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
bool updateEdge(const polyMesh &mesh, const indirectPrimitivePatch &patch, const label edgeI, const label facei, const patchFaceOrientation &faceInfo, const scalar tol, TrackingData &td)
A subset of mesh faces organised as a primitive patch.
DynamicList< T, SizeMin > & append(const T &val)
A List with indirect addressing.
label nBoundaryFaces() const noexcept
const faceZoneMesh & faceZones() const noexcept
label whichPatch(const label faceIndex) const
errorManip< error > abort(error &err)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
errorManipArg< error, int > exit(error &err, const int errNo=1)
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
virtual bool checkParallelSync(const bool report=false) const
bool isInternalFace(const label faceIndex) const noexcept
virtual const faceList & faces() const
#define FatalErrorInFunction
static int myProcNo(const label communicator=worldComm)
const word & name() const noexcept
label nInternalFaces() const noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const vectorField & faceCentres() const
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Foam::argList args(argc, argv)
A list of faces which address into the list of points.