51 void Foam::searchableSurfaceToFaceZone::combine
62 interiorFaceFaces[facei] = facei;
72 const label facei = patch.start() + patchFacei;
73 interiorFaceFaces[nInteriorFaces] = facei;
78 interiorFaceFaces.resize(nInteriorFaces);
90 forAll(ownCc, interiorFacei)
92 const label facei = interiorFaceFaces[interiorFacei];
95 nbrCc[interiorFacei] =
104 List<pointIndexHit> hits;
106 surfacePtr_().findLine
108 ownCc + tol_*(ownCc - nbrCc),
109 nbrCc - tol_*(ownCc - nbrCc),
112 surfacePtr_().getNormal(hits, normals);
118 forAll(hits, interiorFacei)
120 if (hits[interiorFacei].hit())
122 const label facei = interiorFaceFaces[interiorFacei];
124 const vector d = nbrCc[interiorFacei] - ownCc[interiorFacei];
125 const bool sign = (normals[interiorFacei] & d) < 0;
142 forAll(interiorFaceFaces, interiorFacei)
144 const label facei = interiorFaceFaces[interiorFacei];
147 const label nbrSide =
152 direction[facei] = ownSide*nbrSide < 0 ? ownSide - nbrSide : 0;
156 DynamicList<label> newAddressing;
157 DynamicList<bool> newFlipMap;
161 newAddressing = DynamicList<label>(fzSet.addressing());
162 newFlipMap = DynamicList<bool>(fzSet.flipMap());
167 if (
direction[facei] != 0 && !fzSet.found(facei))
169 newAddressing.append(facei);
177 newAddressing = DynamicList<label>(fzSet.addressing().size());
178 newFlipMap = DynamicList<bool>(fzSet.flipMap().size());
181 forAll(fzSet.addressing(), i)
183 if (
direction[fzSet.addressing()[i]] == 0)
185 newAddressing.append(fzSet.addressing()[i]);
186 newFlipMap.append(fzSet.flipMap()[i]);
190 fzSet.addressing().transfer(newAddressing);
191 fzSet.flipMap().transfer(newFlipMap);
217 mesh.time().constant(),
226 tol_(
dict.lookupOrDefault<scalar>(
"tol",
dimless, rootSmall))
244 if (!isA<faceZoneSet>(set))
247 <<
"Operation only allowed on a faceZoneSet." <<
endl;
255 Info<<
" Adding all faces from surface "
256 << surfacePtr_().name() <<
" ..." <<
endl;
262 Info<<
" Removing all faces from surface "
263 << surfacePtr_().name() <<
" ..." <<
endl;
#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...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Like faceSet but -reads data from faceZone -updates faceZone when writing.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const vectorField & cellCentres() const
label nInternalFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
A topoSetSource to select faces based on intersection (of cell-cell vector) with a surface.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
searchableSurfaceToFaceZone(const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual ~searchableSurfaceToFaceZone()
Destructor.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Base class of a source for a topoSet.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from string.
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > labelList
A List of labels.
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.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
vectorField pointField
pointField is a vectorField.
Vector< scalar > vector
A scalar version of the templated Vector.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Field< vector > vectorField
Specialisation of Field<T> for vector.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)