Go to the documentation of this file.
48 { selectionModeType::smAll,
"all" },
49 { selectionModeType::smVolFaceZone,
"volFaceZone" }
71 <<
"Unknown selectionMode "
73 <<
". Valid selectionMode types : "
86 for (
const label facei : faces_)
88 sumArea += regionMesh().S()[facei];
92 const scalar AOld = A_;
99 if (AName != AOldName)
103 <<
" face(s) with area " << A_ <<
endl;
110 switch (selectionMode_)
115 <<
"- selecting faces using volume-mesh faceZone "
116 << faceSetName_ <<
endl;
118 label
zoneID = mesh_.faceZones().findZoneID(faceSetName_);
122 <<
"Cannot find faceZone " << faceSetName_ <<
endl
123 <<
"Valid faceZones are " << mesh_.faceZones().names()
129 const bitSet isZoneFace(mesh_.nFaces(), addr);
132 const labelUList& faceLabels = regionMesh().faceLabels();
135 for (
const label facei : faceLabels)
137 if (isZoneFace[facei])
144 for (
const label facei : faceLabels)
146 if (isZoneFace[facei])
157 faces_ =
identity(regionMesh().nFaces());
164 <<
"Unknown selectionMode "
165 << selectionModeTypeNames_[selectionMode_]
166 <<
". Valid selectionMode types are "
167 << selectionModeTypeNames_
179 const word& modelType,
187 selectionMode_(selectionModeTypeNames_.get(
"selectionMode", coeffs_)),
188 faceSetName_(
"none"),
195 setSelection(coeffs_);
210 if (mesh_.changing())
212 if (mesh_.topoChanging())
234 if (coeffs_.readIfPresent(
"timeStart", timeStart_))
236 coeffs_.readEntry(
"duration", duration_);
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(limitVelocity, 0)
virtual word timeName() const
Return current time name.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
selectionModeType
Enumeration for selection mode types.
A subset of mesh faces organised as a primitive patch.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static const Enum< selectionModeType > selectionModeTypeNames_
List of selection mode type names.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const labelIOList & zoneID
virtual bool read(const dictionary &dict)
Read source dictionary.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
virtual bool read(const dictionary &dict)
Read source dictionary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool isActive()
Is the source active?
static unsigned int defaultPrecision() noexcept
Return the default precision.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
selectionModeType selectionMode_
Face selection mode.
const std::string patch
OpenFOAM patch number as a std::string.
Base abstract class for handling finite area options (i.e. faOption).
faceSetOption(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch)
Construct from components.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
void setArea()
Recalculate the area.
virtual bool isActive()
Is the source active?
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
word faceSetName_
Name of "volFaceZone" selection.
void setSelection(const dictionary &dict)
Set face selection name from dictionary input.
void setFaceSelection()
Set face selection based on user input selection mode.