OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
ParamControl.hpp
Go to the documentation of this file.
1 
12 #ifndef __PARAMCONTROL_HEADER__
13 #define __PARAMCONTROL_HEADER__
14 
15 // Standard header files
16 #include <cassert>
17 #include <fstream>
18 #include <vector>
19 
20 // OpenCAEPoro header files
21 #include "OCPConst.hpp"
22 #include "UtilInput.hpp"
23 
29 typedef vector<vector<OCP_DBL>> TUNING;
30 
33 {
34 public:
35  TuningPair(const USI& t, const TUNING& tmp)
36  : d(t)
37  , Tuning(tmp){};
38  USI d;
39  TUNING Tuning;
40 };
41 
46 {
47 public:
48  USI model{ISOTHERMALMODEL};
49  string dir;
50 
51  string method;
52  string linearSolve;
53  vector<TuningPair> tuning_T;
55 
59  vector<OCP_DBL> criticalTime;
60 
62  void Init(string& indir);
64  void InitTime() { criticalTime.push_back(0); };
66  void InitMethod();
68  void InitTuning();
70  void InputMETHOD(ifstream& ifs);
72  void InputTUNING(ifstream& ifs);
74  void DisplayTuning() const;
75 };
76 
77 #endif /* end if __ParamControl_HEADER__ */
78 
79 /*----------------------------------------------------------------------------*/
80 /* Brief Change History of This File */
81 /*----------------------------------------------------------------------------*/
82 /* Author Date Actions */
83 /*----------------------------------------------------------------------------*/
84 /* Shizhe Li Oct/01/2021 Create file */
85 /* Chensong Zhang Oct/15/2021 Format file */
86 /*----------------------------------------------------------------------------*/
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
vector< vector< OCP_DBL > > TUNING
Supply basic tools used to input files.
void InitTime()
Init the critical time.
vector< OCP_DBL > criticalTime
USI model
model: thermal or isothermal.
void InitTuning()
Determine the default Tuning.
void Init(string &indir)
Assign default values to parameters.
string method
Discretization method for fluid equations.
void InputTUNING(ifstream &ifs)
Input the Keyword: TUNING.
void DisplayTuning() const
Display the Tuning.
string dir
Current work directory.
TUNING tuning
Tuning.
void InitMethod()
Determine the default discrete method.
string linearSolve
Fasp file.
void InputMETHOD(ifstream &ifs)
Input the Keyword: METHOD.
vector< TuningPair > tuning_T
Tuning set.
TODO: Add Doxygen.