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.
Classes | List of all members
Kratos::SensitivityBuilder Class Reference

#include <sensitivity_builder.h>

Collaboration diagram for Kratos::SensitivityBuilder:

Classes

struct  SensitivityVariables
 Contains the sensitivity design and output variables. More...
 

Public Member Functions

Life Cycle
 SensitivityBuilder (Parameters Settings, ModelPart &rModelPart, AdjointResponseFunction::Pointer pResponseFunction)
 Constructor. More...
 
 SensitivityBuilder (Parameters Settings, ModelPart &rModelPart, AdjointResponseFunction::Pointer pResponseFunction, SensitivityBuilderScheme::Pointer pSensitivityBuilderScheme)
 Constructor with SensitivityBuilderScheme. More...
 
Operations
void SetResponseFunction (AdjointResponseFunction::Pointer pResponseFunction)
 Set the Response Function. More...
 
void Initialize ()
 
void InitializeSolutionStep ()
 
void UpdateSensitivities ()
 
void FinalizeSolutionStep ()
 
void Finalize ()
 
void Clear ()
 
void ClearFlags ()
 Clear the flags which are indicating the membership of a node, element or condition in the sensitivity model part. More...
 
void ClearSensitivities ()
 Clear sensitivities in historical and non-historical database. More...
 

Static Public Member Functions

static Operations
static void CalculateNodalSolutionStepSensitivities (const std::vector< std::string > &rVariables, ModelPart &rModelPart, AdjointResponseFunction &rResponseFunction, double ScalingFactor)
 
static void CalculateNodalSolutionStepSensitivities (const TSensitivityVariables &rVariables, ModelPart &rModelPart, AdjointResponseFunction &rResponseFunction, SensitivityBuilderScheme &rSensitivityBuilderScheme, double ScalingFactor)
 
static void CalculateNonHistoricalSensitivities (const std::vector< std::string > &rVariables, ModelPart::ElementsContainerType &rElements, AdjointResponseFunction &rResponseFunction, const ProcessInfo &rProcessInfo, double ScalingFactor)
 
static void CalculateNonHistoricalSensitivities (const TSensitivityVariables &rVariables, ModelPart::ElementsContainerType &rElements, AdjointResponseFunction &rResponseFunction, SensitivityBuilderScheme &rSensitivityBuilderScheme, const ProcessInfo &rProcessInfo, double ScalingFactor)
 
static void CalculateNonHistoricalSensitivities (const std::vector< std::string > &rVariables, ModelPart::ConditionsContainerType &rConditions, AdjointResponseFunction &rResponseFunction, const ProcessInfo &rProcessInfo, double ScalingFactor)
 
static void CalculateNonHistoricalSensitivities (const TSensitivityVariables &rVariables, ModelPart::ConditionsContainerType &rConditions, AdjointResponseFunction &rResponseFunction, SensitivityBuilderScheme &rSensitivityBuilderScheme, const ProcessInfo &rProcessInfo, double ScalingFactor)
 

Type Definitions

template<class TDataType >
using THomogeneousSensitivityVariables = std::vector< SensitivityVariables< TDataType > >
 This type holds list of variables for the sensitivity analysis. More...
 
using TSensitivityVariables = std::tuple< THomogeneousSensitivityVariables< double >, THomogeneousSensitivityVariables< array_1d< double, 3 > > >
 This type holds list of homogeneous variable lists. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (SensitivityBuilder)
 

Member Typedef Documentation

◆ THomogeneousSensitivityVariables

template<class TDataType >
using Kratos::SensitivityBuilder::THomogeneousSensitivityVariables = std::vector<SensitivityVariables<TDataType> >

This type holds list of variables for the sensitivity analysis.

 1. Design variable
 2. Output variable

In here, both design variable and output variable should be of the same type, hence they are homogeneous variables.

Template Parameters
TDataType

◆ TSensitivityVariables

This type holds list of homogeneous variable lists.

Constructor & Destructor Documentation

◆ SensitivityBuilder() [1/2]

Kratos::SensitivityBuilder::SensitivityBuilder ( Parameters  Settings,
ModelPart rModelPart,
AdjointResponseFunction::Pointer  pResponseFunction 
)

Constructor.

