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,
108 const polyMesh&
mesh,
115 searchableSurface::New
123 mesh.objectRegistry::db(),
141 dict.getCompat<
word>(
"surfaceType", {{
"surface", 0}}),
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);
239 newFlipMap.append((normals[facei] & d) < 0);
243 fzSet.addressing().transfer(newAddressing);
244 fzSet.flipMap().transfer(newFlipMap);
251 Info<<
" Removing all faces from surface "
252 << surfacePtr_().name() <<
" ..." <<
endl;
259 forAll(fzSet.addressing(), i)
261 if (!hits[fzSet.addressing()[i]].hit())
263 newAddressing.append(fzSet.addressing()[i]);
264 newFlipMap.append(fzSet.flipMap()[i]);
267 fzSet.addressing().transfer(newAddressing);
268 fzSet.flipMap().transfer(newFlipMap);
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.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
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)
Transfer the contents of the argument List into this list and annul the argument 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,...
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 registered IO, a reference to the associated polyMesh,...
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...
searchableSurfaceToFaceZone(const word &surfaceType, const polyMesh &mesh, const dictionary &dict)
Construct surface-type from dictionary.
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...
topoSetFaceZoneSource(const polyMesh &mesh)
Construct from mesh.
static autoPtr< topoSetFaceZoneSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
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.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
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.
Different types of constants.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static word getSurfaceName(const dictionary &dict, word surfaceName)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.