1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + This file is part of enGrid. +
5 // + Copyright 2008-2014 enGits GmbH +
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. +
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. +
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/>. +
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"
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
>
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
;
68 GuiEditBoundaryConditions();
69 virtual ~GuiEditBoundaryConditions();
70 void setMap(QMap
<int, BoundaryCondition
> *a_bcmap
) { m_BcMap
= a_bcmap
; }
74 virtual void before();
79 virtual void operate();
82 // Boundary conditions tab
101 void updatePhysicalBoundaryConditions();
102 void loadPhysicalValues();
103 void savePhysicalValues();
108 void addBoundaryType();
109 void deleteBoundaryType();
110 void changePhysicalValues();
118 void saveSolverParameters();
124 // MPI configuration tab
128 void loadMpiParameters();
129 void saveMpiParameters();
130 QString
tableToString();
131 void stringToTable(QString hostfile_txt
);
137 void deleteProcess();
138 void importHostFile();
139 void exportHostFile();