Commit bce052ba authored by Martin Schneider's avatar Martin Schneider
Browse files

[cornerpoint] Modification such that dumux works with opm-grid

parent 0ca59890
......@@ -29,7 +29,7 @@ find_path(GLPK_INCLUDE_DIR
# look for library, only at positions given by the user
find_library(GLPK_LIBRARY
NAMES "glpk" "libglpk"
PATHS ${GLPK_PREFIX} ${GLPK_ROOT}
PATHS ${GLPK_PREFIX} ${GLPK_ROOT} ${GLPK_ROOT}/src/.libs/
PATH_SUFFIXES "lib" "lib32" "lib64" "libglpk"
NO_DEFAULT_PATH
)
......
......@@ -16,7 +16,7 @@
find_path(NLOPT_INCLUDE_DIR
NAMES nlopt.h
PATHS ${NLOPT_PREFIX} ${NLOPT_ROOT}
PATH_SUFFIXES "nlopt" "include/nlopt" "include" "SRC" "src"
PATH_SUFFIXES "nlopt" "include/nlopt" "include" "SRC" "src" "api"
NO_DEFAULT_PATH
)
......@@ -30,7 +30,7 @@ find_path(NLOPT_INCLUDE_DIR
find_library(NLOPT_LIBRARY
NAMES "nlopt" "libnlopt"
PATHS ${NLOPT_PREFIX} ${NLOPT_ROOT}
PATH_SUFFIXES "lib" "lib32" "lib64" "libnlopt"
PATH_SUFFIXES "lib" "lib32" "lib64" "libnlopt" ".libs"
NO_DEFAULT_PATH
)
......
......@@ -24,9 +24,10 @@
#ifndef DUMUX_CPGRID_CREATOR_HH
#define DUMUX_CPGRID_CREATOR_HH
#if (HAVE_DUNE_CORNERPOINT && HAVE_OPM_PARSER)
#if (HAVE_OPM_GRID && HAVE_OPM_PARSER)
#include <dune/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
......@@ -59,10 +60,12 @@ public:
{
std::string fileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext;
parser() = *(new Opm::ParserPtr(new Opm::Parser()));
deck() = *(new Opm::DeckConstPtr(parser->parseFile(fileName)));
deck() = *(new Opm::DeckConstPtr(parser()->parseFile(fileName, parseContext)));
//gridPtr() = std::make_shared<Grid>(deck());
gridPtr() = std::make_shared<Grid>(*(new Grid()));
gridPtr()->processEclipseFormat(deck(), 0.0, false, false);
}
......@@ -84,6 +87,12 @@ public:
return cpGrid;
}
static Opm::ParserPtr &parser()
{
static Opm::ParserPtr parser_;
return parser_;
}
/*!
* \brief Returns a reference to the input deck.
*
......@@ -104,6 +113,6 @@ public:
}
};
}
#endif // (HAVE_DUNE_CORNERPOINT && HAVE_OPM_PARSER)
#endif // (HAVE_OPM_GRID && HAVE_OPM_PARSER)
#endif
Module: dumux
Version: 2.9-git
Maintainer: dumux@listserv.uni-stuttgart.de
Depends: dune-grid (>= 2.4) dune-localfunctions (>= 2.4) dune-istl (>= 2.4)
Suggests: dune-alugrid (>=2.4) dune-pdelab (>=2.0) dune-multidomain dune-cornerpoint dune-foamgrid (>=2.4)
Depends: dune-common (>= 2.4.1) dune-grid (>= 2.4) dune-localfunctions (>= 2.4) dune-istl (>= 2.4)
Suggests: dune-alugrid (>=2.4) dune-pdelab (>=2.0) dune-multidomain opm-grid dune-foamgrid (>=2.4)
Whitespace-Hook: Yes
......@@ -19,7 +19,7 @@
#ifndef DUMUX_CC2P_CORNERPOINT_PROBLEM_HH
#define DUMUX_CC2P_CORNERPOINT_PROBLEM_HH
#if HAVE_DUNE_CORNERPOINT
#if HAVE_OPM_GRID
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/components/dnapl.hh>
#include <dumux/porousmediumflow/2p/implicit/model.hh>
......@@ -338,6 +338,6 @@ private:
};
} //end namespace
#endif // HAVE_DUNE_CORNERPOINT
#endif // HAVE_OPM_GRID
#endif
......@@ -94,7 +94,7 @@ public:
if (GridCreator::deck()->hasKeyword("PORO")) {
std::cout << "Found PORO..." << std::endl;
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PORO")->getRawDoubleData();
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PORO").getRawDoubleData();
porosity_.resize(globalCell.size());
for (size_t i = 0; i < globalCell.size(); ++i) {
......@@ -107,7 +107,7 @@ public:
if (GridCreator::deck()->hasKeyword("PERMX")) {
std::cout << "Found PERMX..." << std::endl;
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PERMX")->getRawDoubleData();
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PERMX").getRawDoubleData();
permX_.resize(globalCell.size());
for (size_t i = 0; i < globalCell.size(); ++i) {
......@@ -121,7 +121,7 @@ public:
if (GridCreator::deck()->hasKeyword("PERMZ")) {
std::cout << "Found PERMZ..." << std::endl;
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PERMZ")->getRawDoubleData();
std::vector<double> eclVector = GridCreator::deck()->getKeyword("PERMZ").getRawDoubleData();
permZ_.resize(globalCell.size());
for (size_t i = 0; i < globalCell.size(); ++i) {
......
......@@ -24,11 +24,10 @@
*/
#include <config.h>
#if (HAVE_DUNE_CORNERPOINT && HAVE_OPM_CORE && HAVE_OPM_PARSER)
#if (HAVE_OPM_GRID && HAVE_OPM_CORE && HAVE_OPM_PARSER)
#include "cc2pcornerpointproblem.hh"
#include <dumux/common/start.hh>
#include <opm/core/io/eclipse/EclipseGridInspector.hpp>
/*!
* \brief Provides an interface for customizing error messages associated with
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment