71 #ifndef Foam_fvOption_H 72 #define Foam_fvOption_H 166 const word& modelType,
214 static autoPtr<option>
New 217 const dictionary&
dict,
432 const
word& designVariablesName =
word::null
438 const
word& designVariablesName =
word::null
444 const
word& designVariablesName =
word::null
493 #include "fvOptionI.H"
virtual void correct(volScalarField &field)
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvMesh & mesh_
Reference to the mesh database.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual void postProcessAuxSens(const volScalarField &primalField, const volScalarField &adjointField, scalarField &sensField, const word &fieldName=word::null)
void setApplied(const label fieldi)
Set the applied flag to true for field index fieldi.
dictionary dict_
Top level source dictionary.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
bool active() const noexcept
True if source is active.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
iNew(const fvMesh &mesh, const word &name)
const word name_
Source name.
autoPtr< option > clone() const
Return clone.
A class for handling words, derived from Foam::string.
const word modelType_
Model type.
virtual void writeFooter(Ostream &) const
Write the source footer information.
const dictionary & coeffs() const noexcept
Return dictionary.
virtual void checkApplied() const
Check that the source has been applied.
virtual bool read(const dictionary &dict)
Read source dictionary.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual ~option()=default
Destructor.
const word & name() const noexcept
Return const access to the source name.
virtual void postProcessSens(scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
declareRunTimeSelectionTable(autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
bool log
Switch write log to Info.
List< word > wordList
List of word.
virtual void writeData(Ostream &) const
Write the source properties.
Forward declarations of fvMatrix specializations.
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
virtual void writeHeader(Ostream &) const
Write the source header information.
autoPtr< option > operator()(Istream &is) const
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
virtual bool isActive()
Is the source active?
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Tensor of scalars, i.e. Tensor<scalar>.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
dictionary coeffs_
Dictionary containing source coefficients.
bool active_
Source active flag.
TypeName("option")
Runtime type information.
Base abstract class for handling finite volume options (i.e. fvOption).