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.
embedded_nodal_variable_calculation_element_simplex.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: Ruben Zorrilla
11 //
12 //
13 
14 #if !defined(KRATOS_EMBEDDED_NODAL_VARIABLE_CALCULATION_ELEMENT_H_INCLUDED )
15 #define KRATOS_EMBEDDED_NODAL_VARIABLE_CALCULATION_ELEMENT_H_INCLUDED
16 
17 // System includes
18 
19 
20 // External includes
21 
22 
23 // Project includes
24 #include "includes/define.h"
25 #include "includes/element.h"
26 
27 // Application includes
28 
29 
30 namespace Kratos
31 {
32 
35 
38 
42 
46 
50 
54 
56 
58 template< class TVarType >
59 class KRATOS_API(KRATOS_CORE) EmbeddedNodalVariableCalculationElementSimplex : public Element
60 {
61 public:
64 
67 
69  typedef Node NodeType;
70 
73 
76 
78  typedef Vector VectorType;
79 
81  typedef Matrix MatrixType;
82 
88 
92 
93  //Constructors.
94 
96 
100  : Element(NewId)
101  {}
102 
104 
109  IndexType NewId,
110  const NodesArrayType& ThisNodes)
111  : Element(NewId, ThisNodes)
112  {}
113 
115 
120  IndexType NewId,
121  GeometryType::Pointer pGeometry)
122  : Element(NewId, pGeometry)
123  {}
124 
126 
132  IndexType NewId,
133  GeometryType::Pointer pGeometry,
134  PropertiesType::Pointer pProperties)
135  : Element(NewId, pGeometry, pProperties)
136  {}
137 
140 
144 
145 
149 
151 
158  Element::Pointer Create(
159  IndexType NewId,
160  NodesArrayType const& ThisNodes,
161  PropertiesType::Pointer pProperties) const override
162  {
163  return Kratos::make_intrusive<EmbeddedNodalVariableCalculationElementSimplex<TVarType>>(NewId, GetGeometry().Create(ThisNodes), pProperties);
164  }
165 
173  void CalculateLocalSystem(
174  MatrixType& rLeftHandSideMatrix,
175  VectorType& rRightHandSideVector,
176  const ProcessInfo& rCurrentProcessInfo) override;
177 
185  MatrixType &rLeftHandSideMatrix,
186  const ProcessInfo &rCurrentProcessInfo) override;
187 
195  VectorType &rRightHandSideVector,
196  const ProcessInfo &rCurrentProcessInfo) override;
197 
207  int Check(const ProcessInfo &rCurrentProcessInfo) const override;
208 
216  EquationIdVectorType& rResult,
217  const ProcessInfo& rCurrentProcessInfo) const override;
218 
226  DofsVectorType& rElementalDofList,
227  const ProcessInfo& rCurrentProcessInfo) const override;
228 
232 
236 
237 
241 
242 
246 
248  std::string Info() const override
249  {
250  std::stringstream buffer;
251  buffer << "EmbeddedNodalVariableCalculationElementSimplex #" << Id();
252  return buffer.str();
253  }
254 
256  void PrintInfo(std::ostream& rOStream) const override
257  {
258  rOStream << "EmbeddedNodalVariableCalculationElementSimplex";
259  }
260 
262  virtual void PrintData(std::ostream& rOStream) const override
263  {}
264 
268 
269 
271 protected:
274 
275 
279 
280 
284 
285 
289 
290 
294 
295 
299 
300 
304 
305 
307 private:
310 
311 
315 
316 
320 
321  friend class Serializer;
322 
323  void save(Serializer& rSerializer) const override
324  {
326  }
327 
328  void load(Serializer& rSerializer) override
329  {
331  }
332 
336 
337 
341 
342  const array_1d<double, 2> GetDistanceBasedShapeFunctionValues();
343 
347 
348 
352 
353 
357 
359  EmbeddedNodalVariableCalculationElementSimplex & operator=(EmbeddedNodalVariableCalculationElementSimplex const& rOther) = delete;
360 
362  EmbeddedNodalVariableCalculationElementSimplex(EmbeddedNodalVariableCalculationElementSimplex const& rOther) = delete;
363 
365 
366 }; // Class EmbeddedNodalVariableCalculationElementSimplex
367 
369 
372 
373 
377 
379 template <class TVarType>
380 inline std::istream &operator>>(
381  std::istream &rIStream,
383 {
384  return rIStream;
385 }
386 
388 template <class TVarType>
389 inline std::ostream &operator<<(
390  std::ostream &rOStream,
392 {
393  rThis.PrintInfo(rOStream);
394  rOStream << std::endl;
395  rThis.PrintData(rOStream);
396 
397  return rOStream;
398 }
400 
402 
403 } // namespace Kratos.
404 
405 #endif // KRATOS_EMBEDDED_NODAL_VARIABLE_CALCULATION_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: element.h:92
An element to compute the a nodal variable from an embedded skin.
Definition: embedded_nodal_variable_calculation_element_simplex.h:60
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedNodalVariableCalculationElementSimplex)
Pointer definition of EmbeddedNodalVariableCalculationElementSimplex.
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Calculate the element's local Left Hand Side (LHS) contribution to the system for the current step.
EmbeddedNodalVariableCalculationElementSimplex(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: embedded_nodal_variable_calculation_element_simplex.h:108
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: embedded_nodal_variable_calculation_element_simplex.h:256
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: embedded_nodal_variable_calculation_element_simplex.h:81
Element::DofsVectorType DofsVectorType
Definition: embedded_nodal_variable_calculation_element_simplex.h:86
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Get the Dof List object Returns a list of the element's Dofs.
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows This determines the elemental e...
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate the element's local Reft Hand Side (RHS) contribution to the system for the current step.
Vector VectorType
Vector type for local contributions to the linear system.
Definition: embedded_nodal_variable_calculation_element_simplex.h:78
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: embedded_nodal_variable_calculation_element_simplex.h:75
~EmbeddedNodalVariableCalculationElementSimplex() override=default
Destructor.
EmbeddedNodalVariableCalculationElementSimplex(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: embedded_nodal_variable_calculation_element_simplex.h:119
Node NodeType
Node type (default is: Node)
Definition: embedded_nodal_variable_calculation_element_simplex.h:69
EmbeddedNodalVariableCalculationElementSimplex(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: embedded_nodal_variable_calculation_element_simplex.h:131
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: embedded_nodal_variable_calculation_element_simplex.h:72
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered. This function provides ...
std::string Info() const override
Turn back information as a string.
Definition: embedded_nodal_variable_calculation_element_simplex.h:248
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: embedded_nodal_variable_calculation_element_simplex.h:158
EmbeddedNodalVariableCalculationElementSimplex(IndexType NewId=0)
Default constuctor.
Definition: embedded_nodal_variable_calculation_element_simplex.h:99
Element::DofsArrayType DofsArrayType
Definition: embedded_nodal_variable_calculation_element_simplex.h:85
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: embedded_nodal_variable_calculation_element_simplex.h:262
Element::IndexType IndexType
Element types definition.
Definition: embedded_nodal_variable_calculation_element_simplex.h:84
Element::EquationIdVectorType EquationIdVectorType
Definition: embedded_nodal_variable_calculation_element_simplex.h:87
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.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
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307