Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propagates it to the volume mesh. More...
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< scalarField > | computeDirection () |
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< optMeshMovement > | optMeshMovement_ |
bool | writeEachMesh_ |
bool | updateGeometry_ |
Protected Attributes inherited from optimisationType | |
fvMesh & | mesh_ |
const dictionary | dict_ |
PtrList< adjointSolverManager > & | adjointSolvManagers_ |
autoPtr< updateMethod > | updateMethod_ |
autoPtr< volScalarField > | sourcePtr_ |
autoPtr< lineSearch > | lineSearch_ |
Additional Inherited Members | |
Static Public Member Functions inherited from optimisationType | |
static autoPtr< optimisationType > | New (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers) |
Return a reference to the selected turbulence model. More... | |
Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propagates it to the volume mesh.
Definition at line 62 of file shapeOptimisationIncompressible.H.
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.
|
virtualdefault |
Destructor.
|
protectedvirtual |
Implements optimisationType.
Definition at line 53 of file shapeOptimisationIncompressible.C.
References Foam::correction().
Referenced by shapeOptimisation::update().
TypeName | ( | "shapeOptimisation" | ) |
Runtime type information.
|
virtual |
Master function. Calls all the others.
Implements optimisationType.
Definition at line 149 of file shapeOptimisationIncompressible.C.
References optimisationType::adjointSolvManagers_, adjointSolverManager::aggregateSensitivities(), shapeOptimisation::computeEta(), adjointSolverManager::constraintSensitivities(), adjointSolverManager::constraintValues(), Foam::correction(), Foam::endl(), forAll, Foam::Info, optimisationType::mesh_, polyMesh::meshSubDir, Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, adjointSolverManager::objectiveValue(), adjointSolverManager::operatingPointWeight(), shapeOptimisation::optMeshMovement_, points, polyMesh::points(), polyMesh::pointsInstance(), PtrList< T >::set(), PtrList< T >::setSize(), shapeOptimisation::updateGeometry_, optimisationType::updateMethod_, shapeOptimisation::writeEachMesh_, and Foam::Zero.
|
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_.
|
virtual |
Store design variables, as the starting point for line search.
Implements optimisationType.
Definition at line 287 of file shapeOptimisationIncompressible.C.
References shapeOptimisation::optMeshMovement_.
|
virtual |
Store design variables, as the starting point for line search.
Implements optimisationType.
Definition at line 293 of file shapeOptimisationIncompressible.C.
References shapeOptimisation::optMeshMovement_.
|
virtual |
Write useful quantities to files.
Reimplemented from optimisationType.
Definition at line 299 of file shapeOptimisationIncompressible.C.
References optimisationType::updateMethod_, and optimisationType::write().
|
protected |
Definition at line 70 of file shapeOptimisationIncompressible.H.
Referenced by shapeOptimisation::resetDesignVariables(), shapeOptimisation::storeDesignVariables(), and shapeOptimisation::update().
|
protected |
Definition at line 72 of file shapeOptimisationIncompressible.H.
Referenced by shapeOptimisation::update().
|
protected |
Definition at line 73 of file shapeOptimisationIncompressible.H.
Referenced by shapeOptimisation::update().