Base class for creating a set of variables. More...
#include <variablesSet.H>


Public Member Functions | |
| TypeName ("variablesSet") | |
| Run-time type information. | |
| variablesSet (fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh and solver name. | |
| virtual autoPtr< variablesSet > | clone () const |
| Clone the variablesSet. | |
| virtual | ~variablesSet ()=default |
| Destructor. | |
| const word & | solverName () const |
| Return solver name. | |
| bool | useSolverNameForFields () const |
| Append solver name to fields? | |
| template<class Type> | |
| tmp< GeometricField< Type, fvPatchField, volMesh > > | allocateField (const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| template<class Type> | |
| void | renameTurbulenceField (GeometricField< Type, fvPatchField, volMesh > &baseField, const word &solverName) |
| Turbulence model always reads fields with the prescribed name If a custom name is supplied, check whether this field exists, copy it to the field known by the turbulence model and re-name the latter. | |
| tmp< surfaceScalarField > | allocateFluxField (const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| virtual void | transfer (variablesSet &vars) |
| Transfer the fields of another variablesSet to this. | |
Static Public Member Functions | |
| template<class Type> | |
| static void | setField (autoPtr< GeometricField< Type, fvPatchField, volMesh > > &fieldPtr, const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| Read vol fields. | |
| static void | setFluxField (autoPtr< surfaceScalarField > &fieldPtr, const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| Set flux field. | |
| static tmp< volVectorField > | autoCreateMeshMovementField (const fvMesh &mesh, const word &name, const dimensionSet &dims) |
| Auto create variable for mesh movement. | |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| static void | nullifyField (GeometricField< Type, PatchField, GeoMesh > &fieldPtr) |
| Nullify field and old times, if present. | |
Protected Member Functions | |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| autoPtr< GeometricField< Type, PatchField, GeoMesh > > | allocateRenamedField (const autoPtr< GeometricField< Type, PatchField, GeoMesh > > &bf) |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| void | swapAndRename (autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p1, autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p2) |
| Swap autoPtrs and rename managed fields. | |
Protected Attributes | |
| fvMesh & | mesh_ |
| Reference to the mesh database. | |
| word | solverName_ |
| Solver name owning the variables set. | |
| bool | useSolverNameForFields_ |
| Append the solver name to the variables names? | |
| variablesSet | ( | fvMesh & | mesh, |
| const dictionary & | dict ) |
Construct from mesh and solver name.
Definition at line 53 of file variablesSet.C.
References dict, dictName(), mesh, mesh_, solverName_, and useSolverNameForFields_.

|
virtualdefault |
Destructor.
References mesh, Foam::name(), solverName(), and useSolverNameForFields().

|
protected |
Definition at line 159 of file variablesSetTemplates.C.
References name, autoPtr< T >::reset(), and timeName.
Referenced by incompressibleVars::incompressibleVars().


|
protected |
Swap autoPtrs and rename managed fields.
Definition at line 183 of file variablesSetTemplates.C.
Referenced by incompressibleVars::transfer().

|
virtual |
Clone the variablesSet.
Not implemented in base. Should be overloaded in derived classes
Reimplemented in incompressibleVars.
Definition at line 68 of file variablesSet.C.
References NotImplemented.
Referenced by renameTurbulenceField().

| const word & solverName | ( | ) | const |
Return solver name.
Definition at line 77 of file variablesSet.C.
References solverName_.
Referenced by incompressibleAdjointSolver::accumulateOptionsDxDbMultiplier(), adjointkOmegaSST::adjointkOmegaSST(), boundaryAdjointContributionIncompressible::adjointSolverName(), adjointSpalartAllmaras::adjointSpalartAllmaras(), allocateField(), allocateFluxField(), renameTurbulenceField(), setField(), setFluxField(), and ~variablesSet().

| bool useSolverNameForFields | ( | ) | const |
Append solver name to fields?
Definition at line 83 of file variablesSet.C.
References useSolverNameForFields_.
Referenced by adjointkOmegaSST::adjointkOmegaSST(), adjointSpalartAllmaras::adjointSpalartAllmaras(), allocateField(), allocateFluxField(), setField(), setFluxField(), and ~variablesSet().

|
static |
Read vol fields.
Definition at line 214 of file variablesSetTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, mesh, solverName(), and useSolverNameForFields().
Referenced by adjointkOmegaSST::adjointkOmegaSST(), adjointSpalartAllmaras::adjointSpalartAllmaras(), allocateField(), incompressibleAdjointMeanFlowVars::setFields(), and incompressibleVars::setFields().


| tmp< GeometricField< Type, fvPatchField, volMesh > > allocateField | ( | const fvMesh & | mesh, |
| const word & | baseName, | ||
| const word & | solverName, | ||
| const bool | useSolverNameForFields ) |
Definition at line 249 of file variablesSetTemplates.C.
References mesh, autoPtr< T >::ptr(), setField(), solverName(), and useSolverNameForFields().

| void renameTurbulenceField | ( | GeometricField< Type, fvPatchField, volMesh > & | baseField, |
| const word & | solverName ) |
Turbulence model always reads fields with the prescribed name If a custom name is supplied, check whether this field exists, copy it to the field known by the turbulence model and re-name the latter.
Definition at line 267 of file variablesSetTemplates.C.
References IOobjectOption::AUTO_WRITE, GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), clone(), Foam::endl(), forAll, Foam::Info, DimensionedField< Type, GeoMesh >::mesh(), mesh, IOobjectOption::MUST_READ, IOobject::name(), Foam::nl, IOobjectOption::NO_REGISTER, GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), GeometricField< Type, PatchField, GeoMesh >::ref(), regIOobject::rename(), PtrList< T >::set(), solverName(), and IOobject::typeHeaderOk().
Referenced by incompressibleVars::renameTurbulenceFields().


|
static |
Set flux field.
Definition at line 89 of file variablesSet.C.
References IOobjectOption::AUTO_WRITE, Foam::linearInterpolate(), mesh, IOobjectOption::READ_IF_PRESENT, autoPtr< T >::reset(), solverName(), and useSolverNameForFields().
Referenced by allocateFluxField(), incompressibleAdjointMeanFlowVars::setFields(), and incompressibleVars::setFields().


| tmp< surfaceScalarField > allocateFluxField | ( | const fvMesh & | mesh, |
| const volVectorField & | velocity, | ||
| const word & | baseName, | ||
| const word & | solverName, | ||
| const bool | useSolverNameForFields ) |
Definition at line 141 of file variablesSet.C.
References mesh, autoPtr< T >::ptr(), setFluxField(), solverName(), and useSolverNameForFields().

|
static |
Auto create variable for mesh movement.
Definition at line 165 of file variablesSet.C.
References mesh, tmp< T >::New(), IOobjectOption::NO_WRITE, IOobjectOption::READ_IF_PRESENT, and Foam::Zero.
Referenced by shapeDesignVariables::solveMeshMovementEqn().


|
static |
Nullify field and old times, if present.
Definition at line 339 of file variablesSetTemplates.C.
References field(), nullifyField(), oldTime(), and Foam::Zero.
Referenced by adjointkOmegaSST::nullify(), adjointSpalartAllmaras::nullify(), incompressibleAdjointMeanFlowVars::nullify(), and nullifyField().


|
virtual |
Transfer the fields of another variablesSet to this.
Reimplemented in incompressibleVars.
Definition at line 189 of file variablesSet.C.
|
protected |
Reference to the mesh database.
Definition at line 97 of file variablesSet.H.
Referenced by incompressibleVars::incompressibleVars(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleVars::setFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), incompressibleVars::setMeanFields(), variablesSet(), and incompressibleVars::write().
|
protected |
Solver name owning the variables set.
Definition at line 102 of file variablesSet.H.
Referenced by incompressibleVars::renameTurbulenceFields(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleVars::setFields(), solverName(), and variablesSet().
|
protected |
Append the solver name to the variables names?
Definition at line 107 of file variablesSet.H.
Referenced by incompressibleVars::renameTurbulenceFields(), incompressibleAdjointMeanFlowVars::setFields(), incompressibleVars::setFields(), useSolverNameForFields(), variablesSet(), and incompressibleVars::write().