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.
face_angle_response_function_utility.h
Go to the documentation of this file.
1 // ==============================================================================
2 // KratosShapeOptimizationApplication
3 //
4 // License: BSD License
5 // license: ShapeOptimizationApplication/license.txt
6 //
7 // Main authors: Geiser Armin, https://github.com/armingeiser
8 //
9 // ==============================================================================
10 
11 #ifndef FACE_ANGLE_RESPONSE_FUNCTION_UTILITY_H
12 #define FACE_ANGLE_RESPONSE_FUNCTION_UTILITY_H
13 
14 // ------------------------------------------------------------------------------
15 // System includes
16 // ------------------------------------------------------------------------------
17 #include <iostream>
18 #include <string>
19 
20 // ------------------------------------------------------------------------------
21 // External includes
22 // ------------------------------------------------------------------------------
23 
24 // ------------------------------------------------------------------------------
25 // Project includes
26 // ------------------------------------------------------------------------------
27 #include "includes/define.h"
29 #include "includes/model_part.h"
30 
31 // ==============================================================================
32 
33 namespace Kratos
34 {
35 
38 
42 
46 
50 
54 
56 
60 class KRATOS_API(SHAPE_OPTIMIZATION_APPLICATION) FaceAngleResponseFunctionUtility
61 {
62 public:
65 
67 
70 
74 
76  FaceAngleResponseFunctionUtility(ModelPart& rModelPart, Parameters ResponseSettings);
77 
80  {}
84 
88 
89  void Initialize();
90 
91  double CalculateValue();
92 
93  void CalculateGradient();
94 
95  // ==============================================================================
96 
99 
101  std::string Info() const
102  {
103  return "FaceAngleResponseFunctionUtility";
104  }
105 
107  virtual void PrintInfo(std::ostream &rOStream) const
108  {
109  rOStream << "FaceAngleResponseFunctionUtility";
110  }
111 
113  virtual void PrintData(std::ostream &rOStream) const
114  {
115  }
116 
118 
119 protected:
120 
121  // ==============================================================================
122 
123 private:
124 
127 
128  double CalculateConditionValue(const Condition& rFace);
129 
133 
137 
138  ModelPart &mrModelPart;
139  double mDelta;
140  array_3d mMainDirection;
141  double mSinMinAngle;
142  double mValue;
143  bool mConsiderOnlyInitiallyFeasible;
144 
146 
147 }; // Class FaceAngleResponseFunctionUtility
148 
150 
151 } // namespace Kratos.
152 
153 #endif // FACE_ANGLE_RESPONSE_FUNCTION_UTILITY_H
Base class for all Conditions.
Definition: condition.h:59
Short class definition.
Definition: face_angle_response_function_utility.h:61
std::string Info() const
Turn back information as a string.
Definition: face_angle_response_function_utility.h:101
virtual ~FaceAngleResponseFunctionUtility()
Destructor.
Definition: face_angle_response_function_utility.h:79
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: face_angle_response_function_utility.h:113
KRATOS_CLASS_POINTER_DEFINITION(FaceAngleResponseFunctionUtility)
Pointer definition of FaceAngleResponseFunctionUtility.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: face_angle_response_function_utility.h:107
array_1d< double, 3 > array_3d
Definition: face_angle_response_function_utility.h:66
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21