Loading...
Searching...
No Matches
ActiveGridCells.hpp
/*
Copyright 2019 Equinor ASA
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ACTIVEGRIDCELLS_HPP
#define ACTIVEGRIDCELLS_HPP
#include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
#include <array>
#include <vector>
namespace Opm
{
class ActiveGridCells
: public GridDims
{
public:
ActiveGridCells(std::array<int, 3> xyz,
const int* globalCell, std::size_t nc);
ActiveGridCells(std::size_t nx, std::size_t ny, std::size_t nz,
const int* globalCell, std::size_t nc);
bool cellActive(std::size_t i, std::size_t j, std::size_t k) const;
bool cellActive(std::size_t cartesianIndex) const;
std::vector<int> actNum() const;
int localCell(std::size_t cartesianIndex) const;
int localCell(std::size_t i, std::size_t j, std::size_t k) const;
protected:
std::vector<int> localCell_;
};
} // end namespace Opm
#endif // ACTIVEGRIDCELLS_HPP
Opm::ActiveGridCells
Simple class capturing active cells of a grid.
Definition ActiveGridCells.hpp:36
Opm::ActiveGridCells::localCell
int localCell(std::size_t cartesianIndex) const
Get the local index of a cell.
Definition ActiveGridCells.cpp:52
Opm::ActiveGridCells::localCell_
std::vector< int > localCell_
Maps the cartesian index to a compressed local index.
Definition ActiveGridCells.hpp:78
Opm::GridDims
Definition GridDims.hpp:31
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30