compiles on openSUSE 15.4 part 2
[engrid-github.git] / src / libengrid / physicalboundarycondition.h
blobda4b89014d3edc1c9a8e8fb135a18b61ca8bab22
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
11 // + +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
16 // + +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
19 // + +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef PHYSICALBOUNDARYCONDITION_H
22 #define PHYSICALBOUNDARYCONDITION_H
24 #include <QString>
25 #include <QVector>
27 #include "engrid.h"
29 class PhysicalBoundaryCondition
32 private: // attributes
34 QString m_Name;
35 QString m_Type;
36 int m_Index;
37 QVector<QString> m_VarNames;
38 QVector<QString> m_VarValues;
39 QVector<QString> m_VarTypes;
41 protected: // methods
43 void addBoolVar (QString name, bool v);
44 void addRealVar (QString name, double v);
45 void addStringVar(QString name, QString v);
46 void addIntVar (QString name, int v);
47 void addVecVar (QString name, vec3_t v);
50 public: // methods
52 PhysicalBoundaryCondition();
54 void setName(QString name) { m_Name = name; }
55 void setIndex(int index) { m_Index = index; }
57 void checkVarType(int i, QString type);
58 void setValue(int i, double v);
59 void setValue(int i, QString v);
60 void setValue(int i, int v);
61 void setValue(int i, bool v);
62 void setValue(int i, vec3_t v);
63 void setValueFromString(int i, QString v);
64 void setType(QString type);
66 QString getName() { return m_Name; }
67 QString getType() { return m_Type; }
68 int getIndex() { return m_Index; }
69 QString getVarValueAsString(int i) { return m_VarValues[i]; }
70 int getVarValueAsInt(int i) { return m_VarValues[i].toInt(); }
71 double getVarValueAsDouble(int i) { return m_VarValues[i].toDouble(); }
72 bool getVarValueAsBool(int i);
73 vec3_t getVarValueAsVec3(int i);
74 QString getVarType(int i) { return m_VarTypes[i]; }
75 QString getVarName(int i) { return m_VarNames[i]; }
76 int getNumVars() { return m_VarValues.size(); }
78 QString getFoamP(QString version);
79 QString getFoamU(QString version, vec3_t n);
80 QString getFoamK(QString version);
81 QString getFoamEpsilon(QString version);
82 QString getFoamOmega(QString version);
83 QString getFoamT(QString version);
84 QString getFoamNut(QString version);
85 QString getFoamType();
87 QString xmlText();
91 #endif