compiles on openSUSE 15.4 part 2
[engrid-github.git] / src / libengrid / guieditboundaryconditions.h
blobf77a6a274efbc00096779f74468531fcff33a40a
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 guieditboundaryconditions_H
22 #define guieditboundaryconditions_H
24 class GuiEditBoundaryConditions;
26 #include "boundarycondition.h"
27 #include "physicalboundarycondition.h"
28 #include "dialogoperation.h"
29 #include "guivolumedelegate.h"
30 #include "filetemplate.h"
31 #include "multipagewidgetpage.h"
32 #include "volumedefinition.h"
33 #include "multipagewidget.h"
35 #include "ui_guieditboundaryconditions.h"
37 // tabs:
38 // boundary conditions -> add/del/update
39 // boundary types -> add/del/update + change/load/save
40 // solver ->setup/save
41 // MPI -> add/del/update
43 class GuiEditBoundaryConditions : public DialogOperation<Ui::GuiEditBoundaryConditions, Operation>
46 Q_OBJECT
48 private: // attributes
50 // variables to store settings locally while changing them. They will be copied over to their GuiMainWindow counterparts once OK is clicked.
51 QMap<int, BoundaryCondition> *m_BcMap;
52 QMap<QString, VolumeDefinition> m_VolMap;
53 QMap<QString, PhysicalBoundaryCondition> m_PhysicalBoundaryConditionsMap;
55 private: // utility attributes
57 GuiVolumeDelegate *delegate;
58 QVector <MultiPageWidgetPage*> m_page_vector;
59 PhysicalBoundaryCondition m_PBC_current;
61 MultiPageWidget* m_multipagewidget_Solver;
63 /// vector to hold the binaries
64 QVector <QString> m_SolverBinary;
66 public:
68 GuiEditBoundaryConditions();
69 virtual ~GuiEditBoundaryConditions();
70 void setMap(QMap<int, BoundaryCondition> *a_bcmap) { m_BcMap = a_bcmap; }
72 private:
74 virtual void before();
77 protected: // methods
79 virtual void operate();
82 // Boundary conditions tab
84 protected:
86 void updateVol();
88 protected slots:
90 void addVol();
91 void delVol();
92 void allA();
93 void allB();
94 void allOff();
97 // Boundary types tab
99 protected:
101 void updatePhysicalBoundaryConditions();
102 void loadPhysicalValues();
103 void savePhysicalValues();
106 protected slots:
108 void addBoundaryType();
109 void deleteBoundaryType();
110 void changePhysicalValues();
113 // Solver tab
115 protected:
117 void setupSolvers();
118 void saveSolverParameters();
121 protected slots:
124 // MPI configuration tab
126 protected:
128 void loadMpiParameters();
129 void saveMpiParameters();
130 QString tableToString();
131 void stringToTable(QString hostfile_txt);
134 protected slots:
136 void addProcess();
137 void deleteProcess();
138 void importHostFile();
139 void exportHostFile();
144 #endif