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.
nodal_position_expression_io.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: Suneth Warnakulasuriya
11 //
12 
13 #pragma once
14 
15 // System incldues
16 
17 // Project includes
19 #include "expression/traits.h"
20 #include "expression_io.h"
21 #include "includes/define.h"
23 #include "includes/model_part.h"
24 
25 namespace Kratos {
26 
27 
28 class KRATOS_API(KRATOS_CORE) NodalPositionExpressionIO
29 {
30 public:
33 
35 
39 
40  class KRATOS_API(KRATOS_CORE) Input : public ExpressionInput
41  {
42  public:
45 
47 
51 
52  Input(
53  const ModelPart& rModelPart,
54  const Configuration& rConfiguration,
55  const MeshType& rMeshType = MeshType::Local);
56 
57  ~Input() override = default;
58 
62 
63  Expression::Pointer Execute() const override;
64 
66 
67  private:
70 
71  const ModelPart& mrModelPart;
72 
73  const Configuration mConfiguration;
74 
75  const MeshType mMeshType;
76 
78 
79  };
80 
81  class KRATOS_API(KRATOS_CORE) Output : public ExpressionOutput
82  {
83  public:
86 
88 
92 
93  Output(
94  ModelPart& rModelPart,
95  const Configuration& rConfiguration,
96  const MeshType& rMeshType = MeshType::Local);
97 
98  ~Output() override = default;
99 
103 
104  void Execute(const Expression& rExpression) override;
105 
107 
108  private:
111 
112  ModelPart& mrModelPart;
113 
114  const Configuration mConfiguration;
115 
116  const MeshType mMeshType;
117 
119 
120  };
121 
125 
126  template<MeshType TMeshType = MeshType::Local>
127  KRATOS_API(KRATOS_CORE) static void Read(
129  const Configuration& rConfiguration);
130 
131  template<MeshType TMeshType = MeshType::Local>
132  KRATOS_API(KRATOS_CORE) static void Write(
134  const Configuration& rConfiguration);
135 
137 
138 }; // class ExpressionIO
139 
140 
141 } // namespace Kratos
Container variable data holder.
Definition: container_expression.h:80
Base class or all the expression types.
Definition: expression.h:38
Kratos::intrusive_ptr< Expression > Pointer
Definition: expression.h:44
Definition: expression_io.h:25
Definition: expression_io.h:69
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Definition: nodal_position_expression_io.h:41
Definition: nodal_position_expression_io.h:82
Definition: nodal_position_expression_io.h:29
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
Configuration
Enum for Initial and Current configurations.
Definition: global_variables.h:38
void Read(LiteralFlatExpression< std::conditional_t< std::is_same_v< TDataType, int >, int, double >> &rExpression, const IndexType EntityDataBeginIndex, const TDataType &rValue, std::index_sequence< TIndex... >)
Definition: variable_expression_data_io.cpp:31
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
MeshType
Definition: traits.h:19
@ Local
Definition: traits.h:20