82#ifndef Foam_fa_option_H
83#define Foam_fa_option_H
108 void constructMeshObjects();
204 const word& defaultAreaName =
word()
233 const word& defaultAreaName
238 area_(defaultAreaName)
262 const word& defaultAreaName =
word()
310 inline bool active(
bool on)
noexcept;
Forwards and collection of common area field types.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite area solutions of scalar equations....
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
autoPtr< option > operator()(Istream &is) const
iNew(const fvMesh &mesh, const word &name, const word &defaultAreaName) noexcept
Base abstract class for handling finite area options (i.e. faOption).
virtual void addSup(const areaScalarField &h, faMatrix< tensor > &eqn, const label fieldi)
autoPtr< option > clone() const
Return clone.
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
virtual void constrain(faMatrix< tensor > &eqn, const label fieldi)
const fvMesh & mesh() const noexcept
Return const access to the volume mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
const word modelType_
Model type.
word areaName_
The finite-area mesh name.
virtual void addSup(const areaScalarField &h, faMatrix< sphericalTensor > &eqn, const label fieldi)
word suffixHint_
Suffix hint for variable names (default: "").
virtual void checkApplied() const
Check that the source has been applied.
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
const fvMesh & mesh_
Reference to the mesh database.
virtual void correct(areaTensorField &field)
void setApplied(const label fieldi)
Set the applied flag to true for field index fieldi.
word suffixed(const char *base) const
Return the concatenation of base and the suffix hint.
virtual ~option()=default
Destructor.
word regionName_
The model region name (finite-area).
TypeName("option")
Runtime type information.
wordList fieldNames_
Field names to apply source to - populated by derived models.
virtual void correct(areaVectorField &field)
static bool sameRegionNames(const word &name1, const word &name2)
Compare the region names.
const word & areaName() const noexcept
The finite-area mesh name.
dictionary dict_
Top level source dictionary.
declareRunTimeSelectionTable(autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &areaName),(name, modelType, dict, mesh, areaName))
virtual bool isActive()
Is the source active?
bool active() const noexcept
True if source is active.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Return a reference to the selected faOption model.
virtual void correct(areaScalarField &field)
dictionary coeffs_
Dictionary containing source coefficients.
virtual void writeData(Ostream &) const
Write the source properties.
virtual void constrain(faMatrix< scalar > &eqn, const label fieldi)
const word & name() const noexcept
The source name.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< tensor > &eqn, const label fieldi)
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from components.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< symmTensor > &eqn, const label fieldi)
virtual void constrain(faMatrix< vector > &eqn, const label fieldi)
virtual void addSup(const areaScalarField &h, faMatrix< vector > &eqn, const label fieldi)
const volSurfaceMapping & vsm() const
Return volSurfaceMapping (demand-driven).
virtual void writeHeader(Ostream &) const
Write the source header information.
virtual void correct(areaSymmTensorField &field)
virtual void addSup(const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
virtual void constrain(faMatrix< sphericalTensor > &eqn, const label fieldi)
virtual void constrain(faMatrix< symmTensor > &eqn, const label fieldi)
const faMesh & regionMesh() const
Return the region mesh database (demand-driven).
const word & suffixHint() const noexcept
The suffix hint when generating variable names.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< sphericalTensor > &eqn, const label fieldi)
virtual void addSup(const areaScalarField &h, faMatrix< symmTensor > &eqn, const label fieldi)
bool log
Switch write log to Info.
const word & regionName() const noexcept
The model region name.
virtual void writeFooter(Ostream &) const
Write the source footer information.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< vector > &eqn, const label fieldi)
virtual void correct(areaSphericalTensorField &field)
const dictionary & coeffs() const noexcept
Return dictionary.
const word name_
Source name.
Mesh data needed to do the Finite Volume discretisation.
Volume to surface and surface to volume mapping.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Forward declarations of standard faMatrix types/specializations.
Namespace for finite-area.
List< word > wordList
List of word.
GeometricField< tensor, faPatchField, areaMesh > areaTensorField
GeometricField< sphericalTensor, faPatchField, areaMesh > areaSphericalTensorField
GeometricField< symmTensor, faPatchField, areaMesh > areaSymmTensorField
GeometricField< vector, faPatchField, areaMesh > areaVectorField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.