Rock.hpp
Go to the documentation of this file.
1/*
2 Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
3 Copyright 2009, 2010 Statoil ASA.
4
5 This file is part of the Open Porous Media project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 OPM is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef OPM_ROCK_HEADER_INCLUDED
22#define OPM_ROCK_HEADER_INCLUDED
23
26
27#include <opm/input/eclipse/Deck/Deck.hpp>
28
29namespace Opm
30{
31
34 template <int dim>
35 class Rock
36 {
37 public:
44
45
47 Rock();
48
54 void init(const Opm::Deck& deck,
55 const std::vector<int>& global_cell,
56 const double perm_threshold = 0.0);
57
62 void init(const int num_cells,
63 const double uniform_poro,
64 const double uniform_perm);
65
66
70 double porosity(int cell_index) const;
71
75 PermTensor permeability(int cell_index) const;
76
81
82 protected:
83 // Methods
84 void assignPorosity(const Opm::Deck& deck,
85 const std::vector<int>& global_cell);
86 void assignPermeability(const Opm::Deck& deck,
87 const std::vector<int>& global_cell,
88 const double perm_threshold);
89
90 // Data members.
91 std::vector<double> porosity_;
92 std::vector<double> permeability_;
93 std::vector<unsigned char> permfield_valid_;
95 };
96
97
98} // namespace Opm
99
100#include "Rock_impl.hpp"
101
102
103#endif // OPM_ROCK_HEADER_INCLUDED
std::vector< unsigned char > permfield_valid_
Definition: Rock.hpp:93
PermTensor permeability(int cell_index) const
Read-access to permeability.
Definition: Rock_impl.hpp:84
SharedPermTensor permeabilityModifiable(int cell_index)
Read- and write-access to permeability. Use with caution.
Definition: Rock_impl.hpp:95
OwnCMatrix MutablePermTensor
Tensor type to be used for holding copies of permeability tensors.
Definition: Rock.hpp:41
SharedCMatrix SharedPermTensor
Tensor type for read and write access to permeability.
Definition: Rock.hpp:43
ImmutableCMatrix PermTensor
Tensor type for read-only access to permeability.
Definition: Rock.hpp:39
Rock()
Default constructor.
Definition: Rock_impl.hpp:37
void assignPorosity(const Opm::Deck &deck, const std::vector< int > &global_cell)
Definition: Rock_impl.hpp:115
void assignPermeability(const Opm::Deck &deck, const std::vector< int > &global_cell, const double perm_threshold)
Definition: Rock_impl.hpp:132
std::vector< double > permeability_
Definition: Rock.hpp:92
double porosity(int cell_index) const
Read-access to porosity.
Definition: Rock_impl.hpp:76
void init(const Opm::Deck &deck, const std::vector< int > &global_cell, const double perm_threshold=0.0)
Initialize from a grdecl file.
Definition: Rock_impl.hpp:44
std::vector< double > porosity_
Definition: Rock.hpp:91
PermeabilityKind permeability_kind_
Definition: Rock.hpp:94
auto deck
Definition: elasticity_upscale_impl.hpp:590
Definition: ImplicitAssembly.hpp:43
PermeabilityKind
Enum for the kind of permeability field originally retrieved.
Definition: ReservoirPropertyCommon.hpp:50
FullMatrix< double, SharedData, COrdering > SharedCMatrix
Definition: Matrix.hpp:580
const FullMatrix< double, ImmutableSharedData, COrdering > ImmutableCMatrix
Definition: Matrix.hpp:581
FullMatrix< double, OwnData, COrdering > OwnCMatrix
Convenience typedefs for C-ordered.
Definition: Matrix.hpp:579