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::VelocityPressureNormSquareResponseFunction Class Reference

A response function for norm square calculation. More...

#include <velocity_pressure_norm_square_response_function.h>

Inheritance diagram for Kratos::VelocityPressureNormSquareResponseFunction:
Collaboration diagram for Kratos::VelocityPressureNormSquareResponseFunction:

Public Member Functions

Life Cycle
 VelocityPressureNormSquareResponseFunction (Parameters Settings, Model &rModel)
 Constructor. More...
 
 ~VelocityPressureNormSquareResponseFunction () override
 Destructor. More...
 
Operations
void Initialize () override
 
void CalculateGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. primal solution. More...
 
void CalculateGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. primal solution. More...
 
void CalculateFirstDerivativesGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. first derivatives of primal solution. More...
 
void CalculateFirstDerivativesGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. first derivatives of primal solution. More...
 
void CalculateSecondDerivativesGradient (const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. second derivatives of primal solution. More...
 
void CalculateSecondDerivativesGradient (const Condition &rAdjointCondition, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo) override
 Calculate the local gradient w.r.t. second derivatives of primal solution. More...
 
void CalculatePartialSensitivity (Element &rAdjointElement, const Variable< array_1d< double, 3 >> &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo) override
 Calculate the partial sensitivity w.r.t. design variable. More...
 
void CalculatePartialSensitivity (Condition &rAdjointCondition, const Variable< array_1d< double, 3 >> &rVariable, const Matrix &rSensitivityMatrix, Vector &rSensitivityGradient, const ProcessInfo &rProcessInfo) override
 Calculate the partial sensitivity w.r.t. design variable. More...
 
double CalculateValue (ModelPart &rModelPart) override
 Calculate the scalar valued response function. More...
 
- Public Member Functions inherited from Kratos::AdjointResponseFunction
 KRATOS_CLASS_POINTER_DEFINITION (AdjointResponseFunction)
 
 AdjointResponseFunction ()
 Constructor. More...
 
virtual ~AdjointResponseFunction ()
 Destructor. More...
 
virtual void InitializeSolutionStep ()
 
virtual void FinalizeSolutionStep ()
 
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...
 

Type Definitions

using ElementType = ModelPart::ElementType
 
using GeometryType = typename ElementType::GeometryType
 
using IndexType = std::size_t
 
 KRATOS_CLASS_POINTER_DEFINITION (VelocityPressureNormSquareResponseFunction)
 

Detailed Description

A response function for norm square calculation.

The response function is defined as:

\[ \bar{D} = \Sigma_{n=1}^N F_u\left(A_n|\underline{u}_n|\right)^2 + F_p\left(A_nP\right)^2 \Delta t \]

if "integrate_in_time" is true.

F_u is the velocity norm factor F_p is the pressure norm factor

Member Typedef Documentation

◆ ElementType

◆ GeometryType

◆ IndexType

Constructor & Destructor Documentation

◆ VelocityPressureNormSquareResponseFunction()

Kratos::VelocityPressureNormSquareResponseFunction::VelocityPressureNormSquareResponseFunction ( Parameters  Settings,
Model rModel 
)
inline

Constructor.

◆ ~VelocityPressureNormSquareResponseFunction()

Kratos::VelocityPressureNormSquareResponseFunction::~VelocityPressureNormSquareResponseFunction ( )
inlineoverride

Destructor.

Member Function Documentation

◆ CalculateFirstDerivativesGradient() [1/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateFirstDerivativesGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculateFirstDerivativesGradient() [2/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateFirstDerivativesGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculateGradient() [1/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculateGradient() [2/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculatePartialSensitivity() [1/2]

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

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 from Kratos::AdjointResponseFunction.

◆ CalculatePartialSensitivity() [2/2]

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

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 from Kratos::AdjointResponseFunction.

◆ CalculateSecondDerivativesGradient() [1/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateSecondDerivativesGradient ( const Condition rAdjointCondition,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculateSecondDerivativesGradient() [2/2]

void Kratos::VelocityPressureNormSquareResponseFunction::CalculateSecondDerivativesGradient ( const Element rAdjointElement,
const Matrix rResidualGradient,
Vector rResponseGradient,
const ProcessInfo rProcessInfo 
)
inlineoverridevirtual

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 from Kratos::AdjointResponseFunction.

◆ CalculateValue()

double Kratos::VelocityPressureNormSquareResponseFunction::CalculateValue ( ModelPart rModelPart)
inlineoverridevirtual

Calculate the scalar valued response function.

Implements Kratos::AdjointResponseFunction.

◆ Initialize()

void Kratos::VelocityPressureNormSquareResponseFunction::Initialize ( void  )
inlineoverridevirtual

Reimplemented from Kratos::AdjointResponseFunction.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::VelocityPressureNormSquareResponseFunction::KRATOS_CLASS_POINTER_DEFINITION ( VelocityPressureNormSquareResponseFunction  )

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