43 searchableSurfaceToFaceZone,
51 searchableSurfaceToFaceZone::typeName,
52 "\n Usage: searchableSurfaceToFaceZone surface\n\n" 53 " Select all faces whose cell-cell centre vector intersects the surface " 77 mesh.objectRegistry::db(),
101 if (!isA<faceZoneSet>(
set))
104 <<
"Operation only allowed on a faceZoneSet." <<
endl;
119 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
121 start[facei] = cc[mesh_.faceOwner()[facei]];
122 end[facei] = cc[mesh_.faceNeighbour()[facei]];
140 start[facei] = cc[mesh_.faceOwner()[facei]];
141 end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
149 start[facei] = cc[mesh_.faceOwner()[facei]];
150 end[facei] = mesh_.faceCentres()[facei];
160 surfacePtr_().findLine(start, end, hits);
162 surfacePtr_().getNormal(hits, normals);
170 Info<<
" Adding all faces from surface " 171 << surfacePtr_().name() <<
" ..." <<
endl;
178 if (hits[facei].hit() && !fzSet.
found(facei))
180 newAddressing.append(facei);
181 vector d = end[facei]-start[facei];
182 newFlipMap.append((normals[facei] & d) < 0);
192 Info<<
" Removing all faces from surface " 193 << surfacePtr_().name() <<
" ..." <<
endl;
204 newFlipMap.append(fzSet.
flipMap()[i]);
const boolList & flipMap() const
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
searchableSurfaceToFaceZone(const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
bool found(const Key &) const
Return true if hashedEntry is found in table.
A class for handling words, derived from string.
const word & constant() const
Return constant name.
setAction
Enumeration defining the valid actions.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual ~searchableSurfaceToFaceZone()
Destructor.
const Time & time() const
Return time.
defineTypeNameAndDebug(combustionModel, 0)
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Like faceSet but -reads data from faceZone -updates faceZone when writing.
General set of labels of mesh quantity (points, cells, faces).
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
label start() const
Return start label of this patch in the polyMesh face list.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const labelList & addressing() const
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.