ecl_grid_cache.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'ecl_grid_cache.h' is part of ERT - Ensemble based
5 Reservoir Tool.
6
7 ERT 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 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.
15
16 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
17 for more details.
18*/
19
20#ifndef ERT_ECL_GRID_CACHE_H
21#define ERT_ECL_GRID_CACHE_H
22
23#include <vector>
24
25#include <ert/ecl/ecl_grid.hpp>
26
27namespace ecl {
29 public:
31
32 const std::vector<double>& volume() const;
33 const std::vector<double>& xpos() const { return this->xp; }
34 const std::vector<double>& ypos() const { return this->yp; }
35 const std::vector<double>& zpos() const { return this->zp; }
36 const std::vector<int>& global_index( ) const { return this->gi; }
37 int size() const { return this->xp.size(); }
38
39 private:
40 const ecl_grid_type * grid;
41 std::vector<int> gi;
42 std::vector<double> xp;
43 std::vector<double> yp;
44 std::vector<double> zp;
45 mutable std::vector<double> v;
46 };
47}
48
49#endif
ecl_grid_struct ecl_grid_type
Definition: ECLGraph.hpp:43
Definition: ecl_grid_cache.hpp:28
const std::vector< double > & ypos() const
Definition: ecl_grid_cache.hpp:34
const std::vector< int > & global_index() const
Definition: ecl_grid_cache.hpp:36
int size() const
Definition: ecl_grid_cache.hpp:37
const std::vector< double > & zpos() const
Definition: ecl_grid_cache.hpp:35
const std::vector< double > & volume() const
const std::vector< double > & xpos() const
Definition: ecl_grid_cache.hpp:33
ecl_grid_cache(const ecl_grid_type *grid)
Definition: ecl_box.hpp:26