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_potential_response_function.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 //
11 // Main authors: Marc Nuñez, based on Martin Fusseder work, https://github.com/MFusseder
12 //
13 
14 #ifndef ADJOINT_POTENTIAL_RESPONSE_FUNCTION_H
15 #define ADJOINT_POTENTIAL_RESPONSE_FUNCTION_H
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/model_part.h"
25 
26 
27 namespace Kratos
28 {
31 
34 
35 class KRATOS_API(COMPRESSIBLE_POTENTIAL_FLOW_APPLICATION) AdjointPotentialResponseFunction : public AdjointResponseFunction
36 {
37 public:
40 
42 
43  typedef std::size_t IndexType;
44 
45  typedef std::size_t SizeType;
46 
49 
53 
55  AdjointPotentialResponseFunction(ModelPart& rModelPart, Parameters ResponseSettings);
56 
59  {
60  }
61 
65 
69 
70  void Initialize() override;
71 
72  void InitializeSolutionStep() override;
73 
74  void CalculateGradient(const Condition& rAdjointCondition,
75  const Matrix& rResidualGradient,
76  Vector& rResponseGradient,
77  const ProcessInfo& rProcessInfo) override;
78 
79  double CalculateValue(ModelPart& rModelPart) override;
80 
82 
83 protected:
86 
88 
92 
96 
98 
99 private:
102 
103  unsigned int mGradientMode;
104  double mDelta;
105 
109 
113 
115 };
116 
117 
118 } /* namespace Kratos.*/
119 
120 #endif /* defined */
Definition: adjoint_potential_response_function.h:36
A base class for adjoint response functions.
Definition: adjoint_response_function.h:39
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
ModelPart & mrModelPart
Definition: adjoint_potential_response_function.h:87
~AdjointPotentialResponseFunction() override
Destructor.
Definition: adjoint_potential_response_function.h:58
std::size_t SizeType
Definition: adjoint_potential_response_function.h:45
std::size_t IndexType
Definition: adjoint_potential_response_function.h:43
KRATOS_CLASS_POINTER_DEFINITION(AdjointPotentialResponseFunction)
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