66 searchableSurfaceToFaceZone::typeName,
67 "\n Usage: searchableSurfaceToFaceZone surface\n\n"
68 " Select all faces whose cell-cell centre vector intersects the surface "
88 const word& defaultName
107 const word& surfaceType,
141 dict.getCompat<
word>(
"surfaceType", {{
"surface", 0}}),
156 if (!isA<faceZoneSet>(set))
159 <<
"Operation only allowed on a faceZoneSet." <<
endl;
175 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
177 start[facei] = cc[mesh_.faceOwner()[facei]];
178 end[facei] = cc[mesh_.faceNeighbour()[facei]];
193 label facei = pp.start()+i;
194 start[facei] = cc[mesh_.faceOwner()[facei]];
195 end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
202 label facei = pp.start()+i;
203 start[facei] = cc[mesh_.faceOwner()[facei]];
204 end[facei] = mesh_.faceCentres()[facei];
214 surfacePtr_().findLine(start, end, hits);
216 surfacePtr_().getNormal(hits, normals);
226 Info<<
" Adding all faces from surface "
227 << surfacePtr_().name() <<
" ..." <<
endl;
235 if (hits[facei].hit() && !fzSet.
found(facei))
237 newAddressing.
append(facei);
238 vector d = end[facei]-start[facei];
239 newFlipMap.
append((normals[facei] & d) < 0);
251 Info<<
" Removing all faces from surface "
252 << surfacePtr_().name() <<
" ..." <<
endl;
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefaultCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Like faceSet but -reads data from faceZone -updates faceZone when writing.
const boolList & flipMap() const noexcept
const labelList & addressing() const noexcept
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Registry of regIOobjects.
constant condensation/saturation model.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
A topoSetSource to select all faces whose cell-cell centre vector intersects with a given searchableS...
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face zon...
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
General set of labels of mesh quantity (points, cells, faces).
virtual bool found(const label id) const
Has the given index?
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static word getSurfaceName(const dictionary &dict, const word &defaultName)
static word getSurfaceName(const dictionary &dict, word surfaceName)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define forAll(list, i)
Loop across all elements in list.