From edc8b603795f5f419abae82edda926df778ec533 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch Date: Mon, 3 Jan 2022 13:40:23 +0100 Subject: [PATCH 1/3] [opm] fix cpgridmanager for OPM >= 2021.10 --- bin/installexternal.py | 4 +++- dumux/io/grid/cpgridmanager.hh | 4 +++- dumux/porousmediumflow/velocity.hh | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/installexternal.py b/bin/installexternal.py index eb764491f4..0a328f5f8a 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 1fba301fbe..53c357e9fa 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 5b91e765de..1be6f8106e 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); -- GitLab From 0f4e9e94b3c2b1200e0449fdc1b930752bdf9ade Mon Sep 17 00:00:00 2001 From: Bernd Flemisch Date: Wed, 26 Jan 2022 12:20:49 +0100 Subject: [PATCH 2/3] [doc][opm] add documentation and a patch for using OPM 2021.10 --- CHANGELOG.md | 1 + patches/README.md | 9 ++++++ patches/opm_common_2021_10.patch | 49 ++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 patches/opm_common_2021_10.patch diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d762ab8d..535d88f335 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, 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/patches/README.md b/patches/README.md index b9d0dd56bf..c6487feb1d 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 0000000000..0f4511a77e --- /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 + -- GitLab From 4dd2cfa68c117370a67ab7f37f226346429905ab Mon Sep 17 00:00:00 2001 From: Bernd Flemisch Date: Wed, 23 Feb 2022 16:55:31 +0000 Subject: [PATCH 3/3] [opm] mention Dune version dependency for OPM --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 535d88f335..6ad8a47890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +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, see also [patches](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/patches). +- __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 -- GitLab