37 namespace faceSelections
43 searchableSurfaceSelection,
56 const dictionary&
dict
62 searchableSurface::
New
64 word(
dict.lookup(
"surface")),
67 dict.lookupOrDefault(
"name", mesh.objectRegistry::db().
name()),
68 mesh.time().constant(),
69 searchableSurface::geometryDir(mesh.time()),
70 mesh.objectRegistry::db(),
101 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
103 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
104 end[facei] = mesh_.cellCentres()[mesh_.faceNeighbour()[facei]];
116 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
120 const polyPatch& pp = pbm[
patchi];
126 label facei = pp.start()+i;
127 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
128 end[facei] = neighbourCellCentres[facei-mesh_.nInternalFaces()];
135 label facei = pp.start()+i;
136 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
137 end[facei] = mesh_.faceCentres()[facei];
142 List<pointIndexHit> hits;
143 surfacePtr_().findLine(start, end, hits);
145 surfacePtr_().getNormal(hits, normals);
149 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
151 if (hits[facei].hit())
153 faceToZoneID[facei] = zoneID;
154 vector d = end[facei]-start[facei];
155 faceToFlip[facei] = ((normals[facei] & d) < 0);
160 const polyPatch& pp = pbm[
patchi];
166 label facei = pp.start()+i;
167 if (hits[facei].hit())
169 faceToZoneID[facei] = zoneID;
170 vector d = end[facei]-start[facei];
171 faceToFlip[facei] = ((normals[facei] & d) < 0);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
virtual void select(const label, labelList &, boolList &) const =0
searchableSurfaceSelection(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual ~searchableSurfaceSelection()
Destructor.
virtual void select(const label zoneID, labelList &, boolList &) const
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
List< label > labelList
A List of labels.
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)
word name(const bool)
Return a word representation of a bool.
vectorField pointField
pointField is a vectorField.
List< bool > boolList
Bool container classes.
Vector< scalar > vector
A scalar version of the templated Vector.
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.