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.
adjoint_structural_response_function.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Martin Fusseder, https://github.com/MFusseder
10 //
11 
12 #pragma once
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
19 #include "includes/model_part.h"
23 
24 
25 namespace Kratos
26 {
29 
32 
38 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) AdjointStructuralResponseFunction : public AdjointResponseFunction
39 {
40 public:
43 
45 
46  typedef std::size_t IndexType;
47 
48  typedef std::size_t SizeType;
49 
52 
56 
58  AdjointStructuralResponseFunction(ModelPart& rModelPart, Parameters ResponseSettings);
59 
62  {
63  }
64 
68 
72 
73  virtual void Initialize() override;
74 
76 
77  virtual void CalculateGradient(const Condition& rAdjointCondition,
78  const Matrix& rResidualGradient,
79  Vector& rResponseGradient,
80  const ProcessInfo& rProcessInfo) override;
81 
82  virtual double CalculateValue(ModelPart& rModelPart) override;
83 
85 
86 protected:
89 
91 
95 
99 
101 
102 private:
105 
106  unsigned int mGradientMode;
107  Parameters mResponseSettings;
108 
112 
116 
118 };
119 
121 
123 
124 } /* namespace Kratos.*/
A base class for adjoint response functions.
Definition: adjoint_response_function.h:39
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
AdjointStructuralResponseFunction.
Definition: adjoint_structural_response_function.h:39
std::size_t IndexType
Definition: adjoint_structural_response_function.h:46
virtual ~AdjointStructuralResponseFunction() override
Destructor.
Definition: adjoint_structural_response_function.h:61
KRATOS_CLASS_POINTER_DEFINITION(AdjointStructuralResponseFunction)
ModelPart & mrModelPart
Definition: adjoint_structural_response_function.h:90
std::size_t SizeType
Definition: adjoint_structural_response_function.h:48
Base class for all Conditions.
Definition: condition.h:59
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21