Go to the documentation of this file.
45 void Foam::fa::option::constructMeshObjects()
59 const word& modelType,
65 modelType_(modelType),
66 mesh_(
patch.boundaryMesh().mesh()),
69 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
70 active_(
dict.getOrDefault<
Switch>(
"active",
true)),
73 regionName_(
dict.get<
word>(
"region")),
74 regionMeshPtr_(
nullptr),
77 constructMeshObjects();
95 <<
"Selecting finite area options type " << modelType <<
endl;
97 const_cast<Time&
>(
patch.boundaryMesh().mesh().time()).libs().open
101 dictionaryConstructorTablePtr_
104 auto cstrIter = dictionaryConstructorTablePtr_->
cfind(modelType);
106 if (!cstrIter.found())
109 <<
"Unknown faOption model type "
110 << modelType <<
nl <<
nl
111 <<
"Valid faOption types are:" <<
nl
112 << dictionaryConstructorTablePtr_->sortedToc()
130 return fieldNames_.find(fieldName);
141 <<
"Source " << name_ <<
" defined for field "
142 << fieldNames_[i] <<
" but never used" <<
endl;
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A special matrix type and solver, designed for finite area solutions of scalar equations....
A class for handling words, derived from Foam::string.
virtual void constrain(faMatrix< scalar > &eqn, const label fieldi)
virtual void addSup(const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
virtual void checkApplied() const
Check that the source has been applied.
option(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch)
Construct from components.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvPatch &patch)
Return a reference to the selected faOption model.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Ostream & incrIndent(Ostream &os)
Increment the indent level.
#define forAll(list, i)
Loop across all elements in list.
const fvMesh & mesh_
Reference to the mesh database.
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
autoPtr< faMesh > regionMeshPtr_
Pointer to the region mesh database.
autoPtr< volSurfaceMapping > vsmPtr_
Volume-to surface mapping.
const dimensionedScalar h
Planck constant.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
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,...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool isActive()
Is the source active?
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual void correct(areaScalarField &field)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
const std::string patch
OpenFOAM patch number as a std::string.
defineTypeNameAndDebug(faceSetOption, 0)
defineRunTimeSelectionTable(option, dictionary)
#define WarningInFunction
Report a warning using Foam::Warning.