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.
mesh_condition.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: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "includes/condition.h"
21 
22 namespace Kratos
23 {
38 
46  : public Condition
47 {
48 public:
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
78 
79 public:
80 
83 
88  MeshCondition(IndexType NewId = 0);
89 
96  IndexType NewId,
97  const NodesArrayType& rThisNodes
98  );
99 
106  IndexType NewId,
107  GeometryType::Pointer pGeometry
108  );
109 
117  IndexType NewId,
118  GeometryType::Pointer pGeometry,
119  PropertiesType::Pointer pProperties
120  );
121 
123  MeshCondition(MeshCondition const& rOther);
124 
126  ~MeshCondition() override;
127 
131 
133  MeshCondition& operator=(MeshCondition const& rOther);
134 
138 
146  Condition::Pointer Create(
147  IndexType NewId,
148  NodesArrayType const& ThisNodes,
149  PropertiesType::Pointer pProperties
150  ) const override;
151 
159  Condition::Pointer Create(
160  IndexType NewId,
161  GeometryType::Pointer pGeom,
162  PropertiesType::Pointer pProperties
163  ) const override;
164 
172  Condition::Pointer Clone (
173  IndexType NewId,
174  NodesArrayType const& ThisNodes
175  ) const override;
176 
186  const VectorType& rRHSVector,
187  const Variable<VectorType>& rRHSVariable,
188  const Variable<double >& rDestinationVariable,
189  const ProcessInfo& rCurrentProcessInfo
190  ) override;
191 
201  const VectorType& rRHS,
202  const Variable<VectorType>& rRHSVariable,
203  const Variable<array_1d<double,3> >& rDestinationVariable,
204  const ProcessInfo& rCurrentProcessInfo
205  ) override;
206 
216  const MatrixType& rLHSMatrix,
217  const Variable<MatrixType>& rLHSVariable,
218  const Variable<Matrix>& rDestinationVariable,
219  const ProcessInfo& rCurrentProcessInfo
220  ) override;
221 
225 
231  const Parameters GetSpecifications() const override;
232 
234  std::string Info() const override
235  {
236  std::stringstream buffer;
237  buffer << "Geometrical Condition #" << Id();
238  return buffer.str();
239  }
240 
242 
243  void PrintInfo(std::ostream& rOStream) const override
244  {
245  rOStream << "Geometrical Condition #" << Id();
246  }
247 
249  void PrintData(std::ostream& rOStream) const override
250  {
251  pGetGeometry()->PrintData(rOStream);
252  }
253 
255 
256 private:
257 
260  friend class Serializer;
261 
262  void save(Serializer& rSerializer) const override;
263 
264  void load(Serializer& rSerializer) override;
265 
267 
268 }; // Class MeshCondition
269 
277 
278 } // namespace Kratos.
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
std::size_t IndexType
Definition: condition.h:92
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
Geometry base class.
Definition: geometry.h:71
IndexType Id() const
Definition: indexed_object.h:107
This is pure geometric condition. The only purpose for this definition is to create dummy conditions.
Definition: mesh_condition.h:47
MeshCondition & operator=(MeshCondition const &rOther)
Assignment operator.
Definition: mesh_condition.cpp:76
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MeshCondition)
Counted pointer of MeshCondition.
MeshCondition(IndexType NewId=0)
Constructor.
Definition: mesh_condition.cpp:22
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Creates a new condition pointer.
Definition: mesh_condition.cpp:88
Condition BaseType
We define the base class Condition.
Definition: mesh_condition.h:54
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mesh_condition.h:249
void AddExplicitContribution(const VectorType &rRHSVector, const Variable< VectorType > &rRHSVariable, const Variable< double > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to make the element to assemble an rRHS vector identified by a variable rRH...
Definition: mesh_condition.cpp:134
BaseType::NodeType NodeType
Definition of the node type.
Definition: mesh_condition.h:63
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mesh_condition.h:243
const Parameters GetSpecifications() const override
This method provides the specifications/requirements of the element.
Definition: mesh_condition.cpp:170
BaseType::NodesArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: mesh_condition.h:72
BaseType::SizeType SizeType
Definition of the size type.
Definition: mesh_condition.h:60
BaseType::GeometryType GeometryType
Definition of the geometry type with given NodeType.
Definition: mesh_condition.h:69
std::string Info() const override
Turn back information as a string.
Definition: mesh_condition.h:234
~MeshCondition() override
Destructor.
Definition: mesh_condition.cpp:69
Condition::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
Creates a new condition pointer and clones the previous condition data.
Definition: mesh_condition.cpp:116
BaseType::IndexType IndexType
Dfinition of the index type.
Definition: mesh_condition.h:57
BaseType::PropertiesType PropertiesType
Definition of the properties type.
Definition: mesh_condition.h:66
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
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
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307