Loading...
Searching...
No Matches
adjointBoundaryCondition< Type > Class Template Reference

Base class for solution control classes. More...

#include <adjointBoundaryCondition.H>

Inheritance diagram for adjointBoundaryCondition< Type >:
Collaboration diagram for adjointBoundaryCondition< Type >:

Public Member Functions

 TypeName ("adjointBoundaryCondition")
 Run-time type information.
 adjointBoundaryCondition (const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const word &solverName)
 Construct from field and base name.
 adjointBoundaryCondition (const adjointBoundaryCondition< Type > &)
 Construct as copy.
virtual ~adjointBoundaryCondition ()=default
 Destructor.
const wordobjectiveManagerName () const
 Return objectiveManager name.
const wordadjointSolverName () const
 Return adjointSolverName.
const wordsimulationType () const
 Return the simulationType.
void setBoundaryContributionPtr ()
 Set the ptr to the correct boundaryAdjointContribution.
boundaryAdjointContributiongetBoundaryAdjContribution ()
 Get boundaryContribution.
const ATCModelgetATC () const
 ATC type might be useful for a number of BCs. Return here.
virtual tmp< Field< typename Foam::outerProduct< Foam::vector, Type >::type > > dxdbMult () const
 Return contribution to sensitivity derivatives.
virtual void updatePrimalBasedQuantities ()
 Update the primal based quantities related to the adjoint boundary conditions.

Protected Member Functions

template<class Type2>
tmp< Field< typename Foam::outerProduct< Foam::vector, Type2 >::type > > computePatchGrad (word name)
 Get gradient of field on a specific boundary.
bool addATCUaGradUTerm ()
 Whether to add the extra term from the UaGradU formulation.

Protected Attributes

const fvPatchpatch_
 Reference to patch.
word managerName_
 objectiveManager name corresponding to field
word adjointSolverName_
 adjointSolver name corresponding to field
word simulationType_
 simulationType corresponding to field.
autoPtr< boundaryAdjointContributionboundaryContrPtr_
 Engine to manage contributions of the objective functions to the adjoint boundary conditions.
Switch addATCUaGradUTerm_
 Whether to add the extra term from the UaGradU formulation.

Detailed Description

template<class Type>
class Foam::adjointBoundaryCondition< Type >

Base class for solution control classes.

Definition at line 47 of file adjointBoundaryCondition.H.

Constructor & Destructor Documentation

◆ adjointBoundaryCondition() [1/2]

template<class Type>
adjointBoundaryCondition ( const fvPatch & p,
const DimensionedField< Type, volMesh > & iF,
const word & solverName )

Construct from field and base name.

Definition at line 205 of file adjointBoundaryCondition.C.

References addATCUaGradUTerm_, adjointSolverName_, boundaryContrPtr_, managerName_, p, patch_, setBoundaryContributionPtr(), and simulationType_.

Referenced by adjointBoundaryCondition().

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

◆ adjointBoundaryCondition() [2/2]

template<class Type>
adjointBoundaryCondition ( const adjointBoundaryCondition< Type > & adjointBC)

Construct as copy.

Definition at line 179 of file adjointBoundaryCondition.C.

References addATCUaGradUTerm_, adjointBoundaryCondition(), adjointSolverName_, boundaryContrPtr_, managerName_, Foam::New(), patch_, and simulationType_.

Here is the call graph for this function:

◆ ~adjointBoundaryCondition()

template<class Type>
virtual ~adjointBoundaryCondition ( )
virtualdefault

Destructor.

Member Function Documentation

◆ computePatchGrad()

template<class Type>
template<class Type2>
tmp< Field< typename Foam::outerProduct< Foam::vector, Type2 >::type > > computePatchGrad ( word name)
protected

◆ addATCUaGradUTerm()

template<class Type>
bool addATCUaGradUTerm ( )
protected

Whether to add the extra term from the UaGradU formulation.

Definition at line 166 of file adjointBoundaryCondition.C.

References addATCUaGradUTerm_, getATC(), and Foam::isA().

