sensitivityBezierFI Class Reference

Calculation of adjoint based sensitivities for Bezier control points using the FI appoach. More...

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

Public Member Functions

 TypeName ("BezierFI")
 Runtime type information. More...
 
 sensitivityBezierFI (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Construct from components. More...
 
virtual ~sensitivityBezierFI ()=default
 Destructor. More...
 
virtual void assembleSensitivities ()
 Assemble sensitivities. More...
 
virtual void clearSensitivities ()
 Zero sensitivity fields and their constituents. More...
 
virtual void write (const word &baseName=word::null)
 Write sensitivities to file. More...
 
- Public Member Functions inherited from FIBase
 TypeName ("volumetricBSplinesFI")
 Runtime type information. More...
 
 FIBase (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Construct from components. More...
 
virtual ~FIBase ()=default
 Destructor. More...
 
virtual bool readDict (const dictionary &dict)
 Read dict if changed. More...
 
virtual void accumulateIntegrand (const scalar dt)
 Accumulate sensitivity integrands. More...
 
- Public Member Functions inherited from shapeSensitivities
 TypeName ("shapeSensitivities")
 Runtime type information. More...
 
 shapeSensitivities (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Construct from components. More...
 
virtual ~shapeSensitivities ()=default
 Destructor. More...
 
- Public Member Functions inherited from adjointSensitivity
 TypeName ("adjointSensitivity")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, adjointSensitivity, dictionary,(const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint),(mesh, dict, primalVars, adjointVars, objectiveManager, fvOptionsAdjoint))
 
 adjointSensitivity (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Construct from components. More...
 
virtual ~adjointSensitivity ()=default
 Destructor. More...
 
virtual const scalarFieldcalculateSensitivities ()
 Calculates and returns sensitivity fields. More...
 
const scalarFieldgetSensitivities () const
 Returns the sensitivity fields. More...
 
tmp< volTensorFieldcomputeGradDxDbMultiplier ()
 
tmp< volVectorFieldadjointMeshMovementSource ()
 Compute source term for adjoint mesh movement equation. More...
 
- 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 dictionarydict () const
 Return the construction dictionary. More...
 
virtual void computeDerivativesSize ()
 Compute design variables number. Does nothing in the base. More...
 

Protected Member Functions

void read ()
 
tmp< volVectorFieldsolveMeshMovementEqn (const label iCP, const label idir)
 
- Protected Member Functions inherited from FIBase
void read ()
 Read options and update solver pointers if necessary. More...
 
- Protected Member Functions inherited from shapeSensitivities
virtual void accumulateDirectSensitivityIntegrand (const scalar dt)
 Accumulate direct sensitivities. More...
 
virtual void accumulateBCSensitivityIntegrand (const scalar dt)
 Accumulate sensitivities enamating from the boundary conditions. More...
 
tmp< boundaryVectorFielddvdbMult () const
 Compute multiplier of dv_i/db. More...
 

Protected Attributes

Bezier Bezier_
 
scalarField flowSens_
 Flow related term. More...
 
scalarField dSdbSens_
 Term depending on delta(n dS)/delta b. More...
 
scalarField dndbSens_
 Term depending on delta(n)/delta b. More...
 
scalarField dxdbDirectSens_
 
scalarField dVdbSens_
 Term depending on delta(V)/delta b. More...
 
scalarField distanceSens_
 Term depending on distance differentiation. More...
 
scalarField optionsSens_
 Term depending on fvOptions. More...
 
scalarField bcSens_
 Term depending on the differenation of boundary conditions. More...
 
fileName derivativesFolder_
 
label meshMovementIters_
 
scalar meshMovementResidualLimit_
 
volVectorField dxdb_
 
- Protected Attributes inherited from FIBase
volTensorField gradDxDbMult_
 grad(dx/db) multiplier More...
 
scalarField divDxDbMult_
 div(dx/db) multiplier More...
 
vectorField optionsDxDbMult_
 dx/db multiplier coming from fvOptions More...
 
bool includeDistance_
 Include distance variation in sens computation. More...
 
autoPtr< adjointEikonalSolvereikonalSolver_
 Adjoint eikonal equation solver. More...
 
- Protected Attributes inherited from shapeSensitivities
autoPtr< boundaryVectorFielddSfdbMult_
 Fields related to direct sensitivities. More...
 
autoPtr< boundaryVectorFielddnfdbMult_
 
autoPtr< boundaryVectorFielddxdbDirectMult_
 
autoPtr< boundaryVectorFieldbcDxDbMult_
 
- Protected Attributes inherited from adjointSensitivity
scalarField derivatives_
 
incompressibleVarsprimalVars_
 
incompressibleAdjointVarsadjointVars_
 
objectiveManagerobjectiveManager_
 
fv::optionAdjointListfvOptionsAdjoint_
 
- Protected Attributes inherited from sensitivity
const fvMeshmesh_
 
dictionary dict_
 
autoPtr< volScalarFieldfieldSensPtr_
 

Additional Inherited Members

- Static Public Member Functions inherited from adjointSensitivity
static autoPtr< adjointSensitivityNew (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Return a reference to the selected turbulence model. More...
 

Detailed Description

Calculation of adjoint based sensitivities for Bezier control points using the FI appoach.

Source files

Definition at line 64 of file sensitivityBezierFIIncompressible.H.

Constructor & Destructor Documentation

◆ sensitivityBezierFI()

sensitivityBezierFI ( const fvMesh mesh,
const dictionary dict,
incompressibleVars primalVars,
incompressibleAdjointVars adjointVars,
objectiveManager objectiveManager,
fv::optionAdjointList fvOptionsAdjoint 
)

Construct from components.

Definition at line 122 of file sensitivityBezierFIIncompressible.C.

References Foam::mkDir(), Foam::read(), and Foam::Zero.

Here is the call graph for this function:

◆ ~sensitivityBezierFI()

virtual ~sensitivityBezierFI ( )
virtualdefault

Destructor.

Member Function Documentation

◆ read()

void read ( )
protected

Definition at line 53 of file sensitivityBezierFIIncompressible.C.

References sensitivity::dict_, dictionary::getOrDefault(), sensitivityBezierFI::meshMovementIters_, sensitivityBezierFI::meshMovementResidualLimit_, FIBase::read(), and dictionary::subOrEmptyDict().

Here is the call graph for this function:

◆ solveMeshMovementEqn()

tmp< volVectorField > solveMeshMovementEqn ( const label  iCP,
const label  idir 
)
protected

Definition at line 67 of file sensitivityBezierFIIncompressible.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), Foam::endl(), Foam::gMax(), Foam::Info, Foam::fvm::laplacian(), Foam::mag(), Foam::read(), tmp< T >::ref(), and fvMatrix< Type >::solve().

Referenced by sensitivityBezierFI::assembleSensitivities().

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

◆ TypeName()

TypeName ( "BezierFI"  )

Runtime type information.

◆ assembleSensitivities()

◆ clearSensitivities()

void clearSensitivities ( )
virtual

Zero sensitivity fields and their constituents.

Reimplemented from FIBase.

Definition at line 303 of file sensitivityBezierFIIncompressible.C.

References sensitivityBezierFI::bcSens_, FIBase::clearSensitivities(), sensitivityBezierFI::distanceSens_, sensitivityBezierFI::dndbSens_, sensitivityBezierFI::dSdbSens_, sensitivityBezierFI::dVdbSens_, sensitivityBezierFI::dxdbDirectSens_, sensitivityBezierFI::flowSens_, sensitivityBezierFI::optionsSens_, and Foam::Zero.

Here is the call graph for this function:

◆ write()

Member Data Documentation

◆ Bezier_

◆ flowSens_

◆ dSdbSens_

scalarField dSdbSens_
protected

◆ dndbSens_

scalarField dndbSens_
protected

◆ dxdbDirectSens_

scalarField dxdbDirectSens_
protected

Term depending on delta(x)/delta b for objectives that directly depend on x

Definition at line 84 of file sensitivityBezierFIIncompressible.H.

Referenced by sensitivityBezierFI::assembleSensitivities(), sensitivityBezierFI::clearSensitivities(), and sensitivityBezierFI::write().

◆ dVdbSens_

scalarField dVdbSens_
protected

◆ distanceSens_

scalarField distanceSens_
protected

◆ optionsSens_

scalarField optionsSens_
protected

◆ bcSens_

scalarField bcSens_
protected

Term depending on the differenation of boundary conditions.

Definition at line 96 of file sensitivityBezierFIIncompressible.H.

Referenced by sensitivityBezierFI::assembleSensitivities(), sensitivityBezierFI::clearSensitivities(), and sensitivityBezierFI::write().

◆ derivativesFolder_

fileName derivativesFolder_
protected

Definition at line 98 of file sensitivityBezierFIIncompressible.H.

Referenced by sensitivityBezierFI::write().

◆ meshMovementIters_

label meshMovementIters_
protected

Definition at line 100 of file sensitivityBezierFIIncompressible.H.

Referenced by sensitivityBezierFI::read().

◆ meshMovementResidualLimit_

scalar meshMovementResidualLimit_
protected

Definition at line 101 of file sensitivityBezierFIIncompressible.H.

Referenced by sensitivityBezierFI::read().

◆ dxdb_

volVectorField dxdb_
protected

Definition at line 102 of file sensitivityBezierFIIncompressible.H.


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