From 7fee08b8fe7a20882a65a9e2c846bd4413b11aed Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Thu, 1 Dec 2016 10:38:09 +0100 Subject: [PATCH] Merge branch 'feature/opm-2016.10' into 'master' [opm] Update to opm 2016.10 version See merge request !262 --- bin/installexternal.sh | 21 ++++++++++++------- dumux/io/cpgridcreator.hh | 19 ++++++----------- .../implicit/cc2pcornerpointspatialparams.hh | 12 +++++------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bin/installexternal.sh b/bin/installexternal.sh index 51e02936cb..1cee08f5ac 100755 --- a/bin/installexternal.sh +++ b/bin/installexternal.sh @@ -63,7 +63,7 @@ installErt() fi if [ ! -e ert ]; then - git clone -b release/2016.04 https://github.com/Ensembles/ert.git + git clone -b release/2016.10 https://github.com/Ensembles/ert.git fi if test "$DOWNLOAD_ONLY" == "y"; then @@ -80,7 +80,7 @@ installErt() cd $TOPDIR/ert mkdir build cd build - cmake ../devel + cmake .. make # show additional information @@ -294,25 +294,29 @@ installOPM() fi if [ ! -e opm-common ]; then - git clone -b release/2016.04 https://github.com/OPM/opm-common + git clone -b release/2016.10 https://github.com/OPM/opm-common fi if [ ! -e opm-core ]; then - git clone -b release/2016.04 https://github.com/OPM/opm-core + git clone -b release/2016.10 https://github.com/OPM/opm-core fi if [ ! -e opm-material ]; then - git clone -b release/2016.04 https://github.com/OPM/opm-material + git clone -b release/2016.10 https://github.com/OPM/opm-material fi if [ ! -e opm-parser ]; then - git clone -b release/2016.04 https://github.com/OPM/opm-parser + git clone -b release/2016.10 https://github.com/OPM/opm-parser fi if [ ! -e opm-grid ]; then - git clone -b release/2016.04 https://github.com/OPM/opm-grid + git clone -b release/2016.10 https://github.com/OPM/opm-grid fi + if [ ! -e opm-output ]; then + git clone -b release/2016.10 https://github.com/OPM/opm-output + fi + if test "$DOWNLOAD_ONLY" == "y"; then return fi @@ -323,6 +327,7 @@ installOPM() rm -rf opm-material rm -rf opm-parser rm -rf opm-grid + rm -rf opm-output return fi @@ -344,6 +349,8 @@ installOPM() echo " -Dopm-core_PREFIX=/path/to/opm-core \\" echo " -Dopm-material_PREFIX=/path/to/opm-material \\" echo " -Dopm-parser_PREFIX=/path/to/opm-parser \\" + echo " -Dopm-output_PREFIX=/path/to/opm-output \\" + echo " -DUSE_MPI=ON \\" echo " -DHAVE_OPM_GRID=1 \\" cd $TOPDIR diff --git a/dumux/io/cpgridcreator.hh b/dumux/io/cpgridcreator.hh index 741f920928..b14f47845b 100644 --- a/dumux/io/cpgridcreator.hh +++ b/dumux/io/cpgridcreator.hh @@ -50,6 +50,7 @@ class CpGridCreator typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; typedef std::shared_ptr<Grid> GridPointer; + typedef Opm::Deck Deck; public: /*! @@ -59,12 +60,11 @@ public: { std::string fileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File); - parser_() = *(new Opm::ParserPtr(new Opm::Parser())); - Opm::ParseContext parseContext; - deck() = *(new Opm::DeckConstPtr(parser_()->parseFile(fileName, parseContext))); + deck() = Opm::Parser().parseFile(fileName); + Opm::EclipseGrid ecl_grid(deck()); gridPtr() = std::make_shared<Grid>(*(new Grid())); - gridPtr()->processEclipseFormat(deck(), 0.0, false, false); + gridPtr()->processEclipseFormat(ecl_grid, false, false); } /*! @@ -89,9 +89,9 @@ public: * * The input deck can be used to read parameters like porosity/permeability. */ - static Opm::DeckConstPtr &deck() + static Deck &deck() { - static Opm::DeckConstPtr deck_; + static Deck deck_; return deck_; } @@ -102,13 +102,6 @@ public: { gridPtr()->loadBalance(); } - -private: - static Opm::ParserPtr &parser_() - { - static Opm::ParserPtr parser; - return parser; - } }; } #endif // HAVE_OPM_GRID diff --git a/test/porousmediumflow/2p/implicit/cc2pcornerpointspatialparams.hh b/test/porousmediumflow/2p/implicit/cc2pcornerpointspatialparams.hh index 1bf702348e..a3cbaf0940 100644 --- a/test/porousmediumflow/2p/implicit/cc2pcornerpointspatialparams.hh +++ b/test/porousmediumflow/2p/implicit/cc2pcornerpointspatialparams.hh @@ -92,9 +92,9 @@ public: const std::vector<int>& globalCell = GridCreator::grid().globalCell(); - if (GridCreator::deck()->hasKeyword("PORO")) { + 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) { @@ -105,9 +105,9 @@ public: } } - if (GridCreator::deck()->hasKeyword("PERMX")) { + 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) { @@ -119,9 +119,9 @@ public: } } - if (GridCreator::deck()->hasKeyword("PERMZ")) { + 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) { -- GitLab