20 #include <unordered_map>
61 template <
class TDataType>
70 const std::string output_suffix =
"_SENSITIVITY";
72 if (rName.size() > output_suffix.size() &&
73 std::equal(output_suffix.rbegin(), output_suffix.rend(), rName.rbegin()))
75 pOutputVariable = pDesignVariable;
98 template <
class TDataType>
117 AdjointResponseFunction::Pointer pResponseFunction);
122 AdjointResponseFunction::Pointer pResponseFunction,
123 SensitivityBuilderScheme::Pointer pSensitivityBuilderScheme);
140 void SetResponseFunction(AdjointResponseFunction::Pointer pResponseFunction);
146 void UpdateSensitivities();
148 void FinalizeSolutionStep();
158 void ClearSensitivities();
164 static void CalculateNodalSolutionStepSensitivities(
165 const std::vector<std::string>& rVariables,
168 double ScalingFactor);
170 static void CalculateNodalSolutionStepSensitivities(
175 double ScalingFactor);
177 static void CalculateNonHistoricalSensitivities(
178 const std::vector<std::string>& rVariables,
182 double ScalingFactor);
184 static void CalculateNonHistoricalSensitivities(
190 double ScalingFactor);
192 static void CalculateNonHistoricalSensitivities(
193 const std::vector<std::string>& rVariables,
197 double ScalingFactor);
199 static void CalculateNonHistoricalSensitivities(
205 double ScalingFactor);
212 ModelPart* mpSensitivityModelPart =
nullptr;
213 AdjointResponseFunction::Pointer mpResponseFunction;
214 SensitivityBuilderScheme::Pointer mpSensitivityBuilderScheme;
220 std::string mBuildMode =
"static";
221 bool mNodalSolutionStepSensitivityCalculationIsThreadSafe =
false;
A base class for adjoint response functions.
Definition: adjoint_response_function.h:39
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: sensitivity_builder.h:36
std::tuple< THomogeneousSensitivityVariables< double >, THomogeneousSensitivityVariables< array_1d< double, 3 > > > TSensitivityVariables
This type holds list of homogeneous variable lists.
Definition: sensitivity_builder.h:108
KRATOS_CLASS_POINTER_DEFINITION(SensitivityBuilder)
std::vector< SensitivityVariables< TDataType > > THomogeneousSensitivityVariables
This type holds list of variables for the sensitivity analysis.
Definition: sensitivity_builder.h:99
Scheme used in the Sensitivity Builder.
Definition: sensitivity_builder_scheme.h:53
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Contains the sensitivity design and output variables.
Definition: sensitivity_builder.h:63
SensitivityVariables(const std::string &rName)
Definition: sensitivity_builder.h:67