Abstract base class for adjoint-based sensitivities. More...


Public Member Functions | |
| TypeName ("adjointSensitivity") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, adjointSensitivity, dictionary,(const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver),(mesh, dict, adjointSolver)) | |
| adjointSensitivity (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver) | |
| Construct from components. More... | |
| virtual | ~adjointSensitivity ()=default |
| Destructor. More... | |
| virtual bool | readDict (const dictionary &dict) |
| Read dictionary if changed. More... | |
| const adjointSolver & | getAdjointSolver () const |
| Const access to adjoint solver. More... | |
| adjointSolver & | getAdjointSolver () |
| Non-const access to adjoint solver. More... | |
| bool | includeDistance () const |
| Should the adjoint eikonal PDE should be solved. More... | |
| autoPtr< adjointEikonalSolver > & | getAdjointEikonalSolver () |
| Return the adjoint eikonal solver. More... | |
| autoPtr< adjointMeshMovementSolver > & | getAdjointMeshMovementSolver () |
| Return the adjoint eikonal solver. More... | |
| void | setSuffix (const word &suffix) |
| Set suffix. More... | |
| const word & | getSuffix () const |
| Get suffix. More... | |
| virtual bool | computeDxDbInternalField () const |
| Should the parameterization compute the internalField of dxdb. More... | |
| virtual void | accumulateIntegrand (const scalar dt)=0 |
| Accumulate sensitivity integrands. More... | |
| virtual void | assembleSensitivities (autoPtr< designVariables > &designVars) |
| Assemble sensitivities. More... | |
| virtual const scalarField & | calculateSensitivities (autoPtr< designVariables > &designVars) |
| Calculates and returns sensitivity fields. More... | |
| const scalarField & | getSensitivities () const |
| Returns the sensitivity fields. More... | |
| virtual void | clearSensitivities () |
| Zero sensitivity fields and their constituents. More... | |
| virtual void | write (const word &baseName=word::null) |
| Write sensitivity fields. More... | |
| const autoPtr< volTensorField > & | gradDxDbMult () const |
| autoPtr< volTensorField > & | gradDxDbMult () |
| const autoPtr< scalarField > & | divDxDbMult () const |
| const autoPtr< boundaryVectorField > & | dxdbMult () const |
| const autoPtr< boundaryVectorField > & | dSfdbMult () const |
| const autoPtr< boundaryVectorField > & | dnfdbMult () const |
| const autoPtr< boundaryVectorField > & | dxdbDirectMult () const |
| const autoPtr< pointBoundaryVectorField > & | pointDxDbDirectMult () const |
| const autoPtr< boundaryVectorField > & | bcDxDbMult () const |
| const autoPtr< vectorField > & | optionsDxDbMult () const |
Public Member Functions inherited from sensitivity | |
| TypeName ("sensitivity") | |
| Runtime type information. More... | |
| sensitivity (const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. More... | |
| virtual | ~sensitivity ()=default |
| Destructor. More... | |
| const fvMesh & | mesh () const |
| Return reference to mesh. More... | |
| const dictionary & | dict () const |
| Return the construction dictionary. More... | |
| const autoPtr< volScalarField > & | fieldSensPtr () const |
| Get the fieldSensPtr. More... | |
Static Public Member Functions | |
| static autoPtr< adjointSensitivity > | New (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver) |
| Return a reference to the selected turbulence model. More... | |
Protected Attributes | |
| adjointSolver & | adjointSolver_ |
| Reference to the underlaying adjoint solver. More... | |
| scalarField | derivatives_ |
| The sensitivity derivative values. More... | |
| word | suffix_ |
| Append this word to files related to the sensitivities. More... | |
| bool | includeDistance_ |
| Include distance variation in sensitivity computations. More... | |
| autoPtr< adjointEikonalSolver > | eikonalSolver_ |
| Adjoint eikonal equation solver. More... | |
| autoPtr< adjointMeshMovementSolver > | adjointMeshMovementSolver_ |
| Adjoint grid displacement solver. More... | |
| autoPtr< volTensorField > | gradDxDbMult_ |
| Multiplier of grad(dx/b) More... | |
| autoPtr< scalarField > | divDxDbMult_ |
| Multiplier of div(dx/db) More... | |
| autoPtr< boundaryVectorField > | dxdbMult_ |
| Multiplier of face dx/db. More... | |
| autoPtr< boundaryVectorField > | dSfdbMult_ |
| Multiplier of dSf/db. More... | |
| autoPtr< boundaryVectorField > | dnfdbMult_ |
| Multiplier of dnf/db. More... | |
| autoPtr< boundaryVectorField > | dxdbDirectMult_ |
| Multiplier of dCf/db, found in the objective function. More... | |
| autoPtr< pointBoundaryVectorField > | pointDxDbDirectMult_ |
| Multiplier of dx/db computed at points, found in the objective function. More... | |
| autoPtr< boundaryVectorField > | bcDxDbMult_ |
| Multiplier of dx/db, coming from boundary conditions that depend on the geometry, like rotatingWallVelocity. More... | |
| autoPtr< vectorField > | optionsDxDbMult_ |
| dx/db multiplier coming from fvOptions More... | |
Protected Attributes inherited from sensitivity | |
| const fvMesh & | mesh_ |
| dictionary | dict_ |
| bool | writeFieldSens_ |
| autoPtr< volScalarField > | fieldSensPtr_ |
Abstract base class for adjoint-based sensitivities.
Definition at line 56 of file adjointSensitivity.H.
| adjointSensitivity | ( | const fvMesh & | mesh, |
| const dictionary & | dict, | ||
| adjointSolver & | adjointSolver | ||
| ) |
Construct from components.
Definition at line 46 of file adjointSensitivity.C.
|
virtualdefault |
Destructor.
| TypeName | ( | "adjointSensitivity" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| adjointSensitivity | , | ||
| dictionary | , | ||
| (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver) | , | ||
| (mesh, dict, adjointSolver) | |||
| ) |
|
static |
Return a reference to the selected turbulence model.
Definition at line 80 of file adjointSensitivity.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, mesh, fvMesh::name(), and dictionary::optionalSubDict().
Referenced by adjointSolver::allocateSensitivities(), and sensitivityMultiple::sensitivityMultiple().


|
virtual |
Read dictionary if changed.
Reimplemented from sensitivity.
Reimplemented in ShapeSensitivitiesBase, sensitivitySurfacePoints, sensitivityTopO, sensitivityShapeESI, and sensitivityMultiple.
Definition at line 113 of file adjointSensitivity.C.
References adjointSensitivity::adjointSolver_, sensitivity::dict(), dictionary::getOrDefault(), adjointSolver::includeDistance(), adjointSensitivity::includeDistance_, and sensitivity::readDict().
Referenced by sensitivityMultiple::readDict(), sensitivityTopO::readDict(), and ShapeSensitivitiesBase::readDict().


|
inline |
Const access to adjoint solver.
Definition at line 234 of file adjointSensitivity.H.
References adjointSensitivity::adjointSolver_.
Referenced by levelSetDesignVariables::assembleSensitivities(), volumetricBSplinesDesignVariables::assembleSensitivities(), topODesignVariables::assembleSensitivities(), adjointMeshMovementSolver::setSource(), and shapeDesignVariables::writeSensitivities().

|
inline |
Non-const access to adjoint solver.
Definition at line 242 of file adjointSensitivity.H.
References adjointSensitivity::adjointSolver_.
|
inline |
Should the adjoint eikonal PDE should be solved.
Definition at line 250 of file adjointSensitivity.H.
References adjointSensitivity::includeDistance_.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Return the adjoint eikonal solver.
Definition at line 258 of file adjointSensitivity.H.
References adjointSensitivity::eikonalSolver_.
Referenced by shapeDesignVariables::assembleSensitivities(), and adjointMeshMovementSolver::setSource().

|
inline |
Return the adjoint eikonal solver.
Definition at line 267 of file adjointSensitivity.H.
References adjointSensitivity::adjointMeshMovementSolver_.
|
inline |
Set suffix.
Definition at line 275 of file adjointSensitivity.H.
References adjointSensitivity::suffix_.
Referenced by sensitivitySurfacePoints::setSuffixName().

|
inline |
Get suffix.
Definition at line 283 of file adjointSensitivity.H.
References adjointSensitivity::suffix_.
Referenced by shapeDesignVariables::writeSensitivities().

|
virtual |
Should the parameterization compute the internalField of dxdb.
Reimplemented in sensitivityShapeFI.
Definition at line 133 of file adjointSensitivity.C.
Referenced by shapeDesignVariables::assembleSensitivities().

|
pure virtual |
Accumulate sensitivity integrands.
Corresponds to the flow and adjoint part of the sensitivities
Implemented in ShapeSensitivitiesBase, sensitivityTopO, and sensitivityMultiple.
|
virtual |
Assemble sensitivities.
Adds the geometric part of the sensitivities
Reimplemented in sensitivitySurfacePoints, sensitivitySurface, sensitivityTopO, sensitivityShapeESI, sensitivityMultiple, and sensitivityShapeFI.
Definition at line 140 of file adjointSensitivity.C.
References designVariables::assembleSensitivities().
Referenced by sensitivityShapeFI::assembleSensitivities(), sensitivityShapeESI::assembleSensitivities(), sensitivityTopO::assembleSensitivities(), and sensitivitySurfacePoints::assembleSensitivities().


|
virtual |
Calculates and returns sensitivity fields.
Used with optimisation libraries
Implements sensitivity.
Reimplemented in sensitivityMultiple.
Definition at line 149 of file adjointSensitivity.C.
References Foam::type(), and Foam::vtk::write().

| const scalarField & getSensitivities | ( | ) | const |
Returns the sensitivity fields.
Assumes it has already been updated/computed
Definition at line 159 of file adjointSensitivity.C.
References adjointSensitivity::derivatives_.
|
virtual |
Zero sensitivity fields and their constituents.
Reimplemented in ShapeSensitivitiesBase, and sensitivityMultiple.
Definition at line 165 of file adjointSensitivity.C.
References adjointSensitivity::adjointMeshMovementSolver_, adjointSensitivity::derivatives_, adjointSensitivity::eikonalSolver_, sensitivity::fieldSensPtr_, and Foam::Zero.
Referenced by ShapeSensitivitiesBase::clearSensitivities().

|
virtual |
Write sensitivity fields.
If valid, copies boundaryFields to volFields and writes them. Virtual to be reimplemented by control points-based methods (Bezier, RBF) which do not need to write fields
Reimplemented from sensitivity.
Reimplemented in ShapeSensitivitiesBase, sensitivitySurfacePoints, and sensitivityMultiple.
Definition at line 183 of file adjointSensitivity.C.
References sensitivity::write().
Referenced by sensitivitySurfacePoints::write(), and ShapeSensitivitiesBase::write().


|
inline |
Definition at line 25 of file adjointSensitivityI.H.
References adjointSensitivity::gradDxDbMult_.
Referenced by shapeDesignVariables::assembleSensitivities(), and adjointMeshMovementSolver::setSource().

|
inline |
Definition at line 32 of file adjointSensitivityI.H.
|
inline |
Definition at line 38 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 45 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 52 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 58 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 64 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 70 of file adjointSensitivityI.H.
|
inline |
Definition at line 76 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities().

|
inline |
Definition at line 82 of file adjointSensitivityI.H.
Referenced by shapeDesignVariables::assembleSensitivities(), and adjointMeshMovementSolver::setSource().

|
protected |
Reference to the underlaying adjoint solver.
Definition at line 68 of file adjointSensitivity.H.
Referenced by sensitivityTopO::accumulateIntegrand(), ShapeSensitivitiesBase::allocateEikonalSolver(), sensitivityShapeESI::computeDxDbMult(), adjointSensitivity::getAdjointSolver(), sensitivityTopO::readDict(), adjointSensitivity::readDict(), and sensitivitySurfacePoints::setSuffixName().
|
protected |
The sensitivity derivative values.
Definition at line 73 of file adjointSensitivity.H.
Referenced by adjointSensitivity::clearSensitivities(), sensitivitySurfacePoints::computePointDerivativesSize(), and adjointSensitivity::getSensitivities().
|
protected |
Append this word to files related to the sensitivities.
Definition at line 78 of file adjointSensitivity.H.
Referenced by adjointSensitivity::getSuffix(), adjointSensitivity::setSuffix(), and sensitivitySurface::smoothSensitivities().
|
protected |
Include distance variation in sensitivity computations.
Definition at line 83 of file adjointSensitivity.H.
Referenced by ShapeSensitivitiesBase::allocateEikonalSolver(), adjointSensitivity::includeDistance(), sensitivityTopO::readDict(), and adjointSensitivity::readDict().
|
protected |
Adjoint eikonal equation solver.
Definition at line 88 of file adjointSensitivity.H.
Referenced by sensitivityTopO::accumulateIntegrand(), ShapeSensitivitiesBase::allocateEikonalSolver(), adjointSensitivity::clearSensitivities(), sensitivityShapeESI::computeDxDbMult(), adjointSensitivity::getAdjointEikonalSolver(), and sensitivityTopO::readDict().
|
protected |
Adjoint grid displacement solver.
Definition at line 93 of file adjointSensitivity.H.
Referenced by adjointSensitivity::clearSensitivities(), sensitivityShapeESI::computeDxDbMult(), adjointSensitivity::getAdjointMeshMovementSolver(), and sensitivitySurfacePoints::setSuffixName().
|
protected |
Multiplier of grad(dx/b)
Definition at line 102 of file adjointSensitivity.H.
Referenced by sensitivityShapeESI::computeDxDbMult(), and adjointSensitivity::gradDxDbMult().
|
protected |
Multiplier of div(dx/db)
Definition at line 107 of file adjointSensitivity.H.
|
protected |
Multiplier of face dx/db.
The term that multiplies the adjoint-related part of the sensitivities in the (E)SI approach
Definition at line 115 of file adjointSensitivity.H.
Referenced by sensitivityShapeESI::computeDxDbMult(), and sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
Multiplier of dSf/db.
Definition at line 120 of file adjointSensitivity.H.
Referenced by sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
Multiplier of dnf/db.
Definition at line 125 of file adjointSensitivity.H.
Referenced by sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
Multiplier of dCf/db, found in the objective function.
Definition at line 130 of file adjointSensitivity.H.
Referenced by sensitivityShapeESI::computeDxDbMult(), and sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
Multiplier of dx/db computed at points, found in the objective function.
Definition at line 136 of file adjointSensitivity.H.
|
protected |
Multiplier of dx/db, coming from boundary conditions that depend on the geometry, like rotatingWallVelocity.
Definition at line 142 of file adjointSensitivity.H.
Referenced by sensitivitySurfacePoints::finalisePointSensitivities().
|
protected |
dx/db multiplier coming from fvOptions
Definition at line 147 of file adjointSensitivity.H.