Here is the call graph for this function:

◆ TypeName()

template<class Type>
TypeName ( "adjointBoundaryCondition< Type >" )

Run-time type information.

◆ objectiveManagerName()

template<class Type>
const word & objectiveManagerName ( ) const

Return objectiveManager name.

Definition at line 227 of file adjointBoundaryCondition.C.

References managerName_.

◆ adjointSolverName()

template<class Type>
const word & adjointSolverName ( ) const

Return adjointSolverName.

Definition at line 234 of file adjointBoundaryCondition.C.

References adjointSolverName_.

◆ simulationType()

template<class Type>
const word & simulationType ( ) const

Return the simulationType.

Definition at line 241 of file adjointBoundaryCondition.C.

References simulationType_.

◆ setBoundaryContributionPtr()

template<class Type>
void setBoundaryContributionPtr ( )

Set the ptr to the correct boundaryAdjointContribution.

Definition at line 248 of file adjointBoundaryCondition.C.

References adjointSolverName_, boundaryContrPtr_, Foam::endl(), objectRegistry::foundObject(), managerName_, boundaryAdjointContribution::New(), Foam::nl, patch_, simulationType_, and WarningInFunction.

Referenced by adjointBoundaryCondition().

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

◆ getBoundaryAdjContribution()

template<class Type>
boundaryAdjointContribution & getBoundaryAdjContribution ( )

Get boundaryContribution.

Definition at line 281 of file adjointBoundaryCondition.C.

References boundaryContrPtr_.

◆ getATC()

template<class Type>
const ATCModel & getATC ( ) const

ATC type might be useful for a number of BCs. Return here.

Definition at line 288 of file adjointBoundaryCondition.C.

References adjointSolverName_, and patch_.

Referenced by addATCUaGradUTerm().

Here is the caller graph for this function:

◆ dxdbMult()

template<class Type>
tmp< Field< typename Foam::outerProduct< Foam::vector, Type >::type > > dxdbMult ( ) const
virtual

Return contribution to sensitivity derivatives.

For adjoint boundary conditions corresponding to primal boundary conditions that include geometric components (e.g. rotatingWallVelocity)

Reimplemented in adjointRotatingWallVelocityFvPatchVectorField.

Definition at line 308 of file adjointBoundaryCondition.C.

Referenced by incompressibleAdjointSolver::hasBCdxdbMult().

Here is the caller graph for this function:

◆ updatePrimalBasedQuantities()

template<class Type>
void updatePrimalBasedQuantities ( )
virtual

Update the primal based quantities related to the adjoint boundary conditions.

Definition at line 297 of file adjointBoundaryCondition.C.

Member Data Documentation

◆ patch_

template<class Type>
const fvPatch& patch_
protected

◆ managerName_

template<class Type>
word managerName_
protected

◆ adjointSolverName_

template<class Type>
word adjointSolverName_
protected

◆ simulationType_

template<class Type>
word simulationType_
protected

simulationType corresponding to field.

A placeholder for now

Definition at line 73 of file adjointBoundaryCondition.H.

Referenced by adjointBoundaryCondition(), adjointBoundaryCondition(), setBoundaryContributionPtr(), and simulationType().

◆ boundaryContrPtr_

template<class Type>
autoPtr<boundaryAdjointContribution> boundaryContrPtr_
protected

Engine to manage contributions of the objective functions to the adjoint boundary conditions.

Definition at line 79 of file adjointBoundaryCondition.H.

Referenced by adjointBoundaryCondition(), adjointBoundaryCondition(), getBoundaryAdjContribution(), and setBoundaryContributionPtr().

◆ addATCUaGradUTerm_

template<class Type>
Switch addATCUaGradUTerm_
protected

Whether to add the extra term from the UaGradU formulation.

As a Switch with delayed evaluation since ATCModel has not been allocated at the time of construction

Definition at line 87 of file adjointBoundaryCondition.H.

Referenced by addATCUaGradUTerm(), adjointBoundaryCondition(), and adjointBoundaryCondition().


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