39#ifndef adjointSensitivityIncompressible_H
40#define adjointSensitivityIncompressible_H
61class adjointSensitivity
129 adjointSensitivity(
const adjointSensitivity&) =
delete;
132 void operator=(
const adjointSensitivity&) =
delete;
216 inline autoPtr<adjointMeshMovementSolver>&
Useful typenames for fields defined only at the boundaries.
autoPtr< scalarField > divDxDbMult_
Multiplier of div(dx/db).
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
autoPtr< adjointEikonalSolver > & getAdjointEikonalSolver()
Return the adjoint eikonal solver.
bool includeDistance_
Include distance variation in sensitivity computations.
const autoPtr< volTensorField > & gradDxDbMult() const
autoPtr< boundaryVectorField > dxdbDirectMult_
Multiplier of dCf/db, found in the objective function.
virtual const scalarField & calculateSensitivities(autoPtr< designVariables > &designVars)
Calculates and returns sensitivity fields.
const autoPtr< vectorField > & optionsDxDbMult() const
declareRunTimeSelectionTable(autoPtr, adjointSensitivity, dictionary,(const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver),(mesh, dict, adjointSolver))
autoPtr< pointBoundaryVectorField > pointDxDbDirectMult_
Multiplier of dx/db computed at points, found in the objective function.
void setSuffix(const word &suffix)
Set suffix.
autoPtr< adjointEikonalSolver > eikonalSolver_
Adjoint eikonal equation solver.
autoPtr< boundaryVectorField > bcDxDbMult_
Multiplier of dx/db, coming from boundary conditions that depend on the geometry, like rotatingWallVe...
TypeName("adjointSensitivity")
Runtime type information.
autoPtr< adjointMeshMovementSolver > & getAdjointMeshMovementSolver()
Return the adjoint eikonal solver.
adjointSolver & adjointSolver_
Reference to the underlaying adjoint solver.
autoPtr< vectorField > optionsDxDbMult_
dx/db multiplier coming from fvOptions
virtual ~adjointSensitivity()=default
Destructor.
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
bool includeDistance() const
Should the adjoint eikonal PDE should be solved.
const autoPtr< boundaryVectorField > & dxdbDirectMult() const
autoPtr< boundaryVectorField > dxdbMult_
Multiplier of face dx/db.
const adjointSolver & getAdjointSolver() const
Const access to adjoint solver.
virtual void accumulateIntegrand(const scalar dt)=0
Accumulate sensitivity integrands.
adjointSolver & getAdjointSolver()
Non-const access to adjoint solver.
const autoPtr< boundaryVectorField > & dnfdbMult() const
virtual bool computeDxDbInternalField() const
Should the parameterization compute the internalField of dxdb.
scalarField derivatives_
The sensitivity derivative values.
const autoPtr< boundaryVectorField > & dxdbMult() const
const scalarField & getSensitivities() const
Returns the sensitivity fields.
const autoPtr< scalarField > & divDxDbMult() const
static autoPtr< adjointSensitivity > New(const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver)
Return a reference to the selected turbulence model.
const autoPtr< pointBoundaryVectorField > & pointDxDbDirectMult() const
autoPtr< boundaryVectorField > dnfdbMult_
Multiplier of dnf/db.
const autoPtr< boundaryVectorField > & dSfdbMult() const
autoPtr< adjointMeshMovementSolver > adjointMeshMovementSolver_
Adjoint grid displacement solver.
autoPtr< boundaryVectorField > dSfdbMult_
Multiplier of dSf/db.
const word & getSuffix() const
Get suffix.
autoPtr< volTensorField > gradDxDbMult_
Multiplier of grad(dx/b).
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
const autoPtr< boundaryVectorField > & bcDxDbMult() const
word suffix_
Append this word to files related to the sensitivities.
Base class for adjoint solvers.
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,...
Mesh data needed to do the Finite Volume discretisation.
const fvMesh & mesh() const
Return reference to mesh.
const dictionary & dict() const
Return the construction dictionary.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
#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.