CompletionSet.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2013 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 
21 #ifndef COMPLETIONSET_HPP_
22 #define COMPLETIONSET_HPP_
23 
24 #include <memory>
25 
26 #include <boost/date_time.hpp>
27 
33 
34 namespace Opm {
35 
36  class CompletionSet {
37  public:
38  CompletionSet();
39  void add(CompletionConstPtr completion);
40  size_t size() const;
41  CompletionSet * shallowCopy() const;
42  CompletionConstPtr get(size_t index) const;
43  bool allCompletionsShut() const;
56  void orderCompletions(size_t well_i, size_t well_j, EclipseGridConstPtr grid);
57  private:
58  std::vector<CompletionConstPtr> m_completions;
59  size_t findClosestCompletion(int oi, int oj, EclipseGridConstPtr grid,
60  double oz, size_t start_pos);
61  };
62 
63  typedef std::shared_ptr<CompletionSet> CompletionSetPtr;
64  typedef std::shared_ptr<const CompletionSet> CompletionSetConstPtr;
65 }
66 
67 
68 
69 #endif
size_t size() const
std::shared_ptr< CompletionSet > CompletionSetPtr
Definition: CompletionSet.hpp:63
std::shared_ptr< const EclipseGrid > EclipseGridConstPtr
Definition: EclipseGrid.hpp:143
bool allCompletionsShut() const
Definition: Deck.hpp:29
std::shared_ptr< const CompletionSet > CompletionSetConstPtr
Definition: CompletionSet.hpp:64
void orderCompletions(size_t well_i, size_t well_j, EclipseGridConstPtr grid)
std::shared_ptr< const Completion > CompletionConstPtr
Definition: Completion.hpp:78
Definition: CompletionSet.hpp:36
CompletionSet * shallowCopy() const
void add(CompletionConstPtr completion)