My Project
AggregateWellData.hpp
1 /*
2  Copyright (c) 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_AGGREGATE_WELL_DATA_HPP
21 #define OPM_AGGREGATE_WELL_DATA_HPP
22 
24 
25 #include <opm/io/eclipse/PaddedOutputString.hpp>
26 #include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.hpp>
27 
28 #include <cstddef>
29 #include <string>
30 #include <vector>
31 
32 namespace Opm {
33  class Schedule;
34  class SummaryState;
35  class UnitSystem;
36  class WellTestState;
37  namespace Action {
38  class State;
39  }
40 } // Opm
41 
42 namespace Opm { namespace data {
43  class Wells;
44 }} // Opm::data
45 
46 namespace Opm { namespace RestartIO { namespace Helpers {
47 
49  {
50  public:
51  explicit AggregateWellData(const std::vector<int>& inteHead);
52 
53  void captureDeclaredWellData(const Schedule& sched,
54  const UnitSystem& units,
55  const std::size_t sim_step,
56  const Opm::Action::State& action_state,
57  const Opm::WellTestState& wtest_state,
58  const Opm::SummaryState& smry,
59  const std::vector<int>& inteHead);
60 
61  void captureDynamicWellData(const Opm::Schedule& sched,
62  const std::size_t sim_step,
63  const Opm::data::Wells& xw,
64  const Opm::SummaryState& smry);
65 
67  const std::vector<int>& getIWell() const
68  {
69  return this->iWell_.data();
70  }
71 
73  const std::vector<float>& getSWell() const
74  {
75  return this->sWell_.data();
76  }
77 
79  const std::vector<double>& getXWell() const
80  {
81  return this->xWell_.data();
82  }
83 
85  const std::vector<EclIO::PaddedOutputString<8>>& getZWell() const
86  {
87  return this->zWell_.data();
88  }
89 
90 
91 
92  private:
94  WindowedArray<int> iWell_;
95 
97  WindowedArray<float> sWell_;
98 
100  WindowedArray<double> xWell_;
101 
104 
106  int nWGMax_;
107  };
108 
109 }}} // Opm::RestartIO::Helpers
110 
111 #endif // OPM_AGGREGATE_WELL_DATA_HPP
Provide facilities to simplify constructing restart vectors such as IWEL or RSEG.
Definition: State.hpp:38
Definition: AggregateWellData.hpp:49
const std::vector< int > & getIWell() const
Retrieve Integer Well Data Array.
Definition: AggregateWellData.hpp:67
const std::vector< EclIO::PaddedOutputString< 8 > > & getZWell() const
Retrieve Character Well Data Array.
Definition: AggregateWellData.hpp:85
const std::vector< float > & getSWell() const
Retrieve Floating-Point (Real) Well Data Array.
Definition: AggregateWellData.hpp:73
const std::vector< double > & getXWell() const
Retrieve Floating-Point (Double Precision) Well Data Array.
Definition: AggregateWellData.hpp:79
const std::vector< T > & data() const
Get read-only access to full, linearised data items for all windows.
Definition: WindowedArray.hpp:131
Definition: Schedule.hpp:135
Definition: SummaryState.hpp:69
Definition: UnitSystem.hpp:34
Definition: WellTestState.hpp:62
Definition: Wells.hpp:337
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29