38 #ifndef shapeDesignVariables_H 39 #define shapeDesignVariables_H 245 adjointSensitivity& adjointSens
252 const adjointSensitivity& adjointSens
256 virtual tmp<vectorField>
dxdbVol 269 virtual tmp<vectorField>
dndb 276 virtual tmp<vectorField>
dSdb 284 virtual tmp<volVectorField>
dCdb(
const label varID)
const;
virtual scalar computeEta(scalarField &correction)=0
Compute eta if not set in the first step.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
scalarField optionsSens_
Term depending on fvOptions.
virtual const labelList & activeSensitivities() const
Active variables for which to compute sensitivities.
bool writeEachMesh_
Write the mesh points irrespective of whether this is a write time.
virtual tmp< vectorField > dxdbFace(const label patchI, const label varID) const
Get dxdb for a given design variable and patch.
A class for handling file names.
virtual void writeSensitivities(const scalarField &sens, const adjointSensitivity &adjointSens)
Write final sensitivity derivatives to files.
autoPtr< displacementMethod > displMethodPtr_
Mesh movement mechanism.
virtual void storeDesignVariables()
Store design variables, as the starting point for line search.
scalarField dxdbDirectSens_
Term depending on delta(x)/delta b for objectives that directly depend on x.
virtual tmp< volVectorField > dCdb(const label varID) const
Get dCdb for a given design variable.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void zeroSensFields()
Zero the fields assosiated with the computation of sensitivities.
virtual void resetDesignVariables()
Reset to starting point of line search.
virtual void moveMesh()
Move mesh based on displacementMethod.
virtual tmp< scalarField > assembleSensitivities(adjointSensitivity &adjointSens)
Add part of sensitivity derivatives related to geometry variations.
virtual label sensSize() const
Size of the sensitivity derivatives.
virtual bool globalSum() const =0
Whether to use global sum when computing matrix-vector products in update methods.
virtual tmp< volVectorField > solveMeshMovementEqn(const label patchI, const label varID) const
Compute dxdb at the mesh cell centers by solving a Laplace PDE.
static autoPtr< shapeDesignVariables > New(fvMesh &mesh, const dictionary &dict)
Construct and return the selected shapeDesignVariables.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< vectorField > dndb(const label patchI, const label varID) const
Get dndb for a given design variable and patch.
declareRunTimeSelectionTable(autoPtr, shapeDesignVariables, dictionary,(fvMesh &mesh, const dictionary &dict),(mesh, dict))
scalarField dndbSens_
Term depending on delta(n)/delta b.
scalarField dVdbSens_
Term depending on delta(V)/delta b.
scalarField bcSens_
Term depending on the differenation of boundary conditions.
scalarField dSdbSens_
Term depending on delta(n dS)/delta b.
virtual void update(scalarField &correction)=0
Update design variables based on a given correction.
scalarField dxdbSurfSens_
Flow related term.
fileName derivativesFolder_
Name of the sensitivity derivatives folder.
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
const labelHashSet & getPatches() const
Patches affected by the parameterisation.
Abstract base class for defining design variables.
TypeName("shape")
Runtime type information.
Abstract base class for defining design variables for shape optimisation.
Mesh data needed to do the Finite Volume discretisation.
virtual tmp< vectorField > dSdb(const label patchI, const label varID) const
Get dSdb for a given design variable and patch.
void allocateSensFields()
Allocate the fields assosiated with the computation of sensitivities.
autoPtr< pointField > pointsInit_
Store old points. Useful for line search.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
scalarField dxdbVolSens_
Flow related term.
scalarField distanceSens_
Term depending on distance differentiation.
autoPtr< displacementMethod > & returnDisplacementMethod()
Return displacementMethod.
virtual ~shapeDesignVariables()=default
Destructor.
labelHashSet parametertisedPatches_
Patches to be moved by the design variables.
virtual tmp< vectorField > dxdbVol(const label varID) const
Get dxdb for all mesh points.