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 OPENFOAMTOOLS_H
22 #define OPENFOAMTOOLS_H
27 #include "egvtkobject.h"
28 #include "solverobject.h"
30 class SolverTools
: public QObject
, public EgVtkObject
, public SolverObject
35 private: // attributes
37 QProcess
* m_SolverProcess
;
38 QProcess
* m_ToolsProcess
;
39 QString m_SolverBinary
;
40 QString m_StrippedSolverBinary
;
41 QString m_WorkingDirectory
;
44 QString m_SolverBinPath
;
45 QString m_OpenFoamArch
;
46 QString m_ParaviewPath
;
49 QString m_Program_Solver
;
50 QStringList m_Arguments_Solver
;
52 QString m_Program_Tools
;
53 QStringList m_Arguments_Tools
;
55 QString m_FullCommand_Solver
;
56 QString m_FullCommand_Tools
;
61 void runTool(QString path
, QString name
, QStringList args
= QStringList());
62 QString
getBinary(QString name
) { return m_SolverBinPath
+ "/" + name
; }
66 SolverTools(QObject
*parent
= 0);
76 void runDecomposePar();
77 void runPostProcessingTools();
78 void runImportFluentCase();
80 void setCaseDirectory();
82 void stopSolverProcess();
85 void finishedHandler_Solver(int exitCode
, QProcess::ExitStatus exitStatus
);
86 void readFromStderr_Solver();
87 void readFromStdout_Solver();
88 void startedHandler_Solver();
91 void finishedHandler_Tools(int exitCode
, QProcess::ExitStatus exitStatus
);
92 void readFromStderr_Tools();
93 void readFromStdout_Tools();
94 void startedHandler_Tools();