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.
autoslip_inlet_3d.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3 Kratos Fluid Dynamics Application
4 Kratos
5 A General Purpose Software for Multi-Physics Finite Element Analysis
6 Version 1.0 (Released on march 05, 2007).
7 
8 Copyright 2007
9 Pooyan Dadvand, Riccardo Rossi
10 pooyan@cimne.upc.edu
11 rrossi@cimne.upc.edu
12 CIMNE (International Center for Numerical Methods in Engineering),
13 Gran Capita' s/n, 08034 Barcelona, Spain
14 
15 Permission is hereby granted, free of charge, to any person obtaining
16 a copy of this software and associated documentation files (the
17 "Software"), to deal in the Software without restriction, including
18 without limitation the rights to use, copy, modify, merge, publish,
19 distribute, sublicense and/or sell copies of the Software, and to
20 permit persons to whom the Software is furnished to do so, subject to
21 the following condition:
22 
23 Distribution of this code for any commercial purpose is permissible
24 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNER.
25 
26 The above copyright notice and this permission notice shall be
27 included in all copies or substantial portions of the Software.
28 
29 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
32 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
33 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
34 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
35 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 
37 ==============================================================================
38  */
39 
40 #ifndef KRATOS_MONOLITHIC_AUTOSLIP_INLET_CONDITION_H
41 #define KRATOS_MONOLITHIC_AUTOSLIP_INLET_CONDITION_H
42 
43 // System includes
44 #include <string>
45 #include <iostream>
46 
47 
48 // External includes
49 
50 
51 // Project includes
52 #include "includes/define.h"
53 #include "includes/serializer.h"
54 #include "includes/condition.h"
55 #include "includes/process_info.h"
57 
58 
59 // Application includes
60 
61 namespace Kratos
62 {
65 
68 
72 
76 
80 
84 
86 
87 //template< unsigned int TDim, unsigned int TNumNodes = TDim >
88 class MonolithicAutoSlipInlet3D : public Condition
89 {
90 public:
93 
96 
97  typedef Node NodeType;
98 
100 
102 
104 
106 
108 
109  typedef std::size_t IndexType;
110 
111  typedef std::size_t SizeType;
112 
113  typedef std::vector<std::size_t> EquationIdVectorType;
114 
115  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
116 
118 
122 
124 
128  Condition(NewId)
129  {
130  }
131 
133 
138  Condition(NewId,ThisNodes)
139  {
140  }
141 
143 
147  MonolithicAutoSlipInlet3D(IndexType NewId, GeometryType::Pointer pGeometry):
148  Condition(NewId,pGeometry)
149  {
150  }
151 
153 
158  MonolithicAutoSlipInlet3D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties):
159  Condition(NewId,pGeometry,pProperties)
160  {
161  }
162 
165  Condition(rOther)
166  {
167  }
168 
170  virtual ~MonolithicAutoSlipInlet3D() override {}
171 
172 
176 
179  {
180  Condition::operator=(rOther);
181 
182  return *this;
183  }
184 
188 
190 
195  virtual Condition::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override
196  {
197  return Condition::Pointer(new MonolithicAutoSlipInlet3D(NewId, GetGeometry().Create(ThisNodes), pProperties));
198  }
199 
200 
202 
205  virtual void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
206  VectorType& rRightHandSideVector,
207  const ProcessInfo& rCurrentProcessInfo) override;
208 
209 
211 
214  virtual void CalculateRightHandSide(VectorType& rRightHandSideVector,
215  const ProcessInfo& rCurrentProcessInfo) override;
216 
217 
218 
220 
224  virtual void EquationIdVector(EquationIdVectorType& rResult,
225  const ProcessInfo& rCurrentProcessInfo) const override;
226 
227 
229 
233  virtual void GetDofList(DofsVectorType& ConditionDofList,
234  const ProcessInfo& CurrentProcessInfo) const override;
235 
236 
240 
241 
245 
246 
250 
252  virtual std::string Info() const override
253  {
254  std::stringstream buffer;
255  buffer << "MonolithicAutoSlipInlet3D";
256  return buffer.str();
257  }
258 
260  virtual void PrintInfo(std::ostream& rOStream) const override
261  {
262  rOStream << "MonolithicAutoSlipInlet3D";
263  }
264 
266  virtual void PrintData(std::ostream& rOStream) const override {}
267 
268 
272 
273 
275 
276 protected:
279 
280 
284 
285 
289 
290 
294 
296 
303 
304 
308 
309 
313 
314 
318 
319 
321 
322 private:
325 
326 
330 
331 
335 
336  friend class Serializer;
337 
338  virtual void save(Serializer& rSerializer) const override
339  {
341  }
342 
343  virtual void load(Serializer& rSerializer) override
344  {
346  }
347 
351 
352 
356 
357 
361 
362 
366 
367 
371 
372 
374 
375 }; // Class MonolithicAutoSlipInlet3D
376 
377 
379 
382 
383 
387 
388 
390 inline std::istream& operator >> (std::istream& rIStream,
391  MonolithicAutoSlipInlet3D& rThis)
392 {
393  return rIStream;
394 }
395 
397 inline std::ostream& operator << (std::ostream& rOStream,
398  const MonolithicAutoSlipInlet3D& rThis)
399 {
400  rThis.PrintInfo(rOStream);
401  rOStream << std::endl;
402  rThis.PrintData(rOStream);
403 
404  return rOStream;
405 }
406 
408 
410 
411 
412 } // namespace Kratos.
413 
414 #endif // KRATOS_MONOLITHIC_WALL_CONDITION_H
Base class for all Conditions.
Definition: condition.h:59
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
Condition & operator=(Condition const &rOther)
Assignment operator.
Definition: condition.h:181
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Implements a wall condition for the PFEM2 formulation.
Definition: autoslip_inlet.h:87
std::vector< std::size_t > EquationIdVectorType
Definition: autoslip_inlet_3d.h:113
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: autoslip_inlet_3d.h:266
std::size_t IndexType
Definition: autoslip_inlet_3d.h:109
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: autoslip_inlet_3d.h:117
MonolithicAutoSlipInlet3D(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: autoslip_inlet_3d.h:137
Geometry< NodeType > GeometryType
Definition: autoslip_inlet_3d.h:101
MonolithicAutoSlipInlet3D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: autoslip_inlet_3d.h:158
virtual void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
Properties PropertiesType
Definition: autoslip_inlet_3d.h:99
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: autoslip_inlet_3d.h:115
Vector VectorType
Definition: autoslip_inlet_3d.h:105
std::size_t SizeType
Definition: autoslip_inlet_3d.h:111
MonolithicAutoSlipInlet3D & operator=(MonolithicAutoSlipInlet3D const &rOther)
Assignment operator.
Definition: autoslip_inlet_3d.h:178
virtual void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Return local contributions of the correct size, filled with zeros (for compatibility with time scheme...
void CalculateNormal(array_1d< double, 3 > &An)
Commpute the wall stress and add corresponding terms to the system contributions.
Matrix MatrixType
Definition: autoslip_inlet_3d.h:107
MonolithicAutoSlipInlet3D(MonolithicAutoSlipInlet3D const &rOther)
Copy constructor.
Definition: autoslip_inlet_3d.h:164
KRATOS_CLASS_POINTER_DEFINITION(MonolithicAutoSlipInlet3D)
Pointer definition of MonolithicAutoSlipInlet3D.
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: autoslip_inlet_3d.h:260
virtual ~MonolithicAutoSlipInlet3D() override
Destructor.
Definition: autoslip_inlet_3d.h:170
Node NodeType
Definition: autoslip_inlet_3d.h:97
MonolithicAutoSlipInlet3D(IndexType NewId=0)
Default constructor.
Definition: autoslip_inlet_3d.h:127
virtual void GetDofList(DofsVectorType &ConditionDofList, const ProcessInfo &CurrentProcessInfo) const override
Returns a list of the element's Dofs.
MonolithicAutoSlipInlet3D(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: autoslip_inlet_3d.h:147
virtual void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Return local right hand side of the correct size, filled with zeros (for compatibility with time sche...
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: autoslip_inlet_3d.h:103
virtual Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new MonolithicAutoSlipInlet3D object.
Definition: autoslip_inlet_3d.h:195
virtual std::string Info() const override
Turn back information as a string.
Definition: autoslip_inlet_3d.h:252
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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
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