sensitivityTopO Class Reference
Inheritance diagram for sensitivityTopO:
Collaboration diagram for sensitivityTopO:

Public Member Functions

 TypeName ("topO")
 Runtime type information. More...
 
 sensitivityTopO (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver)
 Construct from components. More...
 
virtual ~sensitivityTopO ()=default
 Destructor. More...
 
virtual bool readDict (const dictionary &dict)
 Read dictionary if changed. More...
 
virtual void accumulateIntegrand (const scalar dt)
 Accumulate sensitivity integrands. More...
 
virtual void assembleSensitivities (autoPtr< designVariables > &designVars)
 Assemble sensitivities. More...
 
void postProcessSens (scalarField &sens, scalarField &auxSens, const word &fieldName)
 Add part of the sensitivities coming from fvOptions. More...
 
- Public Member Functions inherited from adjointSensitivity
 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...
 
const adjointSolvergetAdjointSolver () const
 Const access to adjoint solver. More...
 
adjointSolvergetAdjointSolver ()
 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 wordgetSuffix () const
 Get suffix. More...
 
virtual bool computeDxDbInternalField () const
 Should the parameterization compute the internalField of dxdb. More...
 
virtual const scalarFieldcalculateSensitivities (autoPtr< designVariables > &designVars)
 Calculates and returns sensitivity fields. More...
 
const scalarFieldgetSensitivities () 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 fvMeshmesh () const
 Return reference to mesh. More...
 
const dictionarydict () const
 Return the construction dictionary. More...
 
const autoPtr< volScalarField > & fieldSensPtr () const
 Get the fieldSensPtr. More...
 

Static Public Member Functions

static void postProcessSens (scalarField &sens, scalarField &auxSens, fv::options &fvOptions, const word &fieldName, const word &designVariablesName)
 Add part of the sensitivities coming from fvOptions. More...
 
template<class Type , template< class > class PatchField, class GeoMesh >
static void postProcessAuxSens (const GeometricField< Type, PatchField, GeoMesh > &primal, const GeometricField< Type, PatchField, GeoMesh > &adjoint, fv::options &fvOptions, const word &fieldName, scalarField &auxSens)
 Potentially manipulate auxSens within the fvOption before adding the part related to the design variables. More...
 
- Static Public Member Functions inherited from adjointSensitivity
static autoPtr< adjointSensitivityNew (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver)
 Return a reference to the selected turbulence model. More...
 

Protected Member Functions

void zeroSensInFixedPorousZones (scalarField &sens)
 Zero sensitivities in fixed porous zones. More...
 

Protected Attributes

topOZones zones_
 Zones related to topology optimisation. More...
 
word designVariablesName_
 Name used as the argument for the post-processing of the sensitivities through fvOptions. More...
 
- Protected Attributes inherited from adjointSensitivity
adjointSolveradjointSolver_
 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< adjointEikonalSolvereikonalSolver_
 Adjoint eikonal equation solver. More...
 
autoPtr< adjointMeshMovementSolveradjointMeshMovementSolver_
 Adjoint grid displacement solver. More...
 
autoPtr< volTensorFieldgradDxDbMult_
 Multiplier of grad(dx/b) More...
 
autoPtr< scalarFielddivDxDbMult_
 Multiplier of div(dx/db) More...
 
autoPtr< boundaryVectorFielddxdbMult_
 Multiplier of face dx/db. More...
 
autoPtr< boundaryVectorFielddSfdbMult_
 Multiplier of dSf/db. More...
 
autoPtr< boundaryVectorFielddnfdbMult_
 Multiplier of dnf/db. More...
 
autoPtr< boundaryVectorFielddxdbDirectMult_
 Multiplier of dCf/db, found in the objective function. More...
 
autoPtr< pointBoundaryVectorFieldpointDxDbDirectMult_
 Multiplier of dx/db computed at points, found in the objective function. More...
 
autoPtr< boundaryVectorFieldbcDxDbMult_
 Multiplier of dx/db, coming from boundary conditions that depend on the geometry, like rotatingWallVelocity. More...
 
autoPtr< vectorFieldoptionsDxDbMult_
 dx/db multiplier coming from fvOptions More...
 
- Protected Attributes inherited from sensitivity
const fvMeshmesh_
 
dictionary dict_
 
bool writeFieldSens_
 
autoPtr< volScalarFieldfieldSensPtr_
 

Detailed Description

Source files

Definition at line 53 of file sensitivityTopO.H.

Constructor & Destructor Documentation

◆ sensitivityTopO()

sensitivityTopO ( const fvMesh mesh,
const dictionary dict,
adjointSolver adjointSolver 
)

Construct from components.

Definition at line 87 of file sensitivityTopO.C.

References Foam::dimLength, Foam::dimTime, Foam::pow5(), solver::solverName(), Foam::sqr(), and Foam::Zero.

Here is the call graph for this function:

◆ ~sensitivityTopO()

virtual ~sensitivityTopO ( )
virtualdefault

Destructor.

Member Function Documentation

◆ zeroSensInFixedPorousZones()

void zeroSensInFixedPorousZones ( scalarField sens)
protected

◆ TypeName()

TypeName ( "topO"  )

Runtime type information.

◆ readDict()

bool readDict ( const dictionary dict)
virtual

◆ accumulateIntegrand()

void accumulateIntegrand ( const scalar  dt)
virtual

◆ assembleSensitivities()

void assembleSensitivities ( autoPtr< designVariables > &  designVars)
virtual

Assemble sensitivities.

Reimplemented from adjointSensitivity.

Definition at line 174 of file sensitivityTopO.C.

References adjointSensitivity::assembleSensitivities().

Here is the call graph for this function:

◆ postProcessSens() [1/2]

void postProcessSens ( scalarField sens,
scalarField auxSens,
fv::options fvOptions,
const word fieldName,
const word designVariablesName 
)
static

Add part of the sensitivities coming from fvOptions.

Definition at line 191 of file sensitivityTopO.C.

References optionList::appliesToField(), DebugInfo, Foam::endl(), fvOptions, and optionList::postProcessSens().

Referenced by adjointEikonalSolver::topologySensitivities(), adjointSpalartAllmaras::topologySensitivities(), adjointkOmegaSST::topologySensitivities(), and incompressibleAdjointSolver::topOSensMultiplier().

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

◆ postProcessSens() [2/2]

void postProcessSens ( scalarField sens,
scalarField auxSens,
const word fieldName 
)

Add part of the sensitivities coming from fvOptions.

Definition at line 211 of file sensitivityTopO.C.

References fvOptions, and options::New().

Here is the call graph for this function:

◆ postProcessAuxSens()

void postProcessAuxSens ( const GeometricField< Type, PatchField, GeoMesh > &  primal,
const GeometricField< Type, PatchField, GeoMesh > &  adjoint,
fv::options fvOptions,
const word fieldName,
scalarField auxSens 
)
static

Potentially manipulate auxSens within the fvOption before adding the part related to the design variables.

Definition at line 26 of file sensitivityTopOTemplates.C.

References DebugInfo, Foam::endl(), and fvOptions.

Here is the call graph for this function:

Member Data Documentation

◆ zones_

topOZones zones_
protected

Zones related to topology optimisation.

Definition at line 65 of file sensitivityTopO.H.

Referenced by sensitivityTopO::zeroSensInFixedPorousZones().

◆ designVariablesName_

word designVariablesName_
protected

Name used as the argument for the post-processing of the sensitivities through fvOptions.

Definition at line 71 of file sensitivityTopO.H.

Referenced by sensitivityTopO::accumulateIntegrand().


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