40 const scalar includedAngle
64 while (facei0 < faceZones.
size())
68 label faceEdgeFacei = 0;
70 faceZones[facei] = zonei;
75 const label edgei = faceEdges[facei][faceEdgei];
76 const label facej = edgeFaces[edgei][faceEdgeFacei];
84 faceZones[facej] == zonei
85 || (faceNormals[facei] & faceNormals[facej]) < minCos
89 pp[facei].faceEdge(faceEdgei),
90 pp[facej].faceEdge(faceEdgej)
95 faceEdgeFacei = edgeFaces[edgei].
fcIndex(faceEdgeFacei);
98 if (faceEdgeFacei == 0)
100 faceEdgei = faceEdges[facei].
fcIndex(faceEdgei);
106 faceEdgei == faceEdge0[facei]
107 && faceEdgeFacei == faceEdgeFace0[facei]
110 facei = facePrev[facei];
111 faceEdgei = faceEdge0[facei];
112 faceEdgeFacei = faceEdgeFace0[facei];
118 faceZones[facej] = zonei;
119 facePrev[facej] = facei;
123 faceEdgei = faceEdge0[facej] = faceEdgej;
124 faceEdgeFacei = faceEdgeFace0[facej] = faceEdgeFacej;
127 while (facei != facei0 || faceEdgei != 0 || faceEdgeFacei != 0);
131 while (facei0 < faceZones.
size() && faceZones[facei0] != -1)
144 const scalar includedAngle
156 <<
"Patch did not divide into halves based on topology and an "
157 <<
"included angle of " <<
radToDeg(includedAngle) <<
" degrees"
165 faceHalves[facei] = faceZones[facei] == 1;
197 bool hasMergedCyclics =
false;
204 if (isA<mergedCyclicPolyPatch>(pp))
206 hasMergedCyclics =
true;
214 pp.
name() +
"-half-0",
219 cyclicPolyPatch::typeName,
220 pp.
name() +
"-half-1"
230 pp.
name() +
"-half-1",
235 cyclicPolyPatch::typeName,
236 pp.
name() +
"-half-0"
242 if (!hasMergedCyclics)
255 if (isA<mergedCyclicPolyPatch>(pp))
273 patchFaceHalves[patchFacei]
289 if (!isA<mergedCyclicPolyPatch>(pp))
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void size(const label)
Override size to be inconsistent with allocated storage.
const labelListList & edgeFaces() const
Return edge-face addressing.
const labelListList & faceEdges() const
Return face-edge addressing.
const Field< PointType > & faceNormals() const
Return face normals for patch.
label size() const
Return the number of elements in the UList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
label size() const
Return the number of elements in the UPtrList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static int compare(const edge &, const edge &)
Compare edges.
static int compare(const face &, const face &)
Compare faces.
const word & name() const
Return name.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void addPatches(const List< polyPatch * > &, const bool validBoundary=true)
Add boundary patches.
void removeBoundary()
Remove boundary patches.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Direct mesh changes based on v1.3 polyTopoChange syntax.
autoPtr< polyTopoChangeMap > changeMesh(polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
void modifyFace(const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID)
Modify vertices or cell of face.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalar radToDeg(const scalar rad)
Convert radians to degrees.
scalar degToRad(const scalar deg)
Convert degrees to radians.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void polyMeshUnMergeCyclics(polyMesh &mesh, const scalar includedAngle=degToRad(165))
Find all patches of type "mergedCyclic" in the given mesh and split them.
label findMax(const ListType &, const label start=0)
Find index of max element (and larger than given element).
boolList primitivePatchGetHalves(const primitivePatch &pp, const scalar includedAngle)
labelList primitivePatchGetZones(const primitivePatch &pp, const scalar includedAngle)
label findMin(const ListType &, const label start=0)
Find index of min element (and less than given element).
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
dimensionedScalar cos(const dimensionedScalar &ds)