71#ifndef Foam_fvOption_H
72#define Foam_fvOption_H
165 const word& modelType,
427 const
word& designVariablesName =
word::null
433 const
word& designVariablesName =
word::null
439 const
word& designVariablesName =
word::null
466#include "fvOptionI.H"
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
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 volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
autoPtr< option > operator()(Istream &is) const
iNew(const fvMesh &mesh, const word &name)
Base abstract class for handling finite volume options (i.e. fvOption).
autoPtr< option > clone() const
Return clone.
const word modelType_
Model type.
bool active_
Source active flag.
const word & name() const noexcept
Return const access to the source name.
const dictionary & coeffs() const noexcept
Return dictionary.
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
const fvMesh & mesh_
Reference to the mesh database.
void setApplied(const label fieldi)
Set the applied flag to true for field index fieldi.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
virtual ~option()=default
Destructor.
TypeName("option")
Runtime type information.
wordList fieldNames_
Field names to apply source to - populated by derived models.
virtual void checkApplied() const
Check that the source has been applied.
virtual void postProcessSens(scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
dictionary dict_
Top level source dictionary.
bool active() const noexcept
True if source is active.
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
declareRunTimeSelectionTable(autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
dictionary coeffs_
Dictionary containing source coefficients.
virtual void writeHeader(Ostream &) const
Write the source header information.
virtual void writeFooter(Ostream &) const
Write the source footer information.
virtual bool isActive()
Is the source active?
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
virtual void writeData(Ostream &) const
Write the source properties.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
bool log
Switch write log to Info.
const word name_
Source name.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Forward declarations of fvMatrix specializations.
List< word > wordList
A List of words.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
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.