SIBase Class Referenceabstract

Base class for Surface Integral-based sensitivity derivatives. More...

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

Public Member Functions

 TypeName ("volumetricBSplinesFI")
 Runtime type information. More...
 
 SIBase (const fvMesh &mesh, const dictionary &dict, incompressibleVars &primalVars, incompressibleAdjointVars &adjointVars, objectiveManager &objectiveManager, fv::optionAdjointList &fvOptionsAdjoint)
 Construct from components. More...
 
virtual ~SIBase ()=default
 Destructor. More...
 
virtual bool readDict (const dictionary &dict)
 Read dict if changed. More...
 
virtual void accumulateIntegrand (const scalar dt)
 Accumulate sensitivity integrands. More...
 
virtual void assembleSensitivities ()=0
 Assemble sensitivities. More...
 
virtual void clearSensitivities ()
 Zero sensitivity fields and their constituents. More...
 
const sensitivitySurfacegetSurfaceSensitivities () const
 Return reference to underlaying surface sensitivities. More...
 
virtual void write (const word &baseName=word::null)
 Write sensitivity map. 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 ()
 Read options from dict. 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

sensitivitySurface surfaceSensitivity_
 Surface sensitivities. More...
 
bool includeObjective_
 Whether to include direct sensitivities or not. More...
 
bool writeSensitivityMap_
 Write sensitivity map upon write. 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

Base class for Surface Integral-based sensitivity derivatives.

Source files

Definition at line 57 of file SIBaseIncompressible.H.

Constructor & Destructor Documentation

◆ SIBase()

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

Construct from components.

Definition at line 79 of file SIBaseIncompressible.C.

References Foam::read().

Here is the call graph for this function:

◆ ~SIBase()

virtual ~SIBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ read()

void read ( )
protected

Read options from dict.

Definition at line 48 of file SIBaseIncompressible.C.

References sensitivity::dict(), Foam::endl(), sensitivitySurface::getIncludeObjective(), dictionary::getOrDefault(), SIBase::includeObjective_, Foam::nl, sensitivitySurface::read(), sensitivitySurface::setIncludeObjective(), sensitivitySurface::setIncludeSurfaceArea(), SIBase::surfaceSensitivity_, WarningInFunction, and SIBase::writeSensitivityMap_.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "volumetricBSplinesFI"  )

Runtime type information.

◆ readDict()

bool readDict ( const dictionary dict)
virtual

Read dict if changed.

Reimplemented from sensitivity.

Definition at line 119 of file SIBaseIncompressible.C.

References sensitivity::dict(), dictionary::optionalSubDict(), sensitivity::readDict(), sensitivitySurface::readDict(), and SIBase::surfaceSensitivity_.

Here is the call graph for this function:

◆ accumulateIntegrand()

void accumulateIntegrand ( const scalar  dt)
virtual

Accumulate sensitivity integrands.

Implements shapeSensitivities.

Definition at line 135 of file SIBaseIncompressible.C.

References shapeSensitivities::accumulateBCSensitivityIntegrand(), shapeSensitivities::accumulateDirectSensitivityIntegrand(), sensitivitySurface::accumulateIntegrand(), SIBase::includeObjective_, and SIBase::surfaceSensitivity_.

Here is the call graph for this function:

◆ assembleSensitivities()

virtual void assembleSensitivities ( )
pure virtual

Assemble sensitivities.

Implements shapeSensitivities.

Implemented in sensitivityVolBSplines, and sensitivityBezier.

◆ clearSensitivities()

void clearSensitivities ( )
virtual

Zero sensitivity fields and their constituents.

Reimplemented from shapeSensitivities.

Reimplemented in sensitivityVolBSplines, and sensitivityBezier.

Definition at line 151 of file SIBaseIncompressible.C.

References shapeSensitivities::clearSensitivities(), sensitivitySurface::clearSensitivities(), and SIBase::surfaceSensitivity_.

Referenced by sensitivityBezier::clearSensitivities(), and sensitivityVolBSplines::clearSensitivities().

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

◆ getSurfaceSensitivities()

const sensitivitySurface & getSurfaceSensitivities ( ) const

Return reference to underlaying surface sensitivities.

Definition at line 158 of file SIBaseIncompressible.C.

References SIBase::surfaceSensitivity_.

◆ write()

void write ( const word baseName = word::null)
virtual

Write sensitivity map.

Reimplemented from shapeSensitivities.

Reimplemented in sensitivityVolBSplines, and sensitivityBezier.

Definition at line 164 of file SIBaseIncompressible.C.

References SIBase::surfaceSensitivity_, shapeSensitivities::write(), sensitivitySurface::write(), and SIBase::writeSensitivityMap_.

Referenced by sensitivityBezier::write(), and sensitivityVolBSplines::write().

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

Member Data Documentation

◆ surfaceSensitivity_

◆ includeObjective_

bool includeObjective_
protected

Whether to include direct sensitivities or not.

Used to avoid double contributions from both here and the sensitivitySurface object which might have already accounted for them

Definition at line 72 of file SIBaseIncompressible.H.

Referenced by SIBase::accumulateIntegrand(), sensitivityBezier::assembleSensitivities(), sensitivityVolBSplines::computeObjectiveContributions(), and SIBase::read().

◆ writeSensitivityMap_

bool writeSensitivityMap_
protected

Write sensitivity map upon write.

Definition at line 75 of file SIBaseIncompressible.H.

Referenced by SIBase::read(), and SIBase::write().


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