shapeOptimisation Class Reference

Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propagates it to the volume mesh. More...

Inheritance diagram for shapeOptimisation:
[legend]
Collaboration diagram for shapeOptimisation:
[legend]

Public Member Functions

 TypeName ("shapeOptimisation")
 Runtime type information. More...
 
 shapeOptimisation (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
 Construct from components. More...
 
virtual ~shapeOptimisation ()=default
 Destructor. More...
 
void update ()
 Master function. Calls all the others. More...
 
virtual void update (scalarField &correction)
 Update design variables based on a given correction. More...
 
virtual void storeDesignVariables ()
 Store design variables, as the starting point for line search. More...
 
virtual void resetDesignVariables ()
 Store design variables, as the starting point for line search. More...
 
virtual void write ()
 Write useful quantities to files. More...
 
- Public Member Functions inherited from optimisationType
 TypeName ("optimisationType")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, optimisationType, dictionary,(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers),(mesh, dict, adjointSolverManagers))
 
 optimisationType (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
 Construct from components. More...
 
virtual ~optimisationType ()=default
 
virtual tmp< scalarFieldcomputeDirection ()
 Compute update direction. More...
 
virtual scalar computeMeritFunction ()
 Compute the merit function of the optimisation problem. More...
 
virtual scalar meritFunctionDirectionalDerivative ()
 Derivative of the merit function. More...
 
virtual void updateOldCorrection (const scalarField &)
 Update old correction. Needed for quasi-Newton Methods. More...
 
const autoPtr< volScalarField > & sourcePtr ()
 Get source term. More...
 
autoPtr< lineSearch > & getLineSearch ()
 Get a reference to the line search object. More...
 

Protected Member Functions

virtual void computeEta (scalarField &correction)
 

Protected Attributes

autoPtr< optMeshMovementoptMeshMovement_
 
bool writeEachMesh_
 
bool updateGeometry_
 
- Protected Attributes inherited from optimisationType
fvMeshmesh_
 
const dictionary dict_
 
PtrList< adjointSolverManager > & adjointSolvManagers_
 
autoPtr< updateMethodupdateMethod_
 
autoPtr< volScalarFieldsourcePtr_
 
autoPtr< lineSearchlineSearch_
 

Additional Inherited Members

- Static Public Member Functions inherited from optimisationType
static autoPtr< optimisationTypeNew (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
 Return a reference to the selected turbulence model. More...
 

Detailed Description

Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propagates it to the volume mesh.

Source files

Definition at line 62 of file shapeOptimisationIncompressible.H.

Constructor & Destructor Documentation

◆ shapeOptimisation()

shapeOptimisation ( fvMesh mesh,
const dictionary dict,
PtrList< adjointSolverManager > &  adjointSolverManagers 
)

Construct from components.

Definition at line 86 of file shapeOptimisationIncompressible.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, optMeshMovement::New(), Foam::nl, patches, and WarningInFunction.

Here is the call graph for this function:

◆ ~shapeOptimisation()

virtual ~shapeOptimisation ( )
virtualdefault

Destructor.

Member Function Documentation

◆ computeEta()

void computeEta ( scalarField correction)
protectedvirtual

Implements optimisationType.

Definition at line 53 of file shapeOptimisationIncompressible.C.

References Foam::correction().

Referenced by shapeOptimisation::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "shapeOptimisation"  )

Runtime type information.

◆ update() [1/2]

◆ update() [2/2]

void update ( scalarField correction)
virtual

Update design variables based on a given correction.

Implements optimisationType.

Definition at line 244 of file shapeOptimisationIncompressible.C.

References shapeOptimisation::computeEta(), Foam::correction(), Foam::endl(), Foam::Info, optimisationType::lineSearch_, optimisationType::mesh_, polyMesh::meshSubDir, IOobject::NO_READ, IOobject::NO_WRITE, shapeOptimisation::optMeshMovement_, points, polyMesh::points(), polyMesh::pointsInstance(), shapeOptimisation::updateGeometry_, and shapeOptimisation::writeEachMesh_.

Here is the call graph for this function:

◆ storeDesignVariables()

void storeDesignVariables ( )
virtual

Store design variables, as the starting point for line search.

Implements optimisationType.

Definition at line 287 of file shapeOptimisationIncompressible.C.

References shapeOptimisation::optMeshMovement_.

◆ resetDesignVariables()

void resetDesignVariables ( )
virtual

Store design variables, as the starting point for line search.

Implements optimisationType.

Definition at line 293 of file shapeOptimisationIncompressible.C.

References shapeOptimisation::optMeshMovement_.

◆ write()

void write ( )
virtual

Write useful quantities to files.

Reimplemented from optimisationType.

Definition at line 299 of file shapeOptimisationIncompressible.C.

References optimisationType::updateMethod_, and optimisationType::write().

Here is the call graph for this function:

Member Data Documentation

◆ optMeshMovement_

◆ writeEachMesh_

bool writeEachMesh_
protected

Definition at line 72 of file shapeOptimisationIncompressible.H.

Referenced by shapeOptimisation::update().

◆ updateGeometry_

bool updateGeometry_
protected

Definition at line 73 of file shapeOptimisationIncompressible.H.

Referenced by shapeOptimisation::update().


The documentation for this class was generated from the following files: