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/parser/eclipse/Deck/Deck.hpp>
28
29namespace Opm
30{
31
34 template <int dim>
35 class Rock
36 {
37 public:
44
45
47 Rock();
48
61 void init(Opm::DeckConstPtr deck,
62 const std::vector<int>& global_cell,
63 const double perm_threshold = 0.0);
64
69 void init(const int num_cells,
70 const double uniform_poro,
71 const double uniform_perm);
72
73
77 double porosity(int cell_index) const;
78
82 PermTensor permeability(int cell_index) const;
83
88
89 protected:
90 // Methods
91 void assignPorosity(Opm::DeckConstPtr deck,
92 const std::vector<int>& global_cell);
93 void assignPermeability(Opm::DeckConstPtr deck,
94 const std::vector<int>& global_cell,
95 const double perm_threshold);
96
97 // Data members.
98 std::vector<double> porosity_;
99 std::vector<double> permeability_;
100 std::vector<unsigned char> permfield_valid_;
102 };
103
104
105} // namespace Opm
106
107#include "Rock_impl.hpp"
108
109
110#endif // OPM_ROCK_HEADER_INCLUDED
std::vector< unsigned char > permfield_valid_
Definition: Rock.hpp:100
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 init(Opm::DeckConstPtr 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 > permeability_
Definition: Rock.hpp:99
void assignPermeability(Opm::DeckConstPtr deck, const std::vector< int > &global_cell, const double perm_threshold)
Definition: Rock_impl.hpp:132
void assignPorosity(Opm::DeckConstPtr deck, const std::vector< int > &global_cell)
Definition: Rock_impl.hpp:115
double porosity(int cell_index) const
Read-access to porosity.
Definition: Rock_impl.hpp:76
std::vector< double > porosity_
Definition: Rock.hpp:98
PermeabilityKind permeability_kind_
Definition: Rock.hpp:101
Definition: BlackoilFluid.hpp:32
PermeabilityKind
Enum for the kind of permeability field originally retrieved.
Definition: ReservoirPropertyCommon.hpp:50
FullMatrix< double, SharedData, COrdering > SharedCMatrix
Definition: Matrix.hpp:581
const FullMatrix< double, ImmutableSharedData, COrdering > ImmutableCMatrix
Definition: Matrix.hpp:582
FullMatrix< double, OwnData, COrdering > OwnCMatrix
Convenience typedefs for C-ordered.
Definition: Matrix.hpp:580