43 searchableSurfaceToFaceZone,
51 searchableSurfaceToFaceZone::typeName,
52 "\n Usage: searchableSurfaceToFaceZone surface\n\n" 53 " Select all faces whose cell-cell centre vector intersects the surface " 78 mesh.objectRegistry::db(),
102 if (!isA<faceZoneSet>(
set))
105 <<
"Operation only allowed on a faceZoneSet." <<
endl;
120 for (
label facei = 0; facei < mesh_.nInternalFaces(); facei++)
122 start[facei] = cc[mesh_.faceOwner()[facei]];
123 end[facei] = cc[mesh_.faceNeighbour()[facei]];
141 start[facei] = cc[mesh_.faceOwner()[facei]];
142 end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
150 start[facei] = cc[mesh_.faceOwner()[facei]];
151 end[facei] = mesh_.faceCentres()[facei];
161 surfacePtr_().findLine(start, end, hits);
163 surfacePtr_().getNormal(hits, normals);
171 Info<<
" Adding all faces from surface " 172 << surfacePtr_().name() <<
" ..." <<
endl;
179 if (hits[facei].hit() && !fzSet.
found(facei))
181 newAddressing.append(facei);
182 vector d = end[facei]-start[facei];
183 newFlipMap.append((normals[facei] & d) < 0);
193 Info<<
" Removing all faces from surface " 194 << surfacePtr_().name() <<
" ..." <<
endl;
205 newFlipMap.append(fzSet.
flipMap()[i]);
const Time & time() const
Return time.
const labelList & addressing() 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.
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.
const boolList & flipMap() const
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
label start() const
Return start label of this patch in the polyMesh face list.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
A class for handling words, derived from string.
setAction
Enumeration defining the valid actions.
const word & constant() const
Return constant name.
bool found(const Key &) const
Return true if hashedEntry is found in table.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual ~searchableSurfaceToFaceZone()
Destructor.
defineTypeNameAndDebug(combustionModel, 0)
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Like faceSet but updates faceZone when writing.
General set of labels of mesh quantity (points, cells, faces).
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
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.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
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...
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const word & name() const
Return name.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.