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.
|
Scheme used in the Sensitivity Builder. More...
#include <sensitivity_builder_scheme.h>
Public Member Functions | |
Life Cycle | |
SensitivityBuilderScheme () | |
Constructor. More... | |
virtual | ~SensitivityBuilderScheme ()=default |
Destructor. More... | |
Operations | |
virtual int | Check (const ModelPart &rModelPart, const ModelPart &rSensitivityModelPart) const |
virtual void | Initialize (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) |
virtual void | InitializeSolutionStep (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) |
virtual void | FinalizeSolutionStep (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) |
virtual void | Finalize (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) |
virtual void | Update (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) |
virtual void | Clear () |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given element. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
virtual void | CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) |
Calculates sensitivity from a given condition. More... | |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Protected Attributes | |
Protected Member Variables | |
std::vector< Matrix > | mSensitivityMatrices |
std::vector< Vector > | mAdjointVectors |
std::vector< Vector > | mPartialSensitivity |
std::unordered_map< int, GlobalPointer< ModelPart::NodeType > > | mGlobalPointerNodalMap |
const int | mRank |
Type Definitions | |
using | NodeType = ModelPart::NodeType |
using | ConditionType = ModelPart::ConditionType |
using | ElementType = ModelPart::ElementType |
KRATOS_CLASS_POINTER_DEFINITION (SensitivityBuilderScheme) | |
Scheme used in the Sensitivity Builder.
This scheme calculates sensitivities according to following equation
[ \frac{dJ}{d\underline{x}} = \frac{\partial J}{\partial \underline{x}}
Where $J$ is the response function, $\underline{R}$ are the discrete residuals, and $\underline{x}$ are the parameter w.r.t. the sensitivities are computed.
|
inline |
Constructor.
|
virtualdefault |
Destructor.
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on condition quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on condition quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on element quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on element quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on nodal quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given condition.
This method needs to be implemented in the derived class if sensitivity calculation is based on nodal quantities, and conditions has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentCondition | Condition being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on condition quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on condition quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on element quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on element quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on nodal quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
Calculates sensitivity from a given element.
This method needs to be implemented in the derived class if sensitivity calculation is based on nodal quantities, and elements has a contribution towards that.
rSensitivity vector should have sensitivities in the order matching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.
rCurrentElement | Element being passed |
rResponseFunction | Response function used |
rSensitivity | Sensitivity vector |
rGPSensitivityVector | Global pointer vector |
rVariable | Design variable |
rCurrentProcessInfo | Current process info |
Reimplemented in Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Kratos::VelocityBossakSensitivityBuilderScheme, and Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Turn back information as a string.
Reimplemented in Kratos::VelocityBossakSensitivityBuilderScheme, and Kratos::SimpleSteadySensitivityBuilderScheme.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Kratos::VelocityBossakSensitivityBuilderScheme, and Kratos::SimpleSteadySensitivityBuilderScheme.
Kratos::SensitivityBuilderScheme::KRATOS_CLASS_POINTER_DEFINITION | ( | SensitivityBuilderScheme | ) |
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.
|
inlinevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |