My Project
DoubHEAD.hpp
1 /*
2  Copyright 2018 Statoil ASA.
3 
4  This file is part of the Open Porous Media Project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_DOUBHEAD_HEADER_INCLUDED
21 #define OPM_DOUBHEAD_HEADER_INCLUDED
22 
23 #include <chrono>
24 #include <cstddef>
25 #include <vector>
26 
27 namespace Opm {
28  struct Tuning;
29  class Schedule;
30  class UDQParams;
31 }
32 
33 namespace Opm { namespace RestartIO {
34 
35  class DoubHEAD
36  {
37  public:
38  struct TimeStamp {
39  std::chrono::time_point<std::chrono::system_clock> start;
40  std::chrono::duration<double, std::chrono::seconds::period> elapsed;
41  };
42 
43  struct guideRate {
44  double A;
45  double B;
46  double C;
47  double D;
48  double E;
49  double F;
50  double delay;
51  double damping_fact;
52  };
53 
54  struct liftOptPar {
55  double min_int;
56  double incr;
57  double min_ec_grad;
58  };
59 
60  DoubHEAD();
61 
62  ~DoubHEAD() = default;
63  DoubHEAD(const DoubHEAD& rhs) = default;
64  DoubHEAD(DoubHEAD&& rhs) = default;
65 
66  DoubHEAD& operator=(const DoubHEAD& rhs) = default;
67  DoubHEAD& operator=(DoubHEAD&& rhs) = default;
68 
69  DoubHEAD& tuningParameters(const Tuning& tuning,
70  const double cnvT);
71 
72  DoubHEAD& timeStamp(const TimeStamp& ts);
73  DoubHEAD& nextStep(const double nextTimeStep);
74 
75  DoubHEAD& drsdt(const Schedule& sched,
76  const std::size_t lookup_step,
77  const double cnvT);
78 
79  DoubHEAD& udq_param(const UDQParams& udqPar);
80  DoubHEAD& guide_rate_param(const guideRate& guide_rp);
81  DoubHEAD& lift_opt_param(const liftOptPar& lo_par);
82 
83  const std::vector<double>& data() const
84  {
85  return this->data_;
86  }
87 
88  private:
89  std::vector<double> data_;
90  };
91 
92 }} // Opm::RestartIO
93 
94 #endif // OPM_DOUBHEAD_HEADER_INCLUDED
Definition: DoubHEAD.hpp:36
Definition: Schedule.hpp:135
Definition: UDQParams.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: DoubHEAD.hpp:38
Definition: DoubHEAD.hpp:43
Definition: DoubHEAD.hpp:54
Definition: Tuning.hpp:24