Add constructor taking file name to GridManager.
Calls read_grid(). Grid fileformat not yet documented.
This commit is contained in:
parent
eec1552789
commit
72f8da074e
@ -97,6 +97,20 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
/// Construct a grid from an input file.
|
||||
/// The file format used is currently undocumented,
|
||||
/// and is therefore only suited for internal use.
|
||||
GridManager::GridManager(const std::string& input_filename)
|
||||
{
|
||||
ug_ = read_grid(input_filename.c_str());
|
||||
if (!ug_) {
|
||||
THROW("Failed to read grid from file " << input_filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// Destructor.
|
||||
GridManager::~GridManager()
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef OPM_GRIDMANAGER_HEADER_INCLUDED
|
||||
#define OPM_GRIDMANAGER_HEADER_INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
struct UnstructuredGrid;
|
||||
|
||||
@ -53,6 +54,11 @@ namespace Opm
|
||||
GridManager(int nx, int ny, int nz,
|
||||
double dx, double dy, double dz);
|
||||
|
||||
/// Construct a grid from an input file.
|
||||
/// The file format used is currently undocumented,
|
||||
/// and is therefore only suited for internal use.
|
||||
GridManager(const std::string& input_filename);
|
||||
|
||||
/// Destructor.
|
||||
~GridManager();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user