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/input/eclipse/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  class TracerConfig;
38  namespace Action {
39  class State;
40  }
41 } // Opm
42 
43 namespace Opm { namespace data {
44  class Wells;
45 }} // Opm::data
46 
47 namespace Opm { namespace RestartIO { namespace Helpers {
48 
50  {
51  public:
52  explicit AggregateWellData(const std::vector<int>& inteHead);
53 
54  void captureDeclaredWellData(const Schedule& sched,
55  const TracerConfig& tracer,
56  const std::size_t sim_step,
57  const Opm::Action::State& action_state,
58  const Opm::WellTestState& wtest_state,
59  const Opm::SummaryState& smry,
60  const std::vector<int>& inteHead);
61 
62  void captureDynamicWellData(const Opm::Schedule& sched,
63  const TracerConfig& tracer,
64  const std::size_t sim_step,
65  const Opm::data::Wells& xw,
66  const Opm::SummaryState& smry);
67 
69  const std::vector<int>& getIWell() const
70  {
71  return this->iWell_.data();
72  }
73 
75  const std::vector<float>& getSWell() const
76  {
77  return this->sWell_.data();
78  }
79 
81  const std::vector<double>& getXWell() const
82  {
83  return this->xWell_.data();
84  }
85 
87  const std::vector<EclIO::PaddedOutputString<8>>& getZWell() const
88  {
89  return this->zWell_.data();
90  }
91 
92 
93 
94  private:
96  WindowedArray<int> iWell_;
97 
99  WindowedArray<float> sWell_;
100 
102  WindowedArray<double> xWell_;
103 
106 
108  int nWGMax_;
109  };
110 
111 }}} // Opm::RestartIO::Helpers
112 
113 #endif // OPM_AGGREGATE_WELL_DATA_HPP
Provide facilities to simplify constructing restart vectors such as IWEL or RSEG.
Definition: State.hpp:40
Definition: AggregateWellData.hpp:50
const std::vector< int > & getIWell() const
Retrieve Integer Well Data Array.
Definition: AggregateWellData.hpp:69
const std::vector< EclIO::PaddedOutputString< 8 > > & getZWell() const
Retrieve Character Well Data Array.
Definition: AggregateWellData.hpp:87
const std::vector< float > & getSWell() const
Retrieve Floating-Point (Real) Well Data Array.
Definition: AggregateWellData.hpp:75
const std::vector< double > & getXWell() const
Retrieve Floating-Point (Double Precision) Well Data Array.
Definition: AggregateWellData.hpp:81
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:145
Definition: SummaryState.hpp:69
Definition: TracerConfig.hpp:31
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