diff --git a/CHANGELOG.md b/CHANGELOG.md
index a2d762ab8d91d3c807c8f4f7964ec8c7fe12335d..6ad8a47890c4fb5c4524be744327cdb429a0b16f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
Differences Between DuMux 3.5 and DuMux 3.4
=============================================
+- __Requirements__: DuMux requires Dune >=2.8 and CMake >= 3.13. It was successfully tested with OPM 2021.10 (which in turn requires Dune <= 2.8), see also [patches](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/patches).
- __Sequential__: The old "sequential", "IMPES-style" models have not received updates in several years,
are separate from the rest of the code base and increasingly became a maintenance burden. Deprecation warnings
diff --git a/bin/installexternal.py b/bin/installexternal.py
index eb764491f4cf7cb76f76a8a050a7c2a23aa378fd..0a328f5f8a0c9922a24878896b9c0779a4e74cee 100755
--- a/bin/installexternal.py
+++ b/bin/installexternal.py
@@ -98,7 +98,7 @@ parser.add_argument("--dune-branch", default="releases/2.8", help="Dune branch t
parser.add_argument(
"--dumux-branch", default="releases/3.4", help="Dumux branch to be checked out."
)
-parser.add_argument("--opm-branch", default="release/2020.10", help="Opm branch to be checked out.")
+parser.add_argument("--opm-branch", default="release/2021.10", help="Opm branch to be checked out.")
parser.add_argument("--mmesh-branch", default="release/1.2", help="Mmesh branch to be checked out.")
args = vars(parser.parse_args())
@@ -366,6 +366,8 @@ MESSAGES = {
"In addition, it might be necessary to set manually some",
"CMake variables in the CMAKE_FLAGS section of the .opts-file:",
" -DUSE_MPI=ON",
+ "It might also be required to apply a patch,",
+ "have a look at patches/README.md in the dumux folder.",
"Currently, compiling opm with clang is not possible.",
"",
"Maybe you also have to install the following packages (see the",
diff --git a/dumux/io/grid/cpgridmanager.hh b/dumux/io/grid/cpgridmanager.hh
index 1fba301fbe5150be3689a9f93a1ab9e67cf20e17..53c357e9fa1ebf1c3a5e7d5f3e4051ecbcf15b97 100644
--- a/dumux/io/grid/cpgridmanager.hh
+++ b/dumux/io/grid/cpgridmanager.hh
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include
@@ -54,8 +55,9 @@ public:
const auto fileName = getParamFromGroup(paramGroup, "Grid.File");
deck_ = std::make_shared(Opm::Parser().parseFile(fileName));
Opm::EclipseGrid eclGrid(*deck_);
+ Opm::EclipseState eclState(*deck_);
grid_ = std::make_shared();
- grid_->processEclipseFormat(&eclGrid, false, false, false);
+ grid_->processEclipseFormat(&eclGrid, &eclState, false, false, false);
loadBalance();
}
diff --git a/dumux/porousmediumflow/velocity.hh b/dumux/porousmediumflow/velocity.hh
index 5b91e765de619f5aef60532a098b3404760cd235..1be6f8106e166dceb9fa9c1e5d7c2c21d5b84f15 100644
--- a/dumux/porousmediumflow/velocity.hh
+++ b/dumux/porousmediumflow/velocity.hh
@@ -171,6 +171,7 @@ public:
}
// get the transposed Jacobian of the element mapping
+ using Dune::referenceElement;
const auto refElement = referenceElement(geometry);
const auto& localPos = refElement.position(0, 0);
const auto jacobianT2 = geometry.jacobianTransposed(localPos);
diff --git a/patches/README.md b/patches/README.md
index b9d0dd56bf5ebc542e33449336ff81ecde969b34..c6487feb1dc5b30e7e71adaac17dfac0ab887bf6 100644
--- a/patches/README.md
+++ b/patches/README.md
@@ -1,3 +1,12 @@
+### OPM
+Within the OPM release 2021.10, some files in opm-common miss include statements. While on some systems such as Ubuntu 20.04, the corresponding headers are included implicitly, explicit includes are required on other systems such as Ubuntu 21.10. To add the includes, apply the patch
+
+ - `opm_common_2021_10.patch` in your directory containing opm-common
+ ```bash
+ patch -p1 <../dumux/patches/opm_common_2021_10.patch
+ ```
+
+### dune-istl
If the AMGBackend should be used without SuperLU as coarse grid solver, it can
be benefitial to decrease the corresponding tolerance. To do so, apply the patch
diff --git a/patches/opm_common_2021_10.patch b/patches/opm_common_2021_10.patch
new file mode 100644
index 0000000000000000000000000000000000000000..0f4511a77e9bba063c1c6faf5e9f2be42c2cfe90
--- /dev/null
+++ b/patches/opm_common_2021_10.patch
@@ -0,0 +1,49 @@
+diff --git a/opm/io/eclipse/SummaryNode.hpp b/opm/io/eclipse/SummaryNode.hpp
+index e1f659acb..05dce39f5 100644
+--- a/opm/io/eclipse/SummaryNode.hpp
++++ b/opm/io/eclipse/SummaryNode.hpp
+@@ -25,6 +25,7 @@
+ #include
+ #include
+ #include
++#include
+
+ namespace Opm { namespace EclIO {
+
+diff --git a/opm/parser/eclipse/Deck/DeckTree.hpp b/opm/parser/eclipse/Deck/DeckTree.hpp
+index 3fbaad819..a1a2de317 100644
+--- a/opm/parser/eclipse/Deck/DeckTree.hpp
++++ b/opm/parser/eclipse/Deck/DeckTree.hpp
+@@ -23,7 +23,7 @@
+ #include
+ #include
+ #include
+-
++#include
+
+ namespace Opm {
+
+diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well/NameOrder.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well/NameOrder.hpp
+index 4cd3e73ba..f84aef012 100644
+--- a/opm/parser/eclipse/EclipseState/Schedule/Well/NameOrder.hpp
++++ b/opm/parser/eclipse/EclipseState/Schedule/Well/NameOrder.hpp
+@@ -23,6 +23,7 @@
+ #include
+ #include
+ #include
++#include
+
+ namespace Opm {
+
+diff --git a/src/opm/output/eclipse/Inplace.cpp b/src/opm/output/eclipse/Inplace.cpp
+index 61bf4c5f8..cd62e12e5 100644
+--- a/src/opm/output/eclipse/Inplace.cpp
++++ b/src/opm/output/eclipse/Inplace.cpp
+@@ -19,6 +19,7 @@
+
+ #include
+ #include
++#include
+
+ #include
+