37 namespace zoneGenerators
72 mesh.time().constant(),
81 tol_(
dict.lookupOrDefault<scalar>(
"tol",
dimless, rootSmall))
95 const labelList& faceOwner = mesh_.faceOwner();
96 const labelList& faceNeighbour = mesh_.faceNeighbour();
99 labelList interiorFaceFaces(mesh_.nFaces());
101 forAll(faceNeighbour, facei)
103 interiorFaceFaces[facei] = facei;
105 label nInteriorFaces = mesh_.nInternalFaces();
113 const label facei =
patch.start() + patchFacei;
114 interiorFaceFaces[nInteriorFaces] = facei;
119 interiorFaceFaces.
resize(nInteriorFaces);
131 forAll(ownCc, interiorFacei)
133 const label facei = interiorFaceFaces[interiorFacei];
135 ownCc[interiorFacei] = cc[faceOwner[facei]];
136 nbrCc[interiorFacei] =
137 mesh_.isInternalFace(facei)
138 ? cc[faceNeighbour[facei]]
139 : boundaryNbrCc[facei - mesh_.nInternalFaces()];
147 surfacePtr_().findLine
149 ownCc + tol_*(ownCc - nbrCc),
150 nbrCc - tol_*(ownCc - nbrCc),
153 surfacePtr_().getNormal(hits, normals);
159 forAll(hits, interiorFacei)
161 if (hits[interiorFacei].hit())
163 const label facei = interiorFaceFaces[interiorFacei];
165 const vector d = nbrCc[interiorFacei] - ownCc[interiorFacei];
166 const bool sign = (normals[interiorFacei] & d) < 0;
168 side[faceOwner[facei]] =
sign ? -1 : +1;
170 if (mesh_.isInternalFace(facei))
172 side[faceNeighbour[facei]] =
sign ? +1 : -1;
184 forAll(interiorFaceFaces, interiorFacei)
186 const label facei = interiorFaceFaces[interiorFacei];
188 const label ownSide = side[faceOwner[facei]];
189 const label nbrSide =
190 mesh_.isInternalFace(facei)
191 ? side[faceNeighbour[facei]]
192 : boundaryNbrSide[facei - mesh_.nInternalFaces()];
194 if ((ownSide == 1 && nbrSide == -1) || (ownSide == -1 && nbrSide == 1))
196 faceIndices[fi] = facei;
197 flipMap[fi] = nbrSide > ownSide;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void resize(const label)
Alias for setSize(const label)
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Named list of face indices representing a sub-set of the mesh faces.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
A class for handling words, derived from string.
Abstract base class for all zoneGenerators, providing runtime selection.
A zoneGenerator which looks-up and returns a zoneSet containing point, and/or cell and/or faces zones...
A zoneGenerator which constructs a faceZone from a set of patches.
A faceZone zoneGenerator which selects faces based on the intersection of a surface with the vector b...
virtual zoneSet generate() const
Generate and return the zoneSet.
surface(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual ~surface()
Destructor.
Zone container returned by zoneGenerator::generate.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
defineTypeNameAndDebug(cylinderHeadPoints, 0)
addToRunTimeSelectionTable(zoneGenerator, cylinderHeadPoints, dictionary)
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimless
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.