Loading...
Searching...
No Matches
sensitivityTopO Class Reference

#include <sensitivityTopO.H>

Inheritance diagram for sensitivityTopO:
Collaboration diagram for sensitivityTopO:

Public Member Functions

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

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.
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.
Static Public Member Functions inherited from adjointSensitivity
static autoPtr< adjointSensitivity > New (const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver)
 Return a reference to the selected turbulence model.

Protected Member Functions

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

Protected Attributes

topOZones zones_
 Zones related to topology optimisation.
word designVariablesName_
 Name used as the argument for the post-processing of the sensitivities through fvOptions.
Protected Attributes inherited from adjointSensitivity
adjointSolveradjointSolver_
 Reference to the underlaying adjoint solver.
scalarField derivatives_
 The sensitivity derivative values.
word suffix_
 Append this word to files related to the sensitivities.
bool includeDistance_
 Include distance variation in sensitivity computations.
autoPtr< adjointEikonalSolvereikonalSolver_
 Adjoint eikonal equation solver.
autoPtr< adjointMeshMovementSolveradjointMeshMovementSolver_
 Adjoint grid displacement solver.
autoPtr< volTensorFieldgradDxDbMult_
 Multiplier of grad(dx/b).
autoPtr< scalarFielddivDxDbMult_
 Multiplier of div(dx/db).
autoPtr< boundaryVectorFielddxdbMult_
 Multiplier of face dx/db.
autoPtr< boundaryVectorFielddSfdbMult_
 Multiplier of dSf/db.
autoPtr< boundaryVectorFielddnfdbMult_
 Multiplier of dnf/db.
autoPtr< boundaryVectorFielddxdbDirectMult_
 Multiplier of dCf/db, found in the objective function.
autoPtr< pointBoundaryVectorFieldpointDxDbDirectMult_
 Multiplier of dx/db computed at points, found in the objective function.
autoPtr< boundaryVectorFieldbcDxDbMult_
 Multiplier of dx/db, coming from boundary conditions that depend on the geometry, like rotatingWallVelocity.
autoPtr< vectorFieldoptionsDxDbMult_
 dx/db multiplier coming from fvOptions
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()

virtual ~sensitivityTopO ( )
virtualdefault

Destructor.

References sensitivity::dict(), and fvOptions.

Here is the call graph for this function:

Member Function Documentation

◆ zeroSensInFixedPorousZones()

void zeroSensInFixedPorousZones ( scalarField & sens)
protected

Zero sensitivities in fixed porous zones.

Definition at line 40 of file sensitivityTopO.C.

References UList< T >::empty(), sensitivity::mesh_, UList< T >::size(), Foam::Zero, and zones_.

Referenced by assembleSensitivities().

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

◆ TypeName()

TypeName ( "topO" )

Runtime type information.

References sensitivity::dict(), and sensitivity::mesh().

Here is the call graph for this function:

◆ readDict()

bool readDict ( const dictionary & dict)
virtual

◆ accumulateIntegrand()

void accumulateIntegrand ( const scalar dt)
virtual

Accumulate sensitivity integrands.

Implements adjointSensitivity.

Definition at line 160 of file sensitivityTopO.C.

References adjointSensitivity::adjointSolver_, designVariablesName_, adjointSensitivity::eikonalSolver_, sensitivity::fieldSensPtr_, and primitiveFieldRef().

Here is the call graph for this function:

◆ assembleSensitivities()

void assembleSensitivities ( autoPtr< designVariables > & designVars)
virtual

Assemble sensitivities.

Reimplemented from adjointSensitivity.

Definition at line 173 of file sensitivityTopO.C.

References adjointSensitivity::assembleSensitivities(), designVariablesName_, adjointSensitivity::eikonalSolver_, sensitivity::fieldSensPtr_, and zeroSensInFixedPorousZones().

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 190 of file sensitivityTopO.C.

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

Referenced by postProcessSens(), adjointEikonalSolver::topologySensitivities(), adjointkOmegaSST::topologySensitivities(), adjointSpalartAllmaras::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 210 of file sensitivityTopO.C.

References designVariablesName_, fvOptions, sensitivity::mesh_, options::New(), and postProcessSens().

Here is the call graph for this function:

◆ postProcessAuxSens()

template<class Type, template< class > class PatchField, class GeoMesh>
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 25 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(), and 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 accumulateIntegrand(), assembleSensitivities(), postProcessSens(), and sensitivityTopO().


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