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_semi_analytic_point_load_condition.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 // Armin Geiser, https://github.com/armingeiser
11 //
12 
13 // System includes
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
22 
23 namespace Kratos
24 {
25 
28 
32 
36 
40 
44 
45 template <typename TPrimalCondition>
47  : public AdjointSemiAnalyticBaseCondition<TPrimalCondition>
48 {
49 public:
52 
53  // redefine the typedefs because of templated base class
55  typedef typename BaseType::SizeType SizeType;
56  typedef typename BaseType::IndexType IndexType;
60  typedef typename BaseType::VectorType VectorType;
61  typedef typename BaseType::MatrixType MatrixType;
67 
70 
74 
76  : AdjointSemiAnalyticBaseCondition<TPrimalCondition>(NewId)
77  {
78  }
79 
80  AdjointSemiAnalyticPointLoadCondition(IndexType NewId, typename GeometryType::Pointer pGeometry)
81  : AdjointSemiAnalyticBaseCondition<TPrimalCondition>(NewId, pGeometry)
82  {
83  }
84 
86  typename GeometryType::Pointer pGeometry,
87  typename PropertiesType::Pointer pProperties)
88  : AdjointSemiAnalyticBaseCondition<TPrimalCondition>(NewId, pGeometry, pProperties)
89  {
90  }
91 
95 
96  Condition::Pointer Create(IndexType NewId,
97  NodesArrayType const& ThisNodes,
98  typename PropertiesType::Pointer pProperties) const override
99  {
100  return Kratos::make_intrusive<AdjointSemiAnalyticPointLoadCondition<TPrimalCondition>>(
101  NewId, this->GetGeometry().Create(ThisNodes), pProperties);
102  }
103 
104  Condition::Pointer Create(IndexType NewId,
105  typename GeometryType::Pointer pGeometry,
106  typename PropertiesType::Pointer pProperties) const override
107  {
108  return Kratos::make_intrusive<AdjointSemiAnalyticPointLoadCondition<TPrimalCondition>>(
109  NewId, pGeometry, pProperties);
110  }
111 
112  void CalculateSensitivityMatrix(const Variable<array_1d<double,3> >& rDesignVariable,
113  Matrix& rOutput,
114  const ProcessInfo& rCurrentProcessInfo) override;
115 
119 
120 
124 
125 
129 
130 
134 
135 
137 
138 protected:
141 
142 
146 
147 
151 
152 
156 
160 
161 
165 
166 
170 
172 
173 private:
176 
177 
181 
182 
183 
187 
191 
192 
196 
197 
201 
205 
206  friend class Serializer;
207 
208  void save( Serializer& rSerializer ) const override
209  {
211  }
212 
213  void load( Serializer& rSerializer ) override
214  {
216  }
217 
221 
223 
224 }; // Class AdjointSemiAnalyticPointLoadCondition
225 
229 
230 
234 
236 
237 } // namespace Kratos.
238 
239 
AdjointSemiAnalyticBaseCondition.
Definition: adjoint_semi_analytic_base_condition.h:54
Definition: adjoint_semi_analytic_point_load_condition.h:48
BaseType::DofsArrayType DofsArrayType
Definition: adjoint_semi_analytic_point_load_condition.h:64
BaseType::IntegrationMethod IntegrationMethod
Definition: adjoint_semi_analytic_point_load_condition.h:65
Condition::Pointer Create(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: adjoint_semi_analytic_point_load_condition.h:104
AdjointSemiAnalyticPointLoadCondition(IndexType NewId, typename GeometryType::Pointer pGeometry)
Definition: adjoint_semi_analytic_point_load_condition.h:80
AdjointSemiAnalyticBaseCondition< TPrimalCondition > BaseType
Definition: adjoint_semi_analytic_point_load_condition.h:54
BaseType::NodesArrayType NodesArrayType
Definition: adjoint_semi_analytic_point_load_condition.h:59
BaseType::MatrixType MatrixType
Definition: adjoint_semi_analytic_point_load_condition.h:61
BaseType::GeometryDataType GeometryDataType
Definition: adjoint_semi_analytic_point_load_condition.h:66
BaseType::IndexType IndexType
Definition: adjoint_semi_analytic_point_load_condition.h:56
BaseType::VectorType VectorType
Definition: adjoint_semi_analytic_point_load_condition.h:60
AdjointSemiAnalyticPointLoadCondition(IndexType NewId=0)
Definition: adjoint_semi_analytic_point_load_condition.h:75
BaseType::DofsVectorType DofsVectorType
Definition: adjoint_semi_analytic_point_load_condition.h:63
BaseType::SizeType SizeType
Definition: adjoint_semi_analytic_point_load_condition.h:55
void CalculateSensitivityMatrix(const Variable< array_1d< double, 3 > > &rDesignVariable, Matrix &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: adjoint_semi_analytic_point_load_condition.cpp:27
AdjointSemiAnalyticPointLoadCondition(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties)
Definition: adjoint_semi_analytic_point_load_condition.h:85
BaseType::PropertiesType PropertiesType
Definition: adjoint_semi_analytic_point_load_condition.h:58
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, typename PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: adjoint_semi_analytic_point_load_condition.h:96
BaseType::GeometryType GeometryType
Definition: adjoint_semi_analytic_point_load_condition.h:57
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(AdjointSemiAnalyticPointLoadCondition)
Counted pointer of AdjointSemiAnalyticPointLoadCondition.
BaseType::EquationIdVectorType EquationIdVectorType
Definition: adjoint_semi_analytic_point_load_condition.h:62
std::size_t SizeType
Definition: condition.h:94
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: condition.h:105
PointerVectorSet< DofType > DofsArrayType
Definition: condition.h:102
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: condition.h:86
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
Matrix MatrixType
Definition: condition.h:90
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
Vector VectorType
Definition: condition.h:88
Properties PropertiesType
Definition: condition.h:80
GeometryData GeometryDataType
Definition: condition.h:107
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307