Loading...
Searching...
No Matches
adjointMeshMovementSolver Class Reference

Class solving the adjoint grid dispalcement PDEs. Assumes the primal grid displacement PDE is a Laplace one with uniform diffusivity. More...

#include <adjointMeshMovementSolver.H>

Collaboration diagram for adjointMeshMovementSolver:

Public Member Functions

 TypeName ("adjointMeshMovementSolver")
 Runtime type information.
 adjointMeshMovementSolver (const fvMesh &mesh, const dictionary &dict, ShapeSensitivitiesBase &adjointSensitivity)
 Construct from components.
virtual ~adjointMeshMovementSolver ()=default
virtual bool readDict (const dictionary &dict)
 Read dict if changed.
virtual void solve ()
 Calculate the adjoint distance field.
void reset ()
 Reset the source term.
boundaryVectorFieldmeshMovementSensitivities ()
 Return the sensitivity term depending on ma.
const volVectorFieldma () const
 Return the adjoint distance field.

Protected Member Functions

void read ()
 Read options each time a new solution is found.
void setSource ()
 Set the source term of the PDE.

Protected Attributes

const fvMeshmesh_
 Reference to mesh.
dictionary dict_
 Dictionary containing solution controls.
autoPtr< boundaryVectorFieldmeshMovementSensPtr_
 Part of sensitivity derivatives coming from the adjoint grid displacement PDE.
ShapeSensitivitiesBaseadjointSensitivity_
volVectorField ma_
 Adjoint grid displacement field.
volVectorField source_
 Source term of the adjoint grid displacement PDEs.
label iters_
 Solution controls.
scalar tolerance_

Detailed Description

Class solving the adjoint grid dispalcement PDEs. Assumes the primal grid displacement PDE is a Laplace one with uniform diffusivity.

Reference:

    For the derivation of the adjoint grid displacement PDEs, see
        Kavvadias, I., Papoutsis-Kiachagias, E., & Giannakoglou, K. (2015).
        On the proper treatment of grid sensitivities in continuous adjoint
        methods for shape optimization.
        Journal of Computational Physics, 301, 1–18.
        http://doi.org/10.1016/j.jcp.2015.08.012
Source files

Definition at line 66 of file adjointMeshMovementSolver.H.

Constructor & Destructor Documentation

◆ adjointMeshMovementSolver()

adjointMeshMovementSolver ( const fvMesh & mesh,
const dictionary & dict,
ShapeSensitivitiesBase & adjointSensitivity )

Construct from components.

Definition at line 86 of file adjointMeshMovementSolver.C.

References adjointSensitivity_, Foam::createZeroBoundaryPtr(), dict, dict_, Foam::dimLength, iters_, ma_, mesh, mesh_, meshMovementSensPtr_, read(), source_, Foam::sqr(), timeName, tolerance_, and Foam::Zero.

Here is the call graph for this function:

◆ ~adjointMeshMovementSolver()

virtual ~adjointMeshMovementSolver ( )
virtualdefault

References dict.

Member Function Documentation

◆ read()

void read ( )
protected

Read options each time a new solution is found.

Definition at line 41 of file adjointMeshMovementSolver.C.

References dict_, iters_, and tolerance_.

Referenced by adjointMeshMovementSolver(), and readDict().

Here is the caller graph for this function:

◆ setSource()

void setSource ( )
protected

Set the source term of the PDE.

Definition at line 48 of file adjointMeshMovementSolver.C.

References adjointSensitivity_, Foam::fvc::div(), Foam::fvc::grad(), surfaceInterpolationScheme< Type >::interpolate(), mesh_, and source_.

Referenced by solve().

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

◆ TypeName()

TypeName ( "adjointMeshMovementSolver" )

Runtime type information.

References dict, and mesh.

◆ readDict()

bool readDict ( const dictionary & dict)
virtual

Read dict if changed.

Definition at line 134 of file adjointMeshMovementSolver.C.

References dict, dict_, and read().

Here is the call graph for this function:

◆ solve()

void solve ( )
virtual

Calculate the adjoint distance field.

Definition at line 146 of file adjointMeshMovementSolver.C.

References fvMatrix< Type >::boundaryManipulate(), Foam::endl(), Foam::gMax(), Foam::Info, iters_, Foam::fvm::laplacian(), ma_, Foam::mag(), mesh_, setSource(), Foam::solve(), source_, and tolerance_.

Here is the call graph for this function:

◆ reset()

void reset ( )

Reset the source term.

Definition at line 181 of file adjointMeshMovementSolver.C.

References meshMovementSensPtr_, source_, and Foam::Zero.

◆ meshMovementSensitivities()

boundaryVectorField & meshMovementSensitivities ( )

Return the sensitivity term depending on ma.

Definition at line 188 of file adjointMeshMovementSolver.C.

References adjointSensitivity_, ma_, and meshMovementSensPtr_.

◆ ma()

const volVectorField & ma ( ) const
inline

Return the adjoint distance field.

Definition at line 186 of file adjointMeshMovementSolver.H.

References ma_.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to mesh.

Definition at line 75 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), setSource(), and solve().

◆ dict_

dictionary dict_
protected

Dictionary containing solution controls.

Definition at line 80 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), read(), and readDict().

◆ meshMovementSensPtr_

autoPtr<boundaryVectorField> meshMovementSensPtr_
protected

Part of sensitivity derivatives coming from the adjoint grid displacement PDE.

Definition at line 86 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), meshMovementSensitivities(), and reset().

◆ adjointSensitivity_

ShapeSensitivitiesBase& adjointSensitivity_
protected

◆ ma_

volVectorField ma_
protected

Adjoint grid displacement field.

Definition at line 94 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), ma(), meshMovementSensitivities(), and solve().

◆ source_

volVectorField source_
protected

Source term of the adjoint grid displacement PDEs.

Definition at line 99 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), reset(), setSource(), and solve().

◆ iters_

label iters_
protected

Solution controls.

Definition at line 104 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), read(), and solve().

◆ tolerance_

scalar tolerance_
protected

Definition at line 105 of file adjointMeshMovementSolver.H.

Referenced by adjointMeshMovementSolver(), read(), and solve().


The documentation for this class was generated from the following files:
  • src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/adjointMeshMovementSolver/adjointMeshMovementSolver.H
  • src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/adjointMeshMovementSolver/adjointMeshMovementSolver.C