From 432f7c08a3beccd82ab1f21adc3d1ded09c150b4 Mon Sep 17 00:00:00 2001 From: Kjetil Olsen Lye Date: Tue, 27 Mar 2012 10:56:32 +0200 Subject: [PATCH] Added exmaple file --- examples/wells_example.cpp | 27 +++++++++++++++++++++++++++ opm/core/WellsManager.hpp | 4 +++- opm/core/newwells.h | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 examples/wells_example.cpp diff --git a/examples/wells_example.cpp b/examples/wells_example.cpp new file mode 100644 index 00000000..68b54ce5 --- /dev/null +++ b/examples/wells_example.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#include + +#include "opm/core/newwells.h" + +int main(int argc, char** argv) { + + using namespace Opm::parameter; + using namespace Opm; + ParameterGroup parameters( argc, argv, false ); + std::string file_name = parameters.getDefault("inputdeck", "data.data"); + + // Read input file + EclipseGridParser parser(file_name); + std::cout << "Done!" << std::endl; + // Setup grid + GridManager grid(parser); + + // Finally handle the wells + WellsManager wells(parser, *grid.c_grid(), NULL); + + return 0; +} + diff --git a/opm/core/WellsManager.hpp b/opm/core/WellsManager.hpp index bda2a8ce..3513091c 100644 --- a/opm/core/WellsManager.hpp +++ b/opm/core/WellsManager.hpp @@ -20,7 +20,7 @@ #ifndef OPM_WELLSMANAGER_HEADER_INCLUDED #define OPM_WELLSMANAGER_HEADER_INCLUDED - +#include struct Wells; struct UnstructuredGrid; @@ -63,6 +63,8 @@ namespace Opm WellsManager& operator=(const WellsManager& other); // The managed Wells. Wells* w_; + + boost::property_tree groups_; }; } // namespace Opm diff --git a/opm/core/newwells.h b/opm/core/newwells.h index 6017729c..425eefd2 100644 --- a/opm/core/newwells.h +++ b/opm/core/newwells.h @@ -25,7 +25,7 @@ extern "C" { #endif enum well_type { INJECTOR, PRODUCER }; -enum control_type { BHP , RATE, GRUP }; +enum control_type { BHP , RATE }; enum surface_component { WATER = 0, OIL = 1, GAS = 2 };