40 namespace faceSelections
46 searchableSurfaceSelection,
59 const dictionary&
dict 65 searchableSurface::
New 70 dict.getOrDefault(
"name",
mesh.objectRegistry::db().
name()),
71 mesh.time().constant(),
73 mesh.objectRegistry::db(),
104 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
106 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
107 end[facei] = mesh_.cellCentres()[mesh_.faceNeighbour()[facei]];
119 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
123 const polyPatch& pp = pbm[patchi];
129 label facei = pp.start()+i;
130 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
131 end[facei] = neighbourCellCentres[facei-mesh_.nInternalFaces()];
138 label facei = pp.start()+i;
139 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
140 end[facei] = mesh_.faceCentres()[facei];
145 List<pointIndexHit> hits;
146 surfacePtr_().findLine(start,
end, hits);
148 surfacePtr_().getNormal(hits, normals);
152 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
154 if (hits[facei].hit())
156 faceToZoneID[facei] = zoneID;
158 faceToFlip[facei] = ((normals[facei] & d) < 0);
163 const polyPatch& pp = pbm[patchi];
169 label facei = pp.start()+i;
170 if (hits[facei].hit())
172 faceToZoneID[facei] = zoneID;
174 faceToFlip[facei] = ((normals[facei] & d) < 0);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual ~searchableSurfaceSelection()
Destructor.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual void select(const label zoneID, labelList &, boolList &) const
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual void select(const label, labelList &, boolList &) const =0
Field< vector > vectorField
Specialisation of Field<T> for vector.
searchableSurfaceSelection(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
List< label > labelList
A List of labels.
List< bool > boolList
A List of bools.