Commit 27979dd1 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[multidomain, cornerpoint] Update to Dune 2.4, Opm 2015.10, and GCC 6

The installexternal script is updated to fetch and build the correct Opm
modules.

No patch is required anymore for dune-multidomaingrid. In order to keep that
situation, add `#include <numeric>` to the problem files of the multidomain
tests. This is required if the tests are built with GCC 6.

Adapt README files.
parent ec8db175
......@@ -63,7 +63,7 @@ installCornerpoint()
fi
if [ ! -e dune-cornerpoint ]; then
git clone -b release/2015.04 https://github.com/OPM/dune-cornerpoint
git clone -b release/2015.10 https://github.com/OPM/dune-cornerpoint
fi
if test "$DOWNLOAD_ONLY" == "y"; then
......@@ -74,12 +74,6 @@ installCornerpoint()
rm -rf dune-cornerpoint
return
fi
# apply patch
echo "Applying patch for dune-cornerpoint"
cd $TOPDIR/dune-cornerpoint
patch -p1 < $TOPDIR/dumux/patches/dune-cornerpoint-2015.04.patch
cd $TOPDIR
}
installFoamGrid()
......@@ -180,16 +174,6 @@ installMultidomainGrid()
rm -rf dune-multidomaingrid
return
fi
# apply patch for dune versions newer than 2.3
cd $TOPDIR/dune-common
DUNE_COMMON_VERSION=`git status | head -n 1 | awk '{ print $3 }'`
if [ "$DUNE_COMMON_VERSION" == "releases/2.4" ] || [ "$DUNE_COMMON_VERSION" == "master" ]; then
echo "Applying patch for dune-multidomaingrid"
cd $TOPDIR/dune-multidomaingrid
patch -p1 < $TOPDIR/dumux/patches/multidomaingrid-2.3.patch
fi
cd $TOPDIR
}
......@@ -202,12 +186,20 @@ installOPM()
return
fi
if [ ! -e opm-common ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-common
fi
if [ ! -e opm-core ]; then
git clone -b release/2015.04 https://github.com/OPM/opm-core
git clone -b release/2015.10 https://github.com/OPM/opm-core
fi
if [ ! -e opm-material ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-material
fi
if [ ! -e opm-parser ]; then
git clone -b release/2015.04 https://github.com/OPM/opm-parser
git clone -b release/2015.10 https://github.com/OPM/opm-parser
fi
if test "$DOWNLOAD_ONLY" == "y"; then
......@@ -215,24 +207,25 @@ installOPM()
fi
if test "$CLEANUP" == "y"; then
rm -rf opm-common
rm -rf opm-core
rm -rf opm-material
rm -rf opm-parser
return
fi
# apply patches
echo "Applying patch for opm-core"
cd $TOPDIR/opm-core
patch -p1 < $TOPDIR/dumux/patches/opm-core-2015.04.patch
echo "Applying patch for opm-parser"
cd $TOPDIR/opm-parser
patch -p1 < $TOPDIR/dumux/patches/opm-parser-2015.04.patch
patch -p1 < $TOPDIR/dumux/patches/opm-parser-2015.10.patch
# show additional information
echo "In addition to applying the patches, it is necessary to set manually some"
echo "In addition, it might be necessary to set manually some"
echo "CMake variables in the CMAKE_FLAGS section of the .opts-file:"
echo " -Ddune-cornerpoint_PREFIX=/path/to/dune-cornerpoint \\"
echo " -Dopm-common_PREFIX=/path/to/opm-common \\"
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 " -DHAVE_DUNE_CORNERPOINT=1 \\"
......
- If you want to run a Dumux multidomain model with Dune 2.4, the module
dune-multidomaingrid has to be patched: apply multidomaingrid-2.3.patch in the
directory containing the releases/2.3-branch of dune-multidomaingrid, e.g.:
patch -p1 <../dumux/patches/multidomaingrid-2.3.patch
- 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 istl-2.4.1.patch in your directory containing
......
diff --git a/dune/grid/multidomaingrid/subdomaingrid/entity.hh b/dune/grid/multidomaingrid/subdomaingrid/entity.hh
index f65c6a8..e669710 100644
--- a/dune/grid/multidomaingrid/subdomaingrid/entity.hh
+++ b/dune/grid/multidomaingrid/subdomaingrid/entity.hh
@@ -413,17 +413,17 @@ public:
return false;
}
-private:
-
- const GridImp& _grid;
- MultiDomainEntityPointer _multiDomainEntityPointer;
-
const EntityWrapper& operator=(const EntityWrapper& rhs) {
assert(_grid == rhs._grid);
reset(rhs._multiDomainEntityPointer);
return *this;
}
+private:
+
+ const GridImp& _grid;
+ MultiDomainEntityPointer _multiDomainEntityPointer;
+
template<typename MultiDomainIteratorOrEntityPointer>
void reset(const MultiDomainIteratorOrEntityPointer& multiDomainEntityPointer) {
_multiDomainEntityPointer = multiDomainEntityPointer;
......@@ -32,6 +32,9 @@
#ifndef DUMUX_2CNISTOKES2P2CNIPROBLEM_HH
#define DUMUX_2CNISTOKES2P2CNIPROBLEM_HH
//! \todo required for multidomaingrid.hh and GCC 6, delete if fixed there
#include <numeric>
#include <dune/common/float_cmp.hh>
#include <dune/grid/common/gridinfo.hh>
#include <dune/grid/multidomaingrid.hh>
......
......@@ -24,6 +24,9 @@
#ifndef DUMUX_TWOCNIZEROEQTWOPTWOCNIPROBLEM_HH
#define DUMUX_TWOCNIZEROEQTWOPTWOCNIPROBLEM_HH
//! \todo required for multidomaingrid.hh and GCC 6, delete if fixed there
#include <numeric>
#include <dune/grid/multidomaingrid.hh>
#include <dune/grid/common/gridinfo.hh>
......
......@@ -32,6 +32,9 @@
#ifndef DUMUX_2CSTOKES2P2CPROBLEM_HH
#define DUMUX_2CSTOKES2P2CPROBLEM_HH
//! \todo required for multidomaingrid.hh and GCC 6, delete if fixed there
#include <numeric>
#include <dune/common/float_cmp.hh>
#include <dune/grid/common/gridinfo.hh>
#include <dune/grid/multidomaingrid.hh>
......
......@@ -24,6 +24,9 @@
#ifndef DUMUX_TWOCZEROEQTWOPTWOCPROBLEM_HH
#define DUMUX_TWOCZEROEQTWOPTWOCPROBLEM_HH
//! \todo required for multidomaingrid.hh and GCC 6, delete if fixed there
#include <numeric>
#include <dune/grid/multidomaingrid.hh>
#include <dune/grid/common/gridinfo.hh>
......
== Running the test cases in test/multidomain ==
-- Dune 2.3 --
You need the following versions of the required Dune modules:
Dune core modules, dune-typetree, dune-multidomaingrid: release (branch) 2.3
Dune core modules: 2.4
dune-typetree, dune-multidomaingrid: release (branch) 2.3
Dune-PDELab, dune-multidomain: release (branch) 2.0
The necessary modules and the correct versions can be obtained by using
the script located in:
bin/installexternal.sh
-- Dune 2.4 --
Alternatively, you can use version 2.4 of the Dune core modules
(_not_ dune-typetree which stays at 2.3).
-- Other external packages --
Install the external grid manager UG and a direct linear solver like SuperLU
or UMFPACK. You need Boost fusion for dune-multidomaingrid.
If UG has been built for parallel usage, dune-grid has to be patched. See the
patches directory for more information.
On some machines, some compilers with full optimization -O3 might produce
executables that yield segmentation faults (we encountered this behavior with
gcc-4.8). In this case, reduce the optimization level or try a different
......
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