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.
accessor.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: Alejandro Cornejo
11 // Riccardo Rossi
12 // Carlos Roig
13 //
14 
15 # pragma once
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "geometries/geometry.h"
23 #include "includes/process_info.h"
24 #include "includes/node.h"
25 
26 namespace Kratos
27 {
30 
33 
34 class Properties;
35 
42 class KRATOS_API(KRATOS_CORE) Accessor
43 {
44 public:
47 
50 
53 
57 
59  Accessor() = default;
60 
62  virtual ~Accessor() = default;
63 
65  Accessor(const Accessor& rOther) {}
66 
70 
80  virtual double GetValue(
81  const Variable<double>& rVariable,
82  const Properties& rProperties,
83  const GeometryType& rGeometry,
84  const Vector& rShapeFunctionVector,
85  const ProcessInfo& rProcessInfo
86  ) const;
87 
97  virtual Vector GetValue(
98  const Variable<Vector>& rVariable,
99  const Properties& rProperties,
100  const GeometryType& rGeometry,
101  const Vector& rShapeFunctionVector,
102  const ProcessInfo& rProcessInfo
103  ) const;
104 
114  virtual bool GetValue(
115  const Variable<bool>& rVariable,
116  const Properties& rProperties,
117  const GeometryType& rGeometry,
118  const Vector& rShapeFunctionVector,
119  const ProcessInfo& rProcessInfo
120  ) const;
121 
131  virtual int GetValue(
132  const Variable<int>& rVariable,
133  const Properties& rProperties,
134  const GeometryType& rGeometry,
135  const Vector& rShapeFunctionVector,
136  const ProcessInfo& rProcessInfo
137  ) const;
138 
148  virtual Matrix GetValue(
149  const Variable<Matrix>& rVariable,
150  const Properties& rProperties,
151  const GeometryType& rGeometry,
152  const Vector& rShapeFunctionVector,
153  const ProcessInfo& rProcessInfo
154  ) const;
155 
166  const Variable<array_1d<double, 3>>& rVariable,
167  const Properties& rProperties,
168  const GeometryType& rGeometry,
169  const Vector& rShapeFunctionVector,
170  const ProcessInfo& rProcessInfo
171  ) const;
172 
183  const Variable<array_1d<double, 6>>& rVariable,
184  const Properties& rProperties,
185  const GeometryType& rGeometry,
186  const Vector& rShapeFunctionVector,
187  const ProcessInfo& rProcessInfo
188  ) const;
189 
200  const Variable<array_1d<double, 4>>& rVariable,
201  const Properties& rProperties,
202  const GeometryType& rGeometry,
203  const Vector& rShapeFunctionVector,
204  const ProcessInfo& rProcessInfo
205  ) const;
206 
217  const Variable<array_1d<double, 9>>& rVariable,
218  const Properties& rProperties,
219  const GeometryType& rGeometry,
220  const Vector& rShapeFunctionVector,
221  const ProcessInfo& rProcessInfo
222  ) const;
223 
233  virtual std::string GetValue(
234  const Variable<std::string>& rVariable,
235  const Properties& rProperties,
236  const GeometryType& rGeometry,
237  const Vector& rShapeFunctionVector,
238  const ProcessInfo& rProcessInfo
239  ) const;
240 
241  // Getting a pointer to the class
242  virtual Accessor::UniquePointer Clone() const;
243 
247 
249  virtual std::string Info() const
250  {
251  std::stringstream buffer;
252  buffer << "Accessor" ;
253 
254  return buffer.str();
255  }
256 
258  virtual void PrintInfo(std::ostream& rOStream) const {rOStream << "Accessor";}
259 
261  virtual void PrintData(std::ostream& rOStream) const {rOStream << "virtual method of the base Accessor class";}
262 
264 
265 private:
266 
269 
270  friend class Serializer;
271 
272  virtual void save(Serializer& rSerializer) const
273  {}
274 
275  virtual void load(Serializer& rSerializer)
276  {}
277 
278 
279 }; // class
281 
283 
284 } // namespace Kratos
This class defines the way a certain property is accessed.
Definition: accessor.h:43
Accessor(const Accessor &rOther)
Copy constructor.
Definition: accessor.h:65
Accessor()=default
Default constructor.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: accessor.h:258
virtual std::string Info() const
Turn back information as a string.
Definition: accessor.h:249
KRATOS_CLASS_POINTER_DEFINITION(Accessor)
Pointer definition of Accessor.
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: accessor.h:261
virtual ~Accessor()=default
Destructor.
Geometry base class.
Definition: geometry.h:71
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
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307