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.
small_displacement_simp_element.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 // Main authors: Baumgärtner Daniel, https://github.com/dbaumgaertner
11 // Octaviano Malfavón Farías
12 // Eric Gonzales
13 // Philipp Hofer
14 // Erich Wehrle
15 //
16 // ==============================================================================
17 
18 #if !defined(KRATOS_SMALL_DISPLACEMENT_SIMP_ELEMENT_H_INCLUDED )
19 #define KRATOS_SMALL_DISPLACEMENT_SIMP_ELEMENT_H_INCLUDED
20 
21 // Project includes
22 
25 
26 
27 namespace Kratos
28 {
43 
45 
50 class KRATOS_API(TOPOLOGY_OPTIMIZATION_APPLICATION) SmallDisplacementSIMPElement
51  : public SmallDisplacement
52 {
53 public:
54 
60  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
67 
68 
72 
74  typedef std::size_t IndexType;
75 
77  typedef std::size_t SizeType;
78 
81 
85 
87  SmallDisplacementSIMPElement(IndexType NewId, GeometryType::Pointer pGeometry);
88 
89  SmallDisplacementSIMPElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
90 
93  :BaseType(rOther)
94  {};
95 
97  ~SmallDisplacementSIMPElement() override;
98 
102 
105 
109 
124  Element::Pointer Create(
125  IndexType NewId,
126  GeometryType::Pointer pGeom,
127  PropertiesType::Pointer pProperties
128  ) const override;
129 
137  Element::Pointer Create(
138  IndexType NewId,
139  NodesArrayType const& ThisNodes,
140  PropertiesType::Pointer pProperties
141  ) const override;
149  Element::Pointer Clone (
150  IndexType NewId,
151  NodesArrayType const& rThisNodes
152  ) const override;
153 
154 
155  // =============================================================================================================================================
156  // STARTING / ENDING METHODS
157  // =============================================================================================================================================
158 
160  void CalculateOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
161 
163  void Calculate(
164  const Variable<double>& rVariable,
165  double &rOutput,
166  const ProcessInfo& rCurrentProcessInfo
167  ) override;
168 
169 
170  // =============================================================================================================================================
171  // =============================================================================================================================================
172 
173 
177 
184 
186  std::string Info() const override
187  {
188  std::stringstream buffer;
189  buffer << "Small Displacement Solid Element #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
190  return buffer.str();
191  }
192 
194  void PrintInfo(std::ostream& rOStream) const override
195  {
196  rOStream << "Small Displacement Solid Element #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
197  }
198 
200  void PrintData(std::ostream& rOStream) const override
201  {
202  pGetGeometry()->PrintData(rOStream);
203  }
208 
209 protected:
215 
219 
221  {
222  }
223 
224 
225 
229 
240 
241  private:
242 
248 
249 
253 
254 
258 
263 
267  friend class Serializer;
268 
269  // A private default constructor necessary for serialization
270  virtual void save(Serializer& rSerializer) const override;
271  virtual void load(Serializer& rSerializer) override;
272 
273 
280 
281 }; // Class SmallDisplacementSIMPElement
282 
290 
291 } // namespace Kratos.
292 #endif // KRATOS_SMALL_DISPLACEMENT_TOPLOGY_OPTIMIZATION_ELEMENT_H_INCLUDED defined
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
std::size_t IndexType
Definition: flags.h:74
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
IntegrationMethod
Definition: geometry_data.h:76
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
Small displacement element for 2D and 3D geometries.
Definition: small_displacement.h:54
Topology Optimization Small Displacement Element for 3D geometries.
Definition: small_displacement_simp_element.h:52
ConstitutiveLaw ConstitutiveLawType
Definition: small_displacement_simp_element.h:58
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: small_displacement_simp_element.h:64
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SmallDisplacementSIMPElement)
Counted pointer of SmallDisplacementSIMPElement.
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: small_displacement_simp_element.h:60
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: small_displacement_simp_element.h:62
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: small_displacement_simp_element.h:200
std::size_t IndexType
The definition of the index type.
Definition: small_displacement_simp_element.h:74
std::size_t SizeType
The definition of the sizetype.
Definition: small_displacement_simp_element.h:77
SmallDisplacementSIMPElement()
Definition: small_displacement_simp_element.h:220
SmallDisplacementSIMPElement(SmallDisplacementSIMPElement const &rOther)
Copy constructor.
Definition: small_displacement_simp_element.h:92
SmallDisplacement BaseType
Definition: small_displacement_simp_element.h:71
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_displacement_simp_element.h:194
SmallDisplacementSIMPElement & operator=(SmallDisplacementSIMPElement const &rOther)
Assignment operator.
std::string Info() const override
Turn back information as a string.
Definition: small_displacement_simp_element.h:186
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
TDataType Calculate(GeometryType &dummy, const Variable< TDataType > &rVariable)
Definition: add_geometries_to_python.cpp:103
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307