71#ifndef Foam_fvOption_H
72#define Foam_fvOption_H
166 const word& modelType,
214 static autoPtr<option>
New
432 const
word& designVariablesName =
word::null
438 const
word& designVariablesName =
word::null
444 const
word& designVariablesName =
word::null
493#include "fvOptionI.H"
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 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)
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
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)
virtual void postProcessAuxSens(const volScalarField &primalField, const volScalarField &adjointField, scalarField &sensField, const word &fieldName=word::null)
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 correct(volScalarField &field)
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.
Namespace for finite-volume.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
List< word > wordList
List of word.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
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.
Forwards and collection of common volume field types.