Go to the documentation of this file.
45 searchableSurfaceToFaceZone,
50 topoSetFaceZoneSource,
51 searchableSurfaceToFaceZone,
56 topoSetFaceZoneSource,
57 searchableSurfaceToFaceZone,
67 searchableSurfaceToFaceZone::typeName,
68 "\n Usage: searchableSurfaceToFaceZone surface\n\n"
69 " Select all faces whose cell-cell centre vector intersects the surface "
79 const word& defaultName
104 const word& surfaceType,
117 getSurfaceName(
dict,
mesh.objectRegistry::db().name()),
118 mesh.time().constant(),
120 mesh.objectRegistry::db(),
138 dict.getCompat<
word>(
"surfaceType", {{
"surface", 0}}),
153 if (!isA<faceZoneSet>(
set))
156 <<
"Operation only allowed on a faceZoneSet." <<
endl;
172 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
174 start[facei] = cc[mesh_.faceOwner()[facei]];
175 end[facei] = cc[mesh_.faceNeighbour()[facei]];
180 syncTools::swapBoundaryCellPositions(mesh_, cc, nbrCellCentres);
190 label facei = pp.start()+i;
191 start[facei] = cc[mesh_.faceOwner()[facei]];
192 end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
199 label facei = pp.start()+i;
200 start[facei] = cc[mesh_.faceOwner()[facei]];
201 end[facei] = mesh_.faceCentres()[facei];
211 surfacePtr_().findLine(start,
end, hits);
213 surfacePtr_().getNormal(hits, normals);
219 if (action == topoSetSource::ADD || action == topoSetSource::NEW)
223 Info<<
" Adding all faces from surface "
224 << surfacePtr_().name() <<
" ..." <<
endl;
232 if (hits[facei].hit() && !fzSet.
found(facei))
234 newAddressing.append(facei);
236 newFlipMap.append((normals[facei] & d) < 0);
244 else if (action == topoSetSource::SUBTRACT)
248 Info<<
" Removing all faces from surface "
249 << surfacePtr_().name() <<
" ..." <<
endl;
261 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.
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
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.
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face zon...
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 (stdout output on master, null elsewhere)
A patch is a list of labels that address the faces in the global face list.
void transfer(List< T > &list)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
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).
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.
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.