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 "
124 <<
"No matching faceZones: " << zoneName_ <<
nl
133 const bitSet isZoneFace(mesh_.faceZones().selection(
zoneIDs));
135 const labelUList& faceLabels = regionMesh().faceLabels();
137 faces_.resize_nocopy(faceLabels.
size());
140 for (
const label facei : faceLabels)
142 if (isZoneFace[facei])
144 faces_[nUsed] = facei;
148 faces_.resize(nUsed);
162 <<
"Unknown selectionMode "
163 << selectionModeTypeNames_[selectionMode_]
164 <<
". Valid selectionMode types are "
165 << selectionModeTypeNames_
177 const word& modelType,
185 selectionMode_(selectionModeTypeNames_.get(
"selectionMode", coeffs_)),
208 if (mesh_.changing())
210 if (mesh_.topoChanging())
232 if (coeffs_.readIfPresent(
"timeStart", timeStart_))
234 coeffs_.readEntry(
"duration", duration_);
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
static unsigned int defaultPrecision() noexcept
Return the default precision.
virtual bool read()
Re-read model coefficients if they have changed.
virtual word timeName() const
Return current time name.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Intermediate abstract class for handling face-set options for the derived faOptions.
void setFaceSelection()
Set face selection based on user input selection mode.
void setSelection(const dictionary &dict)
Set face selection name from dictionary input.
selectionModeType
Enumeration for selection mode types.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual bool isActive()
Is the source active?
wordRe zoneName_
Name of zone for (volume) "faceZone" selection.
selectionModeType selectionMode_
Face selection mode.
static const Enum< selectionModeType > selectionModeTypeNames_
List of selection mode type names.
void setArea()
Recalculate the area.
Base abstract class for handling finite area options (i.e. faOption).
dictionary coeffs_
Dictionary containing source coefficients.
virtual bool isActive()
Is the source active?
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
const labelIOList & zoneIDs
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
constexpr char nl
The newline '\n' character (0x0a)