◆ SensitivityBuilder() [2/2]

Kratos::SensitivityBuilder::SensitivityBuilder ( Parameters  Settings,
ModelPart rModelPart,
AdjointResponseFunction::Pointer  pResponseFunction,
SensitivityBuilderScheme::Pointer  pSensitivityBuilderScheme 
)

Constructor with SensitivityBuilderScheme.

Member Function Documentation

◆ CalculateNodalSolutionStepSensitivities() [1/2]

void Kratos::SensitivityBuilder::CalculateNodalSolutionStepSensitivities ( const std::vector< std::string > &  rVariables,
ModelPart rModelPart,
AdjointResponseFunction rResponseFunction,
double  ScalingFactor 
)
static

◆ CalculateNodalSolutionStepSensitivities() [2/2]

void Kratos::SensitivityBuilder::CalculateNodalSolutionStepSensitivities ( const TSensitivityVariables rVariables,
ModelPart rModelPart,
AdjointResponseFunction rResponseFunction,
SensitivityBuilderScheme rSensitivityBuilderScheme,
double  ScalingFactor 
)
static

◆ CalculateNonHistoricalSensitivities() [1/4]

void Kratos::SensitivityBuilder::CalculateNonHistoricalSensitivities ( const std::vector< std::string > &  rVariables,
ModelPart::ConditionsContainerType rConditions,
AdjointResponseFunction rResponseFunction,
const ProcessInfo rProcessInfo,
double  ScalingFactor 
)
static

◆ CalculateNonHistoricalSensitivities() [2/4]

void Kratos::SensitivityBuilder::CalculateNonHistoricalSensitivities ( const std::vector< std::string > &  rVariables,
ModelPart::ElementsContainerType rElements,
AdjointResponseFunction rResponseFunction,
const ProcessInfo rProcessInfo,
double  ScalingFactor 
)
static

◆ CalculateNonHistoricalSensitivities() [3/4]

void Kratos::SensitivityBuilder::CalculateNonHistoricalSensitivities ( const TSensitivityVariables rVariables,
ModelPart::ConditionsContainerType rConditions,
AdjointResponseFunction rResponseFunction,
SensitivityBuilderScheme rSensitivityBuilderScheme,
const ProcessInfo rProcessInfo,
double  ScalingFactor 
)
static

◆ CalculateNonHistoricalSensitivities() [4/4]

void Kratos::SensitivityBuilder::CalculateNonHistoricalSensitivities ( const TSensitivityVariables rVariables,
ModelPart::ElementsContainerType rElements,
AdjointResponseFunction rResponseFunction,
SensitivityBuilderScheme rSensitivityBuilderScheme,
const ProcessInfo rProcessInfo,
double  ScalingFactor 
)
static

◆ Clear()

void Kratos::SensitivityBuilder::Clear ( )

◆ ClearFlags()

void Kratos::SensitivityBuilder::ClearFlags ( )

Clear the flags which are indicating the membership of a node, element or condition in the sensitivity model part.

◆ ClearSensitivities()

void Kratos::SensitivityBuilder::ClearSensitivities ( )

Clear sensitivities in historical and non-historical database.

◆ Finalize()

void Kratos::SensitivityBuilder::Finalize ( )

◆ FinalizeSolutionStep()

void Kratos::SensitivityBuilder::FinalizeSolutionStep ( )

◆ Initialize()

void Kratos::SensitivityBuilder::Initialize ( )

◆ InitializeSolutionStep()

void Kratos::SensitivityBuilder::InitializeSolutionStep ( )

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::SensitivityBuilder::KRATOS_CLASS_POINTER_DEFINITION ( SensitivityBuilder  )

◆ SetResponseFunction()

void Kratos::SensitivityBuilder::SetResponseFunction ( AdjointResponseFunction::Pointer  pResponseFunction)

Set the Response Function.

This sets the response function used in the sensitivity builder. This is useful in cases where the LHS of the adjoint problem does not change, but the RHS changes due to change in the the response function. In these cases, this allows re-use of the already constructed LHS with different RHSs.

Parameters
pResponseFunctionNew Response function to be set.

◆ UpdateSensitivities()

void Kratos::SensitivityBuilder::UpdateSensitivities ( )

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