Go to the documentation of this file.
45 searchableSurfaceToFaceZone,
53 searchableSurfaceToFaceZone::typeName,
54 "\n Usage: searchableSurfaceToFaceZone surface\n\n"
55 " Select all faces whose cell-cell centre vector intersects the surface "
90 const word& surfaceType,
103 getSurfaceName(
dict,
mesh.objectRegistry::db().name()),
104 mesh.time().constant(),
106 mesh.objectRegistry::db(),
124 dict.getCompat<
word>(
"surfaceType", {{
"surface", 0}}),
139 if (!isA<faceZoneSet>(set))
142 <<
"Operation only allowed on a faceZoneSet." <<
endl;
157 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
159 start[facei] = cc[mesh_.faceOwner()[facei]];
160 end[facei] = cc[mesh_.faceNeighbour()[facei]];
165 syncTools::swapBoundaryCellPositions(mesh_, cc, nbrCellCentres);
175 label facei = pp.start()+i;
176 start[facei] = cc[mesh_.faceOwner()[facei]];
177 end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
184 label facei = pp.start()+i;
185 start[facei] = cc[mesh_.faceOwner()[facei]];
186 end[facei] = mesh_.faceCentres()[facei];
196 surfacePtr_().findLine(start,
end, hits);
198 surfacePtr_().getNormal(hits, normals);
204 if (action == topoSetSource::ADD || action == topoSetSource::NEW)
208 Info<<
" Adding all faces from surface "
209 << surfacePtr_().name() <<
" ..." <<
endl;
217 if (hits[facei].hit() && !fzSet.
found(facei))
219 newAddressing.append(facei);
221 newFlipMap.append((normals[facei] & d) < 0);
229 else if (action == topoSetSource::SUBTRACT)
233 Info<<
" Removing all faces from surface "
234 << surfacePtr_().name() <<
" ..." <<
endl;
246 newFlipMap.append(fzSet.
flipMap()[i]);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const labelList & addressing() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
searchableSurfaceToFaceZone(const word &surfaceType, const polyMesh &mesh, const dictionary &dict)
Construct surface-type from dictionary.
A class for handling words, derived from Foam::string.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Class with constructor to add usage string to table.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
const boolList & flipMap() const
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
virtual bool found(const label id) const
Has the given index?
messageStream Info
Information stream (uses stdout - output is on the master only)
A patch is a list of labels that address the faces in the global face list.
void transfer(List< T > &list)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
static word getSurfaceName(const dictionary &dict, const word &defaultName)
Retrieve surface name from dictionary entry.
Like faceSet but -reads data from faceZone -updates faceZone when writing.
General set of labels of mesh quantity (points, cells, faces).
static const word defaultName("coeffs")
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Base class of a source for a topoSet.
A topoSetSource to select all faces whose cell-cell centre vector intersects with a given searchableS...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.