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.
output_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 
11 #if !defined(KRATOS_OUTPUT_CONDITION_H_INCLUDED )
12 #define KRATOS_OUTPUT_CONDITION_H_INCLUDED
13 
14 // System includes
15 #include "includes/define.h"
16 #include "includes/condition.h"
17 
18 // External includes
19 
20 // Project includes
22 
23 namespace Kratos
24 {
25 
27 /* This provides access to evaluated variables at certain positions.
28 */
30  : public Condition
31 {
32 public:
35 
38 
40  typedef std::size_t SizeType;
41  typedef std::size_t IndexType;
42 
46 
49  IndexType NewId,
50  GeometryType::Pointer pGeometry)
51  : Condition(NewId, pGeometry)
52  {};
53 
56  IndexType NewId,
57  GeometryType::Pointer pGeometry,
58  PropertiesType::Pointer pProperties)
59  : Condition(NewId, pGeometry, pProperties)
60  {};
61 
64  : Condition()
65  {};
66 
68  virtual ~OutputCondition() = default;
69 
73 
75  Condition::Pointer Create(
76  IndexType NewId,
77  GeometryType::Pointer pGeom,
78  PropertiesType::Pointer pProperties
79  ) const override
80  {
81  return Kratos::make_intrusive<OutputCondition>(
82  NewId, pGeom, pProperties);
83  };
84 
86  Condition::Pointer Create(
87  IndexType NewId,
88  NodesArrayType const& ThisNodes,
89  PropertiesType::Pointer pProperties
90  ) const override
91  {
92  return Kratos::make_intrusive< OutputCondition >(
93  NewId, GetGeometry().Create(ThisNodes), pProperties);
94  };
95 
99 
101  const Variable<double>& rVariable,
102  std::vector<double>& rOutput,
103  const ProcessInfo& rCurrentProcessInfo) override;
104 
106  const Variable<array_1d<double, 3>>& rVariable,
107  std::vector<array_1d<double, 3>>& rOutput,
108  const ProcessInfo& rCurrentProcessInfo) override;
109 
113 
115  std::string Info() const override
116  {
117  std::stringstream buffer;
118  buffer << "\"OutputCondition\" #" << Id();
119  return buffer.str();
120  }
121 
123  void PrintInfo(std::ostream& rOStream) const override
124  {
125  rOStream << "\"OutputCondition\" #" << Id();
126  }
127 
129  void PrintData(std::ostream& rOStream) const override {
130  pGetGeometry()->PrintData(rOStream);
131  }
132 
134 
135 private:
138 
139  friend class Serializer;
140 
141  virtual void save(Serializer& rSerializer) const override
142  {
144  }
145 
146  virtual void load(Serializer& rSerializer) override
147  {
149  }
150 
152 
153 }; // Class OutputCondition
154 
155 } // namespace Kratos.
156 
157 #endif // KRATOS_OUTPUT_CONDITION_H_INCLUDED defined
158 
159 
Base class for all Conditions.
Definition: condition.h:59
std::size_t IndexType
Definition: flags.h:74
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
IndexType Id() const
Definition: indexed_object.h:107
Output condition.
Definition: output_condition.h:31
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: output_condition.h:75
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: output_condition.cpp:20
std::size_t SizeType
Size types.
Definition: output_condition.h:40
OutputCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor with Id, geometry and property.
Definition: output_condition.h:55
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create with Id, pointer to geometry and pointer to property.
Definition: output_condition.h:86
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: output_condition.h:123
OutputCondition()
Default constructor.
Definition: output_condition.h:63
std::string Info() const override
Turn back information as a string.
Definition: output_condition.h:115
virtual ~OutputCondition()=default
Destructor.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: output_condition.h:129
std::size_t IndexType
Definition: output_condition.h:41
KRATOS_CLASS_POINTER_DEFINITION(OutputCondition)
Counted pointer of OutputCondition.
OutputCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor with Id and geometry.
Definition: output_condition.h:48
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307