OpenCAEPoro  0.2.0 Sep/22/2022
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  string dir;
49  string method;
50  string linearSolve;
51  vector<TuningPair> tuning_T;
56  vector<OCP_DBL> criticalTime;
57 
59  void Init(string& indir);
61  void InitTime() { criticalTime.push_back(0); };
63  void InitMethod();
65  void InitTuning();
67  void InputMETHOD(ifstream& ifs);
69  void InputTUNING(ifstream& ifs);
71  void DisplayTuning() const;
72 };
73 
74 #endif /* end if __ParamControl_HEADER__ */
75 
76 /*----------------------------------------------------------------------------*/
77 /* Brief Change History of This File */
78 /*----------------------------------------------------------------------------*/
79 /* Author Date Actions */
80 /*----------------------------------------------------------------------------*/
81 /* Shizhe Li Oct/01/2021 Create file */
82 /* Chensong Zhang Oct/15/2021 Format file */
83 /*----------------------------------------------------------------------------*/
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:22
vector< vector< OCP_DBL > > TUNING
Supply basic tools used to input files.
void InitTime()
Init the critical time.
vector< OCP_DBL > criticalTime
void InitTuning()
Determine the default Tuning.
void Init(string &indir)
Assign default values to parameters.
string method
Decide which method to use to discrete the fluid equations.
void InputTUNING(ifstream &ifs)
Input the Keyword: TUNING.
void DisplayTuning() const
Display the Tuning.
string dir
Current work directory.
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.