37 namespace faceSelections
43 searchableSurfaceSelection,
49 searchableSurfaceSelection,
64 const dictionary&
dict
70 searchableSurface::
New
72 word(
dict.lookup(
"surface")),
75 dict.lookupOrDefault(
"name",
mesh.objectRegistry::db().
name()),
76 mesh.time().constant(),
77 searchableSurface::geometryDir(
mesh.time()),
78 mesh.objectRegistry::db(),
109 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
111 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
112 end[facei] = mesh_.cellCentres()[mesh_.faceNeighbour()[facei]];
124 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
128 const polyPatch& pp = pbm[
patchi];
134 label facei = pp.start()+i;
135 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
136 end[facei] = neighbourCellCentres[facei-mesh_.nInternalFaces()];
143 label facei = pp.start()+i;
144 start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]];
145 end[facei] = mesh_.faceCentres()[facei];
150 List<pointIndexHit> hits;
151 surfacePtr_().findLine(start, end, hits);
153 surfacePtr_().getNormal(hits, normals);
157 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
159 if (hits[facei].hit())
161 faceToZoneID[facei] = zoneID;
162 vector d = end[facei]-start[facei];
163 faceToFlip[facei] = ((normals[facei] & d) < 0);
168 const polyPatch& pp = pbm[
patchi];
174 label facei = pp.start()+i;
175 if (hits[facei].hit())
177 faceToZoneID[facei] = zoneID;
178 vector d = end[facei]-start[facei];
179 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
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)
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)
vectorField pointField
pointField is a vectorField.
List< bool > boolList
Bool container classes.
addBackwardCompatibleToRunTimeSelectionTable(fvPatchScalarField, coupledTemperatureFvPatchScalarField, patchMapper, turbulentTemperatureCoupledBaffleMixed, "compressible::turbulentTemperatureCoupledBaffleMixed")
Vector< scalar > vector
A scalar version of the templated Vector.
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.