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.
xml_expression_element.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 includes
16 #include <string>
17 #include <vector>
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "expression/expression.h"
22 
23 namespace Kratos {
24 
27 
28 class KRATOS_API(KRATOS_CORE) XmlExpressionElement {
29 public:
32 
33  using IndexType = std::size_t;
34 
36 
40 
45  XmlExpressionElement(const std::string& rTagName);
46 
53  const std::string& rDataName,
54  const std::vector<Expression::ConstPointer>& rExpressions);
55 
59 
64  const std::string GetTagName() const;
65 
71  void AddAttribute(
72  const std::string& rName,
73  const std::string& rValue);
74 
79  const std::vector<std::pair<std::string, std::string>>& GetAttributes() const;
80 
84  void ClearAttributes();
85 
90  void AddElement(const XmlExpressionElement::Pointer pXmlElement);
91 
97  std::vector<XmlExpressionElement::Pointer> GetElements(const std::string& rTagName) const;
98 
103  const std::vector<XmlExpressionElement::Pointer>& GetElements() const;
104 
108  void ClearElements();
109 
110  const std::vector<Expression::ConstPointer> GetExpressions() const;
111 
113 
114 private:
117 
118  const std::string mTagName;
119 
120  std::vector<std::pair<std::string, std::string>> mAttributes;
121 
122  std::vector<XmlExpressionElement::Pointer> mXmlElements;
123 
124  const std::vector<Expression::ConstPointer> mExpressions;
125 
127 };
128 
130 
131 } // namespace Kratos
Definition: xml_expression_element.h:28
KRATOS_CLASS_POINTER_DEFINITION(XmlExpressionElement)
std::size_t IndexType
Definition: xml_expression_element.h:33
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21