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_laplacian_element.h
Go to the documentation of this file.
1 // KRATOS ___ ___ _ ___ __ ___ ___ ___ ___
2 // / __/ _ \| \| \ \ / /__| \_ _| __| __|
3 // | (_| (_) | .` |\ V /___| |) | || _|| _|
4 // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION
5 //
6 // License: BSD License
7 // Kratos default license: kratos/license.txt
8 //
9 // Main authors: Franziska Wahl
10 //
11 
12 #ifndef KRATOS_EMBEDDED_LAPLACIAN_ELEMENT_H_INCLUDED
13 #define KRATOS_EMBEDDED_LAPLACIAN_ELEMENT_H_INCLUDED
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "includes/element.h"
23 
24 // Application includes
25 #include "laplacian_element.h"
26 
27 namespace Kratos
28 {
29 
32 
36 
40 
44 
48 
49 namespace EmbeddedLaplacianInternals {
50 
51  template <size_t TDim, size_t TNumNodes>
52  ModifiedShapeFunctions::Pointer GetContinuousShapeFunctionCalculator(
53  const Element &rElement,
54  const Vector &rNodalDistances);
55 
56  // Data container class
57  template<std::size_t TDim>
59  {
60  public:
63 
64  static constexpr std::size_t NumNodes = TDim + 1;
65 
67  typedef std::vector<array_1d<double,3>> InterfaceNormalsType;
69 
73 
75 
77 
81 
86 
89 
93 
98  void Initialize(const Element& rElement);
99 
106  bool IsSplit();
107 
109  };
110 
111 } //namespace EmbeddedLaplacianInternals
112 
113 
114 template<std::size_t TDim>
116 {
117 public:
120 
123 
126 
127  static constexpr std::size_t NumNodes = TDim + 1;
128 
131 
135 
138  IndexType NewId,
139  GeometryType::Pointer pGeometry);
140 
142  IndexType NewId,
143  GeometryType::Pointer pGeometry,
144  PropertiesType::Pointer pProperties);
145 
147  virtual ~EmbeddedLaplacianElement();
148 
152 
153 
157 
158  Element::Pointer Create(
159  IndexType NewId,
160  NodesArrayType const& ThisNodes,
161  PropertiesType::Pointer pProperties) const override;
162 
163  Element::Pointer Create(
164  IndexType NewId,
165  GeometryType::Pointer pGeom,
166  PropertiesType::Pointer pProperties) const override;
167 
169  MatrixType& rLeftHandSideMatrix,
170  VectorType& rRightHandSideVector,
171  const ProcessInfo& rCurrentProcessInfo) override;
172 
174  MatrixType& rLeftHandSideMatrix,
175  const ProcessInfo& rCurrentProcessInfo) override;
176 
178  VectorType& rRightHandSideVector,
179  const ProcessInfo& rCurrentProcessInfo) override;
180 
181  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
182 
186 
187 
191 
192 
196 
197 
201 
202 
204 
205 protected:
208 
209 
213 
217 
221 
229  EmbeddedElementData& rData);
230 
239  double Tolerance) const;
240 
247  MatrixType& rLeftHandSideMatrix,
248  VectorType& rRightHandSideVector,
249  const ProcessInfo& rCurrentProcessInfo,
250  const EmbeddedElementData& rData);
251 
258  MatrixType& rLeftHandSideMatrix,
259  VectorType& rRightHandSideVector,
260  const ProcessInfo& rCurrentProcessInfo,
261  const EmbeddedElementData& rData);
262 
269  MatrixType& rLeftHandSideMatrix,
270  VectorType& rRightHandSideVector,
271  const ProcessInfo& rCurrentProcessInfo,
272  const EmbeddedElementData& rData);
273 
277 
278 
282 
283 
287 
288  // Protected default constructor necessary for serialization
290  {
291  }
292 
294 
295 private:
298 
302 
303 
307 
308  friend class Serializer;
309 
310  void save(Serializer& rSerializer) const override
311  {
313  }
314 
315  void load(Serializer& rSerializer) override
316  {
318  }
319 
323 
324 
328 
329 
333 
334 
338 
339 
343 
345  //EmbeddedLaplacianElement& operator=(const EmbeddedLaplacianElement& rOther);
346 
348  //EmbeddedLaplacianElement(const EmbeddedLaplacianElement& rOther);
349 
351 
352 }; // Class EmbeddedLaplacianElement
353 
354 
356 
359 
360 
364 
366 /* inline std::istream& operator >> (std::istream& rIStream,
367  EmbeddedLaplacianElement& rThis);
368 */
370 /* inline std::ostream& operator << (std::ostream& rOStream,
371  const EmbeddedLaplacianElement& rThis)
372  {
373  rThis.PrintInfo(rOStream);
374  rOStream << std::endl;
375  rThis.PrintData(rOStream);
376 
377  return rOStream;
378  }*/
380 
381 } // namespace Kratos.
382 
383 #endif // KRATOS_EMBEDDED_LAPLACIAN_ELEMENT_H_INCLUDED defined
Base class for all Elements.
Definition: element.h:60
Definition: embedded_laplacian_element.h:116
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: embedded_laplacian_element.cpp:140
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_laplacian_element.cpp:131
void AddNitscheBoundaryTerms(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const EmbeddedElementData &rData)
Calculation of the Nitsche boundary terms for intersected elements This method calculates the Nitsche...
Definition: embedded_laplacian_element.cpp:293
void AddPositiveInterfaceTerms(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const EmbeddedElementData &rData)
Calculation of the interface terms for intersected elements This method calculates the interface term...
Definition: embedded_laplacian_element.cpp:245
void InitializeGeometryData(EmbeddedElementData &rData)
Intersected element data structure initialization This method sets the data structure geometry fields...
Definition: embedded_laplacian_element.cpp:151
GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: embedded_laplacian_element.h:125
void AddPositiveElementSide(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const EmbeddedElementData &rData)
Calculation of positive side for intersected elements This method calculates a volume integral of the...
Definition: embedded_laplacian_element.cpp:197
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_laplacian_element.cpp:122
void NormalizeInterfaceNormals(typename EmbeddedElementData::InterfaceNormalsType &rNormals, double Tolerance) const
For an intersected element, normalize the interface normals This method normalizes the interface norm...
Definition: embedded_laplacian_element.cpp:186
virtual ~EmbeddedLaplacianElement()
Destructor.
Definition: embedded_laplacian_element.cpp:73
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedLaplacianElement)
Counted pointer of EmbeddedLaplacianElement.
LaplacianElement BaseType
Definition: embedded_laplacian_element.h:124
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: embedded_laplacian_element.cpp:55
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_laplacian_element.cpp:78
static constexpr std::size_t NumNodes
Definition: embedded_laplacian_element.h:127
EmbeddedLaplacianElement()
Definition: embedded_laplacian_element.h:289
Definition: embedded_laplacian_element.h:59
array_1d< double, NumNodes > NodalScalarData
Definition: embedded_laplacian_element.h:68
size_t NumNegativeNodes
Definition: embedded_laplacian_element.h:88
size_t NumPositiveNodes
Definition: embedded_laplacian_element.h:87
NodalScalarData NodalDistances
Definition: embedded_laplacian_element.h:76
Matrix PositiveInterfaceN
Definition: embedded_laplacian_element.h:82
static constexpr std::size_t NumNodes
Definition: embedded_laplacian_element.h:64
InterfaceNormalsType PositiveInterfaceUnitNormals
Definition: embedded_laplacian_element.h:85
ShapeFunctionsGradientsType PositiveInterfaceDNDX
Definition: embedded_laplacian_element.h:83
bool IsSplit()
Checks if the current element is intersected Checks if the current element is intersected by checking...
Definition: embedded_laplacian_element.cpp:411
GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: embedded_laplacian_element.h:66
Vector PositiveSideWeights
Definition: embedded_laplacian_element.h:80
ShapeFunctionsGradientsType PositiveSideDNDX
Definition: embedded_laplacian_element.h:79
Vector PositiveInterfaceWeights
Definition: embedded_laplacian_element.h:84
Matrix PositiveSideN
Definition: embedded_laplacian_element.h:78
double PenaltyCoefficient
Definition: embedded_laplacian_element.h:74
void Initialize(const Element &rElement)
Split element data container initialization This method initializes the embedded formulation data con...
Definition: embedded_laplacian_element.cpp:384
std::vector< array_1d< double, 3 > > InterfaceNormalsType
Definition: embedded_laplacian_element.h:67
std::size_t IndexType
Definition: flags.h:74
Short class definition.
Definition: laplacian_element.h:53
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
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
ModifiedShapeFunctions::Pointer GetContinuousShapeFunctionCalculator(const Element &rElement, const Vector &rNodalDistances)
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307