35 const scalar minFaceFraction
38 label nChangedFaces = 0;
41 nChangedFaces += mesh.boundary()[iter.key()].size();
44 List<labelPair> changedPatchAndFaces(nChangedFaces);
46 label changedFacei = 0;
49 const label patchi = iter.key();
50 const fvPatch& patch = mesh.boundary()[
patchi];
52 if (isA<nonConformalFvPatch>(patch))
55 <<
"Cannot initialise a patch distance wave from a " 61 const scalar faceFraction =
62 patch.magSf()[patchFacei]
63 /patch.patch().magFaceAreas()[patchFacei];
65 if (faceFraction < minFaceFraction)
continue;
67 changedPatchAndFaces[changedFacei] =
labelPair(patchi, patchFacei);
72 changedPatchAndFaces.resize(changedFacei);
74 return changedPatchAndFaces;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Pair< label > labelPair
Label pair.
List< labelPair > getChangedPatchAndFaces(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction)
Get initial set of changed faces.