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

#include <simple_steady_sensitivity_builder_scheme.h>

Inheritance diagram for Kratos::SimpleSteadySensitivityBuilderScheme:
Collaboration diagram for Kratos::SimpleSteadySensitivityBuilderScheme:

Public Member Functions

Life Cycle
 SimpleSteadySensitivityBuilderScheme (const IndexType Dimension, const IndexType BlockSize)
 Constructor. More...
 
 ~SimpleSteadySensitivityBuilderScheme ()=default
 Destructor. More...
 
Operations
void InitializeSolutionStep (ModelPart &rModelPart, ModelPart &rSensitivityModelPart, AdjointResponseFunction &rResponseFunction) override
 
void CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given element. More...
 
void CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given element. More...
 
void CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given condition. More...
 
void CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< double > &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given condition. More...
 
void CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given element. More...
 
void CalculateSensitivity (ElementType &rCurrentElement, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ElementType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given element. More...
 
void CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given condition. More...
 
void CalculateSensitivity (ConditionType &rCurrentCondition, AdjointResponseFunction &rResponseFunction, Vector &rSensitivity, GlobalPointersVector< ConditionType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo) override
 Calculates sensitivity from a given condition. More...
 
void CalculateResidualSensitivityMatrix (ElementType &rElement, Vector &rAdjointValues, Matrix &rOutput, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo)
 
void CalculateResidualSensitivityMatrix (ConditionType &rCondition, Vector &rAdjointValues, Matrix &rOutput, GlobalPointersVector< NodeType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo)
 
void Clear () override
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
- Public Member Functions inherited from Kratos::SensitivityBuilderScheme
 SensitivityBuilderScheme ()
 Constructor. More...
 
virtual ~SensitivityBuilderScheme ()=default
 Destructor. More...
 
virtual int Check (const ModelPart &rModelPart, const ModelPart &rSensitivityModelPart) const
 
virtual void Initialize (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 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 (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< ConditionType > &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< ElementType > &rGPSensitivityVector, const Variable< array_1d< double, 3 >> &rVariable, const ProcessInfo &rCurrentProcessInfo)
 Calculates sensitivity from a given condition. 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...
 
 KRATOS_CLASS_POINTER_DEFINITION (SensitivityBuilderScheme)
 

Protected Member Functions

Protected Operations
virtual void CalculateLHSAndRHS (ElementType &rElement, Matrix &rLHS, Vector &rRHS, const ProcessInfo &rProcessInfo)
 
virtual void CalculateLHSAndRHS (ConditionType &rCondition, Matrix &rLHS, Vector &rRHS, const ProcessInfo &rProcessInfo)
 

Type Definitions

using BaseType = SensitivityBuilderScheme
 
using NodeType = BaseType::NodeType
 
using ConditionType = BaseType::ConditionType
 
using ElementType = BaseType::ElementType
 
using IndexType = std::size_t
 
 KRATOS_CLASS_POINTER_DEFINITION (SimpleSteadySensitivityBuilderScheme)
 

Additional Inherited Members

- Public Types inherited from Kratos::SensitivityBuilderScheme
using NodeType = ModelPart::NodeType
 
using ConditionType = ModelPart::ConditionType
 
using ElementType = ModelPart::ElementType
 
- Protected Attributes inherited from Kratos::SensitivityBuilderScheme
std::vector< MatrixmSensitivityMatrices
 
std::vector< VectormAdjointVectors
 
std::vector< VectormPartialSensitivity
 
std::unordered_map< int, GlobalPointer< ModelPart::NodeType > > mGlobalPointerNodalMap
 
const int mRank
 

Member Typedef Documentation

◆ BaseType

◆ ConditionType

◆ ElementType

◆ IndexType

◆ NodeType

Constructor & Destructor Documentation

◆ SimpleSteadySensitivityBuilderScheme()

Kratos::SimpleSteadySensitivityBuilderScheme::SimpleSteadySensitivityBuilderScheme ( const IndexType  Dimension,
const IndexType  BlockSize 
)
inline

Constructor.

◆ ~SimpleSteadySensitivityBuilderScheme()

Kratos::SimpleSteadySensitivityBuilderScheme::~SimpleSteadySensitivityBuilderScheme ( )
default

Destructor.

Member Function Documentation

◆ CalculateLHSAndRHS() [1/2]

virtual void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateLHSAndRHS ( ConditionType rCondition,
Matrix rLHS,
Vector rRHS,
const ProcessInfo rProcessInfo 
)
inlineprotectedvirtual

◆ CalculateLHSAndRHS() [2/2]

virtual void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateLHSAndRHS ( ElementType rElement,
Matrix rLHS,
Vector rRHS,
const ProcessInfo rProcessInfo 
)
inlineprotectedvirtual

◆ CalculateResidualSensitivityMatrix() [1/2]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateResidualSensitivityMatrix ( ConditionType rCondition,
Vector rAdjointValues,
Matrix rOutput,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inline

◆ CalculateResidualSensitivityMatrix() [2/2]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateResidualSensitivityMatrix ( ElementType rElement,
Vector rAdjointValues,
Matrix rOutput,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inline

◆ CalculateSensitivity() [1/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ConditionType rCurrentCondition,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< ConditionType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given condition.

This method needs to be implemented in the derrived class if sensitivity calculation is based on condition quantities, and conditions has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentConditionCondition being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [2/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ConditionType rCurrentCondition,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< ConditionType > &  rGPSensitivityVector,
const Variable< double > &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given condition.

This method needs to be implemented in the derrived class if sensitivity calculation is based on condition quantities, and conditions has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentConditionCondition being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [3/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ConditionType rCurrentCondition,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given condition.

This method needs to be implemented in the derrived class if sensitivity calculation is based on nodal quantities, and conditions has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentConditionCondition being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [4/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ConditionType rCurrentCondition,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< double > &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given condition.

This method needs to be implemented in the derrived class if sensitivity calculation is based on nodal quantities, and conditions has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentConditionCondition being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [5/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ElementType rCurrentElement,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< ElementType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given element.

This method needs to be implemented in the derrived class if sensitivity calculation is based on element quantities, and elements has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentElementElement being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [6/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ElementType rCurrentElement,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< ElementType > &  rGPSensitivityVector,
const Variable< double > &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given element.

This method needs to be implemented in the derrived class if sensitivity calculation is based on element quantities, and elements has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentElementElement being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [7/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ElementType rCurrentElement,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< array_1d< double, 3 >> &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given element.

This method needs to be implemented in the derrived class if sensitivity calculation is based on nodal quantities, and elements has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentElementElement being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ CalculateSensitivity() [8/8]

void Kratos::SimpleSteadySensitivityBuilderScheme::CalculateSensitivity ( ElementType rCurrentElement,
AdjointResponseFunction rResponseFunction,
Vector rSensitivity,
GlobalPointersVector< NodeType > &  rGPSensitivityVector,
const Variable< double > &  rVariable,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Calculates sensitivity from a given element.

This method needs to be implemented in the derrived class if sensitivity calculation is based on nodal quantities, and elements has a contribution towards that.

rSensitivity vector should have sensitivities in the order maching rGPSensitivity vector. rGPSensitivityVector holds GlobalPointers indicating where these sensitivities need to be stored accordingly.

Parameters
rCurrentElementElement being passed
rResponseFunctionResponse function used
rSensitivitySensitivity vector
rGPSensitivityVectorGlobal pointer vector
rVariableDesign variable
rCurrentProcessInfoCurrent process info

Reimplemented from Kratos::SensitivityBuilderScheme.

◆ Clear()

void Kratos::SimpleSteadySensitivityBuilderScheme::Clear ( )
inlineoverridevirtual

◆ Info()

std::string Kratos::SimpleSteadySensitivityBuilderScheme::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::SensitivityBuilderScheme.

Reimplemented in Kratos::VelocityBossakSensitivityBuilderScheme.

◆ InitializeSolutionStep()

void Kratos::SimpleSteadySensitivityBuilderScheme::InitializeSolutionStep ( ModelPart rModelPart,
ModelPart rSensitivityModelPart,
AdjointResponseFunction rResponseFunction 
)
inlineoverridevirtual

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::SimpleSteadySensitivityBuilderScheme::KRATOS_CLASS_POINTER_DEFINITION ( SimpleSteadySensitivityBuilderScheme  )

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