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.
|
A base class for adjoint response functions. More...
#include <adjoint_response_function.h>
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... | |
A base class for adjoint response functions.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Calculate the local gradient w.r.t. first derivatives of primal solution.
[in] | rAdjointCondition | the adjoint condition. |
[in] | rResidualGradient | the transposed gradient of the condition's residual w.r.t. first derivatives. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, and Kratos::DragResponseFunction< TDim >.
|
inlinevirtual |
Calculate the local gradient w.r.t. first derivatives of primal solution.
[in] | rAdjointElement | the adjoint element. |
[in] | rResidualGradient | the transposed gradient of the element's residual w.r.t. first derivatives. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, and Kratos::LocalTemperatureAverageResponseFunction.
|
inlinevirtual |
Calculate the local gradient w.r.t. primal solution.
[in] | rAdjointCondition | the adjoint condition. |
[in] | rResidualGradient | the transposed gradient of the condition's residual w.r.t. primal. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointStructuralResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointPotentialResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.
|
inlinevirtual |
Calculate the local gradient w.r.t. primal solution.
[in] | rAdjointElement | the adjoint element. |
[in] | rResidualGradient | the transposed gradient of the element's residual w.r.t. primal. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the 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.
|
inlinevirtual |
Calculate the partial sensitivity w.r.t. design variable.
[in] | rAdjointCondition | the adjoint condition. |
[in] | rVariable | the design variable. |
[in] | rSensitivityMatrix | the transposed gradient of the condition's residual w.r.t. design variable. |
[out] | rSensitivityGradient | the gradient of the response function. |
[in] | rProcessInfo | the 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.
|
inlinevirtual |
Calculate the partial sensitivity w.r.t. design variable.
[in] | rAdjointCondition | the adjoint condition. |
[in] | rVariable | the design variable. |
[in] | rSensitivityMatrix | the transposed gradient of the condition's residual w.r.t. design variable. |
[out] | rSensitivityGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.
|
inlinevirtual |
Calculate the partial sensitivity w.r.t. design variable.
[in] | rAdjointElement | the adjoint element. |
[in] | rVariable | the design variable. |
[in] | rSensitivityMatrix | the transposed gradient of the element's residual w.r.t. design variable. |
[out] | rSensitivityGradient | the gradient of the response function. |
[in] | rProcessInfo | the 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.
|
inlinevirtual |
Calculate the partial sensitivity w.r.t. design variable.
[in] | rAdjointElement | the adjoint element. |
[in] | rVariable | the design variable. |
[in] | rSensitivityMatrix | the transposed gradient of the element's residual w.r.t. design variable. |
[out] | rSensitivityGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.
|
inlinevirtual |
Calculate the local gradient w.r.t. second derivatives of primal solution.
[in] | rAdjointCondition | the adjoint condition. |
[in] | rResidualGradient | the transposed gradient of the condition's residual w.r.t. second derivatives. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, and Kratos::DragResponseFunction< TDim >.
|
inlinevirtual |
Calculate the local gradient w.r.t. second derivatives of primal solution.
[in] | rAdjointElement | the adjoint element. |
[in] | rResidualGradient | the transposed gradient of the element's residual w.r.t. second derivatives. |
[out] | rResponseGradient | the gradient of the response function. |
[in] | rProcessInfo | the current process info. |
Reimplemented in Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, and Kratos::LocalTemperatureAverageResponseFunction.
|
pure virtual |
Calculate the scalar valued response function.
Implemented in Kratos::Python::PyAdjointResponseFunction, Kratos::AdjointStructuralResponseFunction, Kratos::AdjointNodalReactionResponseFunction, Kratos::AdjointNodalDisplacementResponseFunction, Kratos::AdjointMaxStressResponseFunction, Kratos::AdjointLocalStressResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::PyDragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, Kratos::AdjointPotentialResponseFunction, Kratos::AdjointLiftJumpCoordinatesResponseFunction, and Kratos::AdjointLiftFarFieldResponseFunction.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Kratos::Python::PyAdjointResponseFunction, Kratos::AdjointStructuralResponseFunction, Kratos::AdjointLinearStrainEnergyResponseFunction, Kratos::VelocityPressureNormSquareResponseFunction, Kratos::DragResponseFunction< TDim >, Kratos::PyDragResponseFunction< TDim >, Kratos::LocalTemperatureAverageResponseFunction, and Kratos::AdjointPotentialResponseFunction.
|
inlinevirtual |
Kratos::AdjointResponseFunction::KRATOS_CLASS_POINTER_DEFINITION | ( | AdjointResponseFunction | ) |