KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::AdjointResponseFunction Class Referenceabstract

A base class for adjoint response functions. More...

#include <adjoint_response_function.h>

Inheritance diagram for Kratos::AdjointResponseFunction:
Collaboration diagram for Kratos::AdjointResponseFunction:

Public Member Functions

Type Definitions
 KRATOS_CLASS_POINTER_DEFINITION (AdjointResponseFunction)
 
Life Cycle
 AdjointResponseFunction ()
 Constructor. More...
 
virtual ~AdjointResponseFunction ()
 Destructor. More...
 
Operations
virtual void Initialize ()
 
virtual void InitializeSolutionStep ()
 
virtual void FinalizeSolutionStep ()
 
virtual void CalculateGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. primal solution. More...
 
virtual void CalculateGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. primal solution. More...
 
virtual void CalculateFirstDerivativesGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. first derivatives of primal solution. More...
 
virtual void CalculateFirstDerivativesGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. first derivatives of primal solution. More...
 
virtual void CalculateSecondDerivativesGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. second derivatives of primal solution. More...
 
virtual void CalculateSecondDerivativesGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
 Calculate the local gradient w.r.t. second derivatives of primal solution. More...
 
virtual void CalculatePartialSensitivity (Element &rAdjointElement, const Variable< double > &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo)
 Calculate the partial sensitivity w.r.t. design variable. More...
 
virtual void CalculatePartialSensitivity (Condition &rAdjointCondition, const Variable< double > &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo)
 Calculate the partial sensitivity w.r.t. design variable. More...
 
virtual void CalculatePartialSensitivity (Element &rAdjointElement, const Variable< array_1d< double, 3 >> &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo)
 Calculate the partial sensitivity w.r.t. design variable. More...
 
virtual void CalculatePartialSensitivity (Condition &rAdjointCondition, const Variable< array_1d< double, 3 >> &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo)
 Calculate the partial sensitivity w.r.t. design variable. More...
 
virtual double CalculateValue (ModelPart &rModelPart)=0
 Calculate the scalar valued response function. More...
 

Detailed Description

A base class for adjoint response functions.

Constructor & Destructor Documentation

◆ AdjointResponseFunction()

Kratos::AdjointResponseFunction::AdjointResponseFunction ( )
inline

Constructor.

◆ ~AdjointResponseFunction()

virtual Kratos::AdjointResponseFunction::~AdjointResponseFunction ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ CalculateFirstDerivativesGradient() [1/2]

virtual void Kratos::AdjointResponseFunction::CalculateFirstDerivativesGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. first derivatives of primal solution.

Parameters
[in]rAdjointConditionthe adjoint condition.
[in]rResidualGradientthe transposed gradient of the condition's residual w.r.t. first derivatives.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, and Kratos::DragResponseFunction< TDim >.

◆ CalculateFirstDerivativesGradient() [2/2]

virtual void Kratos::AdjointResponseFunction::CalculateFirstDerivativesGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. first derivatives of primal solution.

Parameters
[in]rAdjointElementthe adjoint element.
[in]rResidualGradientthe transposed gradient of the element's residual w.r.t. first derivatives.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, and Kratos::LocalTemperatureAverageResponseFunction.

◆ CalculateGradient() [1/2]

virtual void Kratos::AdjointResponseFunction::CalculateGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. primal solution.

Parameters
[in]rAdjointConditionthe adjoint condition.
[in]rResidualGradientthe transposed gradient of the condition's residual w.r.t. primal.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointStructuralResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointPotentialResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculateGradient() [2/2]

virtual void Kratos::AdjointResponseFunction::CalculateGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. primal solution.

Parameters
[in]rAdjointElementthe adjoint element.
[in]rResidualGradientthe transposed gradient of the element's residual w.r.t. primal.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculatePartialSensitivity() [1/4]

virtual void Kratos::AdjointResponseFunction::CalculatePartialSensitivity ( Condition rAdjointCondition,
const Variable< array_1d< double, 3 >> &  rVariable,
const Matrix rSensitivityMatrix,
Vector rSensitivityGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the partial sensitivity w.r.t. design variable.

Parameters
[in]rAdjointConditionthe adjoint condition.
[in]rVariablethe design variable.
[in]rSensitivityMatrixthe transposed gradient of the condition's residual w.r.t. design variable.
[out]rSensitivityGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculatePartialSensitivity() [2/4]

virtual void Kratos::AdjointResponseFunction::CalculatePartialSensitivity ( Condition rAdjointCondition,
const Variable< double > &  rVariable,
const Matrix rSensitivityMatrix,
Vector rSensitivityGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the partial sensitivity w.r.t. design variable.

Parameters
[in]rAdjointConditionthe adjoint condition.
[in]rVariablethe design variable.
[in]rSensitivityMatrixthe transposed gradient of the condition's residual w.r.t. design variable.
[out]rSensitivityGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculatePartialSensitivity() [3/4]

virtual void Kratos::AdjointResponseFunction::CalculatePartialSensitivity ( Element rAdjointElement,
const Variable< array_1d< double, 3 >> &  rVariable,
const Matrix rSensitivityMatrix,
Vector rSensitivityGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the partial sensitivity w.r.t. design variable.

Parameters
[in]rAdjointElementthe adjoint element.
[in]rVariablethe design variable.
[in]rSensitivityMatrixthe transposed gradient of the element's residual w.r.t. design variable.
[out]rSensitivityGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculatePartialSensitivity() [4/4]

virtual void Kratos::AdjointResponseFunction::CalculatePartialSensitivity ( Element rAdjointElement,
const Variable< double > &  rVariable,
const Matrix rSensitivityMatrix,
Vector rSensitivityGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the partial sensitivity w.r.t. design variable.

Parameters
[in]rAdjointElementthe adjoint element.
[in]rVariablethe design variable.
[in]rSensitivityMatrixthe transposed gradient of the element's residual w.r.t. design variable.
[out]rSensitivityGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.

◆ CalculateSecondDerivativesGradient() [1/2]

virtual void Kratos::AdjointResponseFunction::CalculateSecondDerivativesGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. second derivatives of primal solution.

Parameters
[in]rAdjointConditionthe adjoint condition.
[in]rResidualGradientthe transposed gradient of the condition's residual w.r.t. second derivatives.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, and Kratos::DragResponseFunction< TDim >.

◆ CalculateSecondDerivativesGradient() [2/2]

virtual void Kratos::AdjointResponseFunction::CalculateSecondDerivativesGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlinevirtual

Calculate the local gradient w.r.t. second derivatives of primal solution.

Parameters
[in]rAdjointElementthe adjoint element.
[in]rResidualGradientthe transposed gradient of the element's residual w.r.t. second derivatives.
[out]rResponseGradientthe gradient of the response function.
[in]rProcessInfothe current process info.

Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, and Kratos::LocalTemperatureAverageResponseFunction.

◆ CalculateValue()

virtual double Kratos::AdjointResponseFunction::CalculateValue ( ModelPart rModelPart)
pure virtual

◆ FinalizeSolutionStep()

virtual void Kratos::AdjointResponseFunction::FinalizeSolutionStep ( )
inlinevirtual

◆ Initialize()

virtual void Kratos::AdjointResponseFunction::Initialize ( )
inlinevirtual

◆ InitializeSolutionStep()

virtual void Kratos::AdjointResponseFunction::InitializeSolutionStep ( )
inlinevirtual

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::AdjointResponseFunction::KRATOS_CLASS_POINTER_DEFINITION ( AdjointResponseFunction  )

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