86 void FinalizeSolutionStep()
override;
90 void CalculateGradient(
const Element& rAdjointElement,
91 const Matrix& rResidualGradient,
95 void CalculateFirstDerivativesGradient(
const Element& rAdjointElement,
96 const Matrix& rResidualGradient,
100 void CalculateFirstDerivativesGradient(
const Condition& rAdjointCondition,
101 const Matrix& rResidualGradient,
102 Vector& rResponseGradient,
105 void CalculateSecondDerivativesGradient(
const Element& rAdjointElement,
106 const Matrix& rResidualGradient,
107 Vector& rResponseGradient,
110 void CalculateSecondDerivativesGradient(
const Condition& rAdjointCondition,
111 const Matrix& rResidualGradient,
112 Vector& rResponseGradient,
115 void CalculatePartialSensitivity(
Element& rAdjointElement,
117 const Matrix& rSensitivityMatrix,
118 Vector& rSensitivityGradient,
121 void CalculatePartialSensitivity(
Condition& rAdjointCondition,
123 const Matrix& rSensitivityMatrix,
124 Vector& rSensitivityGradient,
127 void CalculatePartialSensitivity(
Element& rAdjointElement,
129 const Matrix& rSensitivityMatrix,
130 Vector& rSensitivityGradient,
133 void CalculatePartialSensitivity(
Condition& rAdjointCondition,
135 const Matrix& rSensitivityMatrix,
136 Vector& rSensitivityGradient,
140 double CalculateValue(
ModelPart& rModelPart)
override;
199 std::string mTracedDisplacementLabel;
200 std::string mTracedReactionLabel;
204 bool mAdjustAdjointDisplacement =
false;
215 void CalculateContributionToPartialSensitivity(
Element& rAdjointElement,
216 const Matrix& rSensitivityMatrix,
217 Vector& rSensitivityGradient,
220 void CalculateContributionToPartialSensitivity(
Condition& rAdjointCondition,
221 const Matrix& rSensitivityMatrix,
222 Vector& rSensitivityGradient,
226 template <
typename TObjectType>
227 size_t GetDofIndex(TObjectType& rAdjointObject,
const ProcessInfo& rProcessInfo)
235 rAdjointObject.GetDofList(dof_list, rProcessInfo);
237 size_t dof_index = 0;
238 for(
IndexType dof_it = 0; dof_it < dof_list.size(); ++dof_it)
240 if (dof_list[dof_it]->Id() == mpTracedNode->Id() &&
241 dof_list[dof_it]->GetVariable() == r_corresponding_adjoint_dof)
252 Vector GetColumnCopy(
const Matrix& rMatrix,
size_t ColumnIndex);
254 Vector GetRowCopy(
const Matrix& rMatrix,
size_t RowIndex);
256 std::string GetCorrespondingDisplacementLabel(std::string& rReactionLabel)
const;
258 void PerformResponseVariablesCheck();
AdjointNodalReactionResponseFunction.
Definition: adjoint_nodal_reaction_response_function.h:51
matrix_column< Matrix > MatrixColumnType
Definition: adjoint_nodal_reaction_response_function.h:58
matrix_row< Matrix > MatrixRowType
Definition: adjoint_nodal_reaction_response_function.h:59
Node::Pointer PointTypePointer
Definition: adjoint_nodal_reaction_response_function.h:57
KRATOS_CLASS_POINTER_DEFINITION(AdjointNodalReactionResponseFunction)
Element::DofsVectorType DofsVectorType
Definition: adjoint_nodal_reaction_response_function.h:56
AdjointStructuralResponseFunction.
Definition: adjoint_structural_response_function.h:39
std::size_t IndexType
Definition: adjoint_structural_response_function.h:46
virtual void CalculateGradient(const Element &rAdjointElement, const Matrix &rResidualGradient, Vector &rResponseGradient, const ProcessInfo &rProcessInfo)
Calculate the local gradient w.r.t. primal solution.
Definition: adjoint_response_function.h:88
Base class for all Conditions.
Definition: condition.h:59
Base class for all Elements.
Definition: element.h:60
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
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
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#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
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470