Loading...
Searching...
No Matches
GridManager.hpp
/*
Copyright 2012 SINTEF ICT, Applied Mathematics.
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 OPM_GRIDMANAGER_HEADER_INCLUDED
#define OPM_GRIDMANAGER_HEADER_INCLUDED
#include <string>
#include <vector>
struct UnstructuredGrid;
struct grdecl;
namespace Opm
{
#if HAVE_ECL_INPUT
class EclipseGrid;
#endif
class GridManager
{
public:
#if HAVE_ECL_INPUT
explicit GridManager(const EclipseGrid& inputGrid,
bool edge_conformal = false);
GridManager(const EclipseGrid& inputGrid,
const std::vector<double>& poreVolumes,
bool edge_conformal);
#endif
GridManager(int nx, int ny);
GridManager(int nx, int ny, double dx, double dy);
GridManager(int nx, int ny, int nz);
GridManager(int nx, int ny, int nz,
double dx, double dy, double dz);
explicit GridManager(const std::string& input_filename);
~GridManager();
const UnstructuredGrid* c_grid() const;
private:
// Disable copying and assignment.
GridManager(const GridManager& other) = delete;
GridManager& operator=(const GridManager& other) = delete;
#if HAVE_ECL_INPUT
// Construct corner-point grid from EclipseGrid.
void initFromEclipseGrid(const EclipseGrid& inputGrid,
const std::vector<double>& poreVolumes,
bool edge_conformal);
#endif
// The managed UnstructuredGrid.
UnstructuredGrid* ug_;
};
} // namespace Opm
#endif // OPM_GRIDMANAGER_HEADER_INCLUDED
Opm::GridManager::GridManager
GridManager(int nx, int ny)
Construct a 2d cartesian grid with cells of unit size.
Definition GridManager.cpp:62
Opm::GridManager::c_grid
const UnstructuredGrid * c_grid() const
Access the managed UnstructuredGrid.
Definition GridManager.cpp:128
Opm::GridManager::~GridManager
~GridManager()
Destructor.
Definition GridManager.cpp:117
Opm
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68
UnstructuredGrid
Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary num...
Definition UnstructuredGrid.h:101
grdecl
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56