Added exmaple file

This commit is contained in:
Kjetil Olsen Lye 2012-03-27 10:56:32 +02:00
parent bbfad835c9
commit 432f7c08a3
3 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,27 @@
#include <iostream>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/WellsManager.hpp>
#include <opm/core/GridManager.hpp>
#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<std::string>("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;
}

View File

@ -20,7 +20,7 @@
#ifndef OPM_WELLSMANAGER_HEADER_INCLUDED #ifndef OPM_WELLSMANAGER_HEADER_INCLUDED
#define OPM_WELLSMANAGER_HEADER_INCLUDED #define OPM_WELLSMANAGER_HEADER_INCLUDED
#include <boost/property_tree/ptree.hpp>
struct Wells; struct Wells;
struct UnstructuredGrid; struct UnstructuredGrid;
@ -63,6 +63,8 @@ namespace Opm
WellsManager& operator=(const WellsManager& other); WellsManager& operator=(const WellsManager& other);
// The managed Wells. // The managed Wells.
Wells* w_; Wells* w_;
boost::property_tree groups_;
}; };
} // namespace Opm } // namespace Opm

View File

@ -25,7 +25,7 @@ extern "C" {
#endif #endif
enum well_type { INJECTOR, PRODUCER }; 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 }; enum surface_component { WATER = 0, OIL = 1, GAS = 2 };