2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 // + This file is part of enGrid. +
6 // + Copyright 2008-2010 enGits GmbH +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef guieditboundaryconditions_H
24 #define guieditboundaryconditions_H
26 class GuiEditBoundaryConditions
;
28 #include "boundarycondition.h"
29 #include "physicalboundarycondition.h"
30 #include "dialogoperation.h"
31 #include "guivolumedelegate.h"
32 #include "filetemplate.h"
33 #include "multipagewidgetpage.h"
34 #include "volumedefinition.h"
35 #include "multipagewidget.h"
37 #include "ui_guieditboundaryconditions.h"
40 // boundary conditions -> add/del/update
41 // boundary types -> add/del/update + change/load/save
42 // solver ->setup/save
43 // MPI -> add/del/update
45 class GuiEditBoundaryConditions
: public DialogOperation
<Ui::GuiEditBoundaryConditions
, Operation
>
50 private: // attributes
52 // variables to store settings locally while changing them. They will be copied over to their GuiMainWindow counterparts once OK is clicked.
53 QMap
<int, BoundaryCondition
> *m_BcMap
;
54 QMap
<QString
, VolumeDefinition
> m_VolMap
;
55 QMap
<QString
, PhysicalBoundaryCondition
> m_PhysicalBoundaryConditionsMap
;
57 private: // utility attributes
59 GuiVolumeDelegate
*delegate
;
60 QVector
<MultiPageWidgetPage
*> m_page_vector
;
61 PhysicalBoundaryCondition m_PBC_current
;
63 MultiPageWidget
* m_multipagewidget_Solver
;
65 /// vector to hold the binaries
66 QVector
<QString
> m_SolverBinary
;
70 GuiEditBoundaryConditions();
71 virtual ~GuiEditBoundaryConditions();
72 void setMap(QMap
<int, BoundaryCondition
> *a_bcmap
) { m_BcMap
= a_bcmap
; }
76 virtual void before();
81 virtual void operate();
84 // Boundary conditions tab
100 void updatePhysicalBoundaryConditions();
101 void loadPhysicalValues();
102 void savePhysicalValues();
105 void addBoundaryType();
106 void deleteBoundaryType();
107 void changePhysicalValues();
115 void saveSolverParameters();
120 // MPI configuration tab
124 void loadMpiParameters();
125 void saveMpiParameters();
126 QString
tableToString();
127 void stringToTable(QString hostfile_txt
);
132 void deleteProcess();
133 void importHostFile();
134 void exportHostFile();