69 dxdbMult_()[patchI] = meshMovementSens[patchI]*magSf;
72 if (func.hasDivDxDbMult())
77 *func.divDxDbMultiplier().boundaryField()[patchI]
93 sensitivityShapeESI::sensitivityShapeESI
96 const dictionary&
dict,
97 adjointSolver& adjointSolver
100 ShapeSensitivitiesBase(
mesh,
dict, adjointSolver)
114 new adjointMeshMovementSolver(
mesh,
dict, *
this)
126 bool includeMeshMovement =
129 if (includeMeshMovement)
131 if (adjointMeshMovementSolver_)
133 adjointMeshMovementSolver_->readDict(
dict);
137 adjointMeshMovementSolver_.reset
139 new adjointMeshMovementSolver(mesh_,
dict, *
this)
153 autoPtr<designVariables>& designVars
void computeDxDbMult()
Compute dxdbMult from its various components.
adjointSolver & adjointSolver_
Reference to the underlaying adjoint solver.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for adjoint-based sensitivities.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const fvMesh & mesh() const
Return reference to mesh.
Macros for easy insertion into run-time selection tables.
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
autoPtr< volTensorField > gradDxDbMult_
Multiplier of grad(dx/b)
autoPtr< adjointMeshMovementSolver > adjointMeshMovementSolver_
Adjoint grid displacement solver.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
virtual const labelHashSet & geometryVariationIntegrationPatches() const
Return set of patches on which to compute direct sensitivities.
autoPtr< boundaryVectorField > dxdbDirectMult_
Multiplier of dCf/db, found in the objective function.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
defineTypeNameAndDebug(combustionModel, 0)
Useful typenames for fields defined only at the boundaries.
const dictionary & dict() const
Return the construction dictionary.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
const std::string patch
OpenFOAM patch number as a std::string.
bool hasDivDxDbMult() const noexcept
messageStream Info
Information stream (stdout output on master, null elsewhere)
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
autoPtr< adjointEikonalSolver > eikonalSolver_
Adjoint eikonal equation solver.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
bool hasMultiplier(bool(objective::*hasFunction)() const)
Check if any of the available objective has a certain multiplier, provided through a function object...
autoPtr< boundaryVectorField > dxdbMult_
Multiplier of face dx/db.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
Class for computing sensitivity derivatives using the Enhanced Surface Integral (E-SI) formulation...