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 "foamobject.h"
30 class OpenFOAMTools
: public QObject
, public EgVtkObject
, public FoamObject
{
33 private: // attributes
35 QProcess
* m_SolverProcess
;
36 QProcess
* m_ToolsProcess
;
37 QString m_SolverBinary
;
38 QString m_StrippedSolverBinary
;
39 QString m_WorkingDirectory
;
42 QString m_SolverBinPath
;
43 QString m_OpenFoamArch
;
44 QString m_ParaviewPath
;
47 QString m_Program_Solver
;
48 QStringList m_Arguments_Solver
;
50 QString m_Program_Tools
;
51 QStringList m_Arguments_Tools
;
53 QString m_FullCommand_Solver
;
54 QString m_FullCommand_Tools
;
59 void runTool(QString path
, QString name
, QStringList args
= QStringList());
60 QString
getBinary(QString name
) { return m_SolverBinPath
+ "/" + name
; }
64 OpenFOAMTools(QObject
*parent
= 0);
74 void runDecomposePar();
75 void runPostProcessingTools();
76 void runImportFluentCase();
78 void setCaseDirectory();
80 void stopSolverProcess();
83 void finishedHandler_Solver(int exitCode
, QProcess::ExitStatus exitStatus
);
84 void readFromStderr_Solver();
85 void readFromStdout_Solver();
86 void startedHandler_Solver();
89 void finishedHandler_Tools(int exitCode
, QProcess::ExitStatus exitStatus
);
90 void readFromStderr_Tools();
91 void readFromStdout_Tools();
92 void startedHandler_Tools();