BoxManager.hpp
Go to the documentation of this file.
1/*
2 Copyright 2014 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 BOXMANAGER_HPP_
22#define BOXMANAGER_HPP_
23
24#include <vector>
25#include <memory>
26
29
30/*
31 This class implements a simple book keeping system for the current
32 input box. In general there are three different input boxes which
33 are relevant:
34
35 1. The global box give by the complete dimensions of the grid.
36
37 2. The input box given explicitly by the BOX keyword. That BOX will
38 apply to all following FIELD properties, and it will continue
39 to apply until either:
40
41 - ENDBOX
42 - A new BOX
43 - End of current section
44
45 is encountered.
46
47 3. Some keywords allow for a Box which applies only to the elements
48 of that keyword.
49
50*/
51
52
53namespace Opm {
54
55 class BoxManager {
56 public:
57 BoxManager(const EclipseGrid& grid);
58
59 void setInputBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2);
60 void setKeywordBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2);
61
62 void endSection();
64 void endKeyword();
65
66 const Box& getActiveBox() const;
67 const std::vector<Box::cell_index>& index_list() const;
68
69 private:
70 const EclipseGrid& grid;
71 std::unique_ptr<Box> m_globalBox;
72 std::unique_ptr<Box> m_inputBox;
73 std::unique_ptr<Box> m_keywordBox;
74 };
75}
76
77
78#endif
Definition: BoxManager.hpp:55
BoxManager(const EclipseGrid &grid)
void setKeywordBox(int i1, int i2, int j1, int j2, int k1, int k2)
const Box & getActiveBox() const
void setInputBox(int i1, int i2, int j1, int j2, int k1, int k2)
const std::vector< Box::cell_index > & index_list() const
Definition: Box.hpp:31
Definition: EclipseGrid.hpp:54
Definition: A.hpp:4