diff --git a/bin/installexternal.sh b/bin/installexternal.sh index fce3c517564ec156f87b49329a81b11edf688c82..20cce997606cc11595a21deffe2bd54b2558a46f 100755 --- a/bin/installexternal.sh +++ b/bin/installexternal.sh @@ -63,7 +63,7 @@ installErt() fi if [ ! -e ert ]; then - git clone -b release/2016.10 https://github.com/Ensembles/ert.git + git clone -b release/2017.04 https://github.com/Ensembles/ert.git fi if test "$DOWNLOAD_ONLY" == "y"; then @@ -294,27 +294,27 @@ installOPM() fi if [ ! -e opm-common ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-common + git clone -b release/2017.04 https://github.com/OPM/opm-common fi if [ ! -e opm-core ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-core + git clone -b release/2017.04 https://github.com/OPM/opm-core fi if [ ! -e opm-material ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-material + git clone -b release/2017.04 https://github.com/OPM/opm-material fi if [ ! -e opm-parser ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-parser + git clone -b release/2017.04 https://github.com/OPM/opm-parser fi if [ ! -e opm-grid ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-grid + git clone -b release/2017.04 https://github.com/OPM/opm-grid fi if [ ! -e opm-output ]; then - git clone -b release/2016.10 https://github.com/OPM/opm-output + git clone -b release/2017.04 https://github.com/OPM/opm-output fi if test "$DOWNLOAD_ONLY" == "y"; then @@ -332,13 +332,21 @@ installOPM() fi # apply patches + echo "Applying patch for opm-common" + cd $TOPDIR/opm-common + patch -p1 < $TOPDIR/dumux/patches/opm-common-2017.04.patch + + echo "Applying patch for opm-core" + cd $TOPDIR/opm-core + patch -p1 < $TOPDIR/dumux/patches/opm-core-2017.04.patch + echo "Applying patch for opm-parser" cd $TOPDIR/opm-parser - patch -p1 < $TOPDIR/dumux/patches/opm-parser-2016.04.patch + patch -p1 < $TOPDIR/dumux/patches/opm-parser-2017.04.patch - echo "Applying patch for opm-common" - cd $TOPDIR/opm-common - patch -p1 < $TOPDIR/dumux/patches/opm-common-2016.04.patch + echo "Applying patch for opm-grid" + cd $TOPDIR/opm-grid + patch -p1 < $TOPDIR/dumux/patches/opm-grid-2017.04.patch # show additional information echo "In addition, it might be necessary to set manually some" diff --git a/config.h.cmake b/config.h.cmake index 94357b721f123c2394c58e6a1bc9b0076d006f0e..db43693840288315db2358b94239846e1f42ee61 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -40,7 +40,6 @@ /* Define to the revision of dumux */ #define DUMUX_VERSION_REVISION ${DUMUX_VERSION_REVISION} - /* Define to 1 if Valgrind was found */ #cmakedefine HAVE_VALGRIND 1 diff --git a/patches/opm-common-2016.04.patch b/patches/opm-common-2017.04.patch similarity index 95% rename from patches/opm-common-2016.04.patch rename to patches/opm-common-2017.04.patch index 42cc8c3f7be5caea85cb92248ccd7542a05fce62..8d684466e11a802265ff56203165b46747afc9b3 100644 --- a/patches/opm-common-2016.04.patch +++ b/patches/opm-common-2017.04.patch @@ -1,5 +1,5 @@ diff --git a/cmake/Modules/Findopm-parser.cmake b/cmake/Modules/Findopm-parser.cmake -index cb08ade..612f669 100644 +index a0b0b08..eb142dd 100644 --- a/cmake/Modules/Findopm-parser.cmake +++ b/cmake/Modules/Findopm-parser.cmake @@ -38,8 +38,8 @@ string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PR diff --git a/patches/opm-core-2017.04.patch b/patches/opm-core-2017.04.patch new file mode 100644 index 0000000000000000000000000000000000000000..103d09da17880cf4ad873c41794d5f4112aa152d --- /dev/null +++ b/patches/opm-core-2017.04.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake +index fbbdaf05..34cdc425 100644 +--- a/CMakeLists_files.cmake ++++ b/CMakeLists_files.cmake +@@ -36,7 +36,7 @@ list (APPEND MAIN_SOURCE_FILES + opm/core/flowdiagnostics/TofReorder.cpp + opm/core/linalg/LinearSolverFactory.cpp + opm/core/linalg/LinearSolverInterface.cpp +- opm/core/linalg/LinearSolverIstl.cpp ++# opm/core/linalg/LinearSolverIstl.cpp + opm/core/linalg/LinearSolverPetsc.cpp + opm/core/linalg/LinearSolverUmfpack.cpp + opm/core/linalg/call_umfpack.c +@@ -133,12 +133,12 @@ list (APPEND TEST_SOURCE_FILES + tests/test_nonuniformtablelinear.cpp + tests/test_parallelistlinformation.cpp + tests/test_sparsevector.cpp +- tests/test_velocityinterpolation.cpp ++ tests/test_velocityinterpolation.cpp + tests/test_uniformtablelinear.cpp + tests/test_wells.cpp + tests/test_wachspresscoord.cpp +- tests/test_linearsolver.cpp +- tests/test_parallel_linearsolver.cpp ++# tests/test_linearsolver.cpp ++# tests/test_parallel_linearsolver.cpp + tests/test_param.cpp + tests/test_satfunc.cpp + tests/test_shadow.cpp +@@ -153,7 +153,7 @@ list (APPEND TEST_SOURCE_FILES + tests/test_anisotropiceikonal.cpp + tests/test_stoppedwells.cpp + tests/test_relpermdiagnostics.cpp +- tests/test_norne_pvt.cpp ++ tests/test_norne_pvt.cpp + ) + + # originally generated with the command: +@@ -194,8 +194,8 @@ list (APPEND TEST_DATA_FILES + list (APPEND EXAMPLE_SOURCE_FILES + examples/compute_eikonal_from_files.cpp + examples/compute_initial_state.cpp +- examples/compute_tof.cpp +- examples/compute_tof_from_files.cpp ++# examples/compute_tof.cpp ++# examples/compute_tof_from_files.cpp + examples/diagnose_relperm.cpp + tutorials/tutorial1.cpp + tutorials/tutorial2.cpp diff --git a/patches/opm-grid-2017.04.patch b/patches/opm-grid-2017.04.patch new file mode 100644 index 0000000000000000000000000000000000000000..f0a83a2bec834fe9c0f4278994dbb94bbd1ab54b --- /dev/null +++ b/patches/opm-grid-2017.04.patch @@ -0,0 +1,132 @@ +diff --git a/dune/grid/cpgrid/Entity.hpp b/dune/grid/cpgrid/Entity.hpp +index eadcb33..0efcedd 100644 +--- a/dune/grid/cpgrid/Entity.hpp ++++ b/dune/grid/cpgrid/Entity.hpp +@@ -148,7 +148,7 @@ namespace Dune + } + + /// Returns the geometry of the entity (does not depend on its orientation). +- const Geometry& geometry() const; ++ Geometry geometry() const; + + /// We do not support refinement, so level() is always 0. + int level() const +@@ -182,7 +182,7 @@ namespace Dune + /// The count of subentities of codimension cc + unsigned int subEntities ( const unsigned int cc ) const + { +- static_assert(codim == 0, ""); ++// static_assert(codim == 0, ""); + if (cc == 0) { + return 1; + } else if (cc == 3) { +@@ -412,7 +412,7 @@ namespace Dune { + namespace cpgrid { + + template <int codim> +-const typename Entity<codim>::Geometry& Entity<codim>::geometry() const ++typename Entity<codim>::Geometry Entity<codim>::geometry() const + { + return pgrid_->geomVector<codim>()[*this]; + } +diff --git a/dune/grid/cpgrid/Geometry.hpp b/dune/grid/cpgrid/Geometry.hpp +index 86d82a5..10c7e14 100644 +--- a/dune/grid/cpgrid/Geometry.hpp ++++ b/dune/grid/cpgrid/Geometry.hpp +@@ -41,8 +41,13 @@ + + #include <dune/common/version.hh> + #include <dune/geometry/referenceelements.hh> ++ ++#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 5 ) ++#include <dune/geometry/type.hh> ++#else + #include <dune/geometry/genericgeometry/geometrytraits.hh> + #include <dune/geometry/genericgeometry/matrixhelper.hh> ++#endif + + #include <opm/common/utility/platform_dependent/reenable_warnings.h> + +@@ -99,6 +104,12 @@ namespace Dune + /// Type of the inverse of the transposed Jacobian matrix + typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed; + ++#if DUNE_VERSION_NEWER(DUNE_GRID,2,5) ++ typedef Dune::Impl::FieldMatrixHelper< double > MatrixHelperType; ++#else ++ typedef Dune::GenericGeometry::MatrixHelper< Dune::GenericGeometry::DuneCoordTraits<double> > MatrixHelperType; ++#endif ++ + /// @brief Construct from centroid, volume (1- and 0-moments) and + /// corners. + /// @param pos the centroid of the entity +@@ -189,12 +200,11 @@ namespace Dune + LocalCoordinate x = refElement.position(0,0); + LocalCoordinate dx; + do { +- using namespace GenericGeometry; + // DF^n dx^n = F^n, x^{n+1} -= dx^n + JacobianTransposed JT = jacobianTransposed(x); + GlobalCoordinate z = global(x); + z -= y; +- MatrixHelper<DuneCoordTraits<double> >::template xTRightInvA<3, 3>(JT, z, dx ); ++ MatrixHelperType::template xTRightInvA<3, 3>(JT, z, dx ); + x -= dx; + } while (dx.two_norm2() > epsilon*epsilon); + return x; +@@ -206,9 +216,8 @@ namespace Dune + /// and {u_j} are the reference coordinates. + double integrationElement(const LocalCoordinate& local_coord) const + { +- FieldMatrix<ctype, coorddimension, mydimension> Jt = jacobianTransposed(local_coord); +- using namespace GenericGeometry; +- return MatrixHelper<DuneCoordTraits<double> >::template sqrtDetAAT<3, 3>(Jt); ++ JacobianTransposed Jt = jacobianTransposed(local_coord); ++ return MatrixHelperType::template sqrtDetAAT<3, 3>(Jt); + } + + /// Using the cube type for all entities now (cells and vertices), +diff --git a/dune/grid/cpgrid/Intersection.hpp b/dune/grid/cpgrid/Intersection.hpp +index f7152ef..cf01473 100644 +--- a/dune/grid/cpgrid/Intersection.hpp ++++ b/dune/grid/cpgrid/Intersection.hpp +@@ -188,7 +188,7 @@ namespace Dune + /// @brief + /// @todo Doc me! + /// @return +- const Geometry& geometry() const ++ Geometry geometry() const + { + return global_geom_; + } +diff --git a/dune/grid/polyhedralgrid/geometry.hh b/dune/grid/polyhedralgrid/geometry.hh +index 64a15fc..9c3c0b4 100644 +--- a/dune/grid/polyhedralgrid/geometry.hh ++++ b/dune/grid/polyhedralgrid/geometry.hh +@@ -42,6 +42,12 @@ namespace Dune + typedef typename Grid::Traits::ExtraData ExtraData; + typedef typename Grid::Traits::template Codim<codimension>::EntitySeed EntitySeed; + ++#if DUNE_VERSION_NEWER(DUNE_GRID,2,5) ++ typedef Dune::Impl::FieldMatrixHelper< double > MatrixHelperType; ++#else ++ typedef Dune::GenericGeometry::MatrixHelper< Dune::GenericGeometry::DuneCoordTraits<double> > MatrixHelperType; ++#endif ++ + explicit PolyhedralGridBasicGeometry ( ExtraData data ) + : data_( data ), + seed_( ) +@@ -136,12 +142,11 @@ namespace Dune + LocalCoordinate x = refElement.position(0,0); + LocalCoordinate dx; + do { +- using namespace GenericGeometry; + // DF^n dx^n = F^n, x^{n+1} -= dx^n + JacobianTransposed JT = jacobianTransposed(x); + GlobalCoordinate z = global(x); + z -= y; +- MatrixHelper<DuneCoordTraits<double> >::template xTRightInvA<mydimension,coorddimension>(JT, z, dx ); ++ MatrixHelperType::template xTRightInvA<mydimension,coorddimension>(JT, z, dx ); + x -= dx; + } while (dx.two_norm2() > epsilon*epsilon); + return x; diff --git a/patches/opm-parser-2016.04.patch b/patches/opm-parser-2016.04.patch deleted file mode 100644 index 303b71942a9ed65af9e6c835b8d31f959ca0ab27..0000000000000000000000000000000000000000 --- a/patches/opm-parser-2016.04.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6bdffb9..d1e68a3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -167,9 +167,9 @@ include(OpmProject) - include(ConfigVars) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) - set(opm-parser_NAME opm-parser) --set(opm-parser_LIBRARIES opmparser opmjson) --if(NOT BUILD_SHARED_LIBS) -- list(APPEND opm-parser_LIBRARIES cjson) --endif() -+#set(opm-parser_LIBRARIES opmparser opmjson) -+#if(NOT BUILD_SHARED_LIBS) -+# list(APPEND opm-parser_LIBRARIES cjson) -+#endif() - set(opm-parser_TARGET opmparser) - opm_cmake_config(opm-parser) diff --git a/patches/opm-parser-2017.04.patch b/patches/opm-parser-2017.04.patch new file mode 100644 index 0000000000000000000000000000000000000000..a9fbd643fe875e9c131348ed8cd926203b21ebbf --- /dev/null +++ b/patches/opm-parser-2017.04.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a53c6634..2a6b5147 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,24 +99,8 @@ SET( CMAKE_C_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 ${CMAKE_C_FLAGS} ${CMAKE_ + SET( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -mtune=native ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + + +-if (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) +- set (Boost_NO_SYSTEM_PATHS TRUE) +-endif (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) +- +-# if we are building shared libraries ourselves, then don't include Boost in them +-if (BUILD_SHARED_LIBS) +- set(Boost_USE_STATIC_LIBS OFF) +-elseif (DEFINED BUILD_SHARED_LIBS) +- set(Boost_USE_STATIC_LIBS ON) +-endif () +-set(Boost_USE_MULTITHREADED ON) +-set(Boost_USE_STATIC_RUNTIME OFF) +- +- +-add_definitions(-DOPM_PARSER_DECK_API=1) +-# Requires BOOST filesystem version 3, thus 1.44 is necessary. +-add_definitions(-DBOOST_FILESYSTEM_VERSION=3) +-find_package(Boost 1.44.0 COMPONENTS filesystem date_time system unit_test_framework regex REQUIRED) ++# get the prerequisite Boost libraries ++find_package(Boost 1.44.0 COMPONENTS filesystem date_time system unit_test_framework regex ${OPM_PARSER_QUIET}) + include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) + + include_directories(BEFORE ${PROJECT_SOURCE_DIR}) +@@ -177,9 +161,9 @@ include(OpmProject) + include(ConfigVars) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + set(opm-parser_NAME opm-parser) +-set(opm-parser_LIBRARIES opmparser opmjson) +-if(NOT BUILD_SHARED_LIBS) +- list(APPEND opm-parser_LIBRARIES cjson) +-endif() ++#set(opm-parser_LIBRARIES opmparser opmjson) ++#if(NOT BUILD_SHARED_LIBS) ++# list(APPEND opm-parser_LIBRARIES cjson) ++#endif() + set(opm-parser_TARGET opmparser) + opm_cmake_config(opm-parser)