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 " << 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]
291 if (!isA<mergedCyclicPolyPatch>(pp))
const fvPatchList & patches
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
autoPtr< polyTopoChangeMap > changeMesh(polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
const word & name() const
Return name.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList primitivePatchGetZones(const primitivePatch &pp, const scalar includedAngle)
Unit conversion functions.
void size(const label)
Override size to be inconsistent with allocated storage.
static int compare(const edge &, const edge &)
Compare edges.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
label findMin(const ListType &, const label start=0)
Find index of min element (and less than given element).
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
void polyMeshUnMergeCyclics(polyMesh &mesh, const scalar includedAngle=165)
Find all patches of type "mergedCyclic" in the given mesh and split them.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
A list of faces which address into the list of points.
dimensionedScalar cos(const dimensionedScalar &ds)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
static int compare(const face &, const face &)
Compare faces.
virtual const labelList & faceOwner() const
Return face owner.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
const labelListList & edgeFaces() const
Return edge-face addressing.
List< label > labelList
A List of labels.
virtual const faceList & faces() const
Return raw faces.
const Field< PointType > & faceNormals() const
Return face normals for patch.
boolList primitivePatchGetHalves(const primitivePatch &pp, const scalar includedAngle)
void addPatches(const List< polyPatch *> &, const bool validBoundary=true)
Add boundary patches.
label findMax(const ListType &, const label start=0)
Find index of max element (and larger than given element).
void removeBoundary()
Remove boundary patches.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
label size() const
Return the number of elements in the UPtrList.
void modifyFace(const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip)
Modify vertices or cell of face.
Direct mesh changes based on v1.3 polyTopoChange syntax.
label start() const
Return start label of this patch in the polyMesh face list.
const labelListList & faceEdges() const
Return face-edge addressing.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
void clear()
Clear the addressed list, i.e. set the size to zero.