RockBasic.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
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_ROCKBASIC_HEADER_INCLUDED
21 #define OPM_ROCKBASIC_HEADER_INCLUDED
22 
23 
24 #include <vector>
25 
26 
27 namespace Opm
28 {
29 
30  class RockBasic
31  {
32  public:
34  RockBasic();
35 
37  void init(const int dimensions,
38  const int num_cells,
39  const double poro,
40  const double perm);
41 
43  int numDimensions() const
44  {
45  return dimensions_;
46  }
47 
49  int numCells() const
50  {
51  return porosity_.size();
52  }
53 
55  const double* porosity() const
56  {
57  return &porosity_[0];
58  }
59 
63  const double* permeability() const
64  {
65  return &permeability_[0];
66  }
67 
68  private:
69  int dimensions_;
70  std::vector<double> porosity_;
71  std::vector<double> permeability_;
72  };
73 
74 
75 
76 } // namespace Opm
77 
78 
79 #endif // OPM_ROCKBASIC_HEADER_INCLUDED
Definition: RockBasic.hpp:30
Definition: AnisotropicEikonal.hpp:43
const double * porosity() const
Definition: RockBasic.hpp:55
RockBasic()
Default constructor.
int numDimensions() const
Definition: RockBasic.hpp:43
const double * permeability() const
Definition: RockBasic.hpp:63
void init(const int dimensions, const int num_cells, const double poro, const double perm)
Initialize with homogenous porosity and permeability.
int dimensions(const UnstructuredGrid &grid)
Get the dimensions of a grid.
int numCells() const
Definition: RockBasic.hpp:49