69 dxdbMult_()[patchI] = meshMovementSens[patchI]*magSf;
72 if (func.hasDivDxDbMult())
74 Info<< func.objectiveName() <<
" " << patch.name() <<
endl;
77 *func.divDxDbMultiplier().boundaryField()[patchI]
93sensitivityShapeESI::sensitivityShapeESI
97 adjointSolver& adjointSolver
100 ShapeSensitivitiesBase(
mesh,
dict, adjointSolver)
110 if (
dict.getOrDefault<
bool>(
"includeMeshMovement",
true))
112 adjointMeshMovementSolver_.reset
114 new adjointMeshMovementSolver(mesh, dict, *this)
126 bool includeMeshMovement =
127 dict.getOrDefault<
bool>(
"includeMeshMovement",
true);
129 if (includeMeshMovement)
131 if (adjointMeshMovementSolver_)
133 adjointMeshMovementSolver_->readDict(
dict);
137 adjointMeshMovementSolver_.reset
153 autoPtr<designVariables>& designVars
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Useful typenames for fields defined only at the boundaries.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
bool hasMultiplier(bool(objective::*hasFunction)() const)
Check if any of the available objective has a certain multiplier, provided through a function object.
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.
Class solving the adjoint grid dispalcement PDEs. Assumes the primal grid displacement PDE is a Lapla...
Abstract base class for adjoint-based sensitivities.
autoPtr< boundaryVectorField > dxdbDirectMult_
Multiplier of dCf/db, found in the objective function.
autoPtr< adjointEikonalSolver > eikonalSolver_
Adjoint eikonal equation solver.
adjointSolver & adjointSolver_
Reference to the underlaying adjoint solver.
autoPtr< boundaryVectorField > dxdbMult_
Multiplier of face dx/db.
autoPtr< adjointMeshMovementSolver > adjointMeshMovementSolver_
Adjoint grid displacement solver.
autoPtr< volTensorField > gradDxDbMult_
Multiplier of grad(dx/b).
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
Base class for adjoint solvers.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
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 fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
bool hasDivDxDbMult() const noexcept
Class for computing sensitivity derivatives using the Enhanced Surface Integral (E-SI) formulation,...
void computeDxDbMult()
Compute dxdbMult from its various components.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
const fvMesh & mesh() const
Return reference to mesh.
const dictionary & dict() const
Return the construction dictionary.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< vector > vectorField
Specialisation of Field<T> for vector.
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
volVectorField::Boundary boundaryVectorField