Merge from upstream.
This commit is contained in:
commit
3d8e2b529e
13
Makefile.am
13
Makefile.am
@ -87,6 +87,7 @@ opm/core/pressure/FlowBCManager.cpp \
|
|||||||
opm/core/pressure/well.c \
|
opm/core/pressure/well.c \
|
||||||
opm/core/pressure/fsh_common_impl.c \
|
opm/core/pressure/fsh_common_impl.c \
|
||||||
opm/core/pressure/fsh.c \
|
opm/core/pressure/fsh.c \
|
||||||
|
opm/core/pressure/IncompTpfa.cpp \
|
||||||
opm/core/pressure/tpfa/ifs_tpfa.c \
|
opm/core/pressure/tpfa/ifs_tpfa.c \
|
||||||
opm/core/pressure/tpfa/compr_source.c \
|
opm/core/pressure/tpfa/compr_source.c \
|
||||||
opm/core/pressure/tpfa/cfs_tpfa.c \
|
opm/core/pressure/tpfa/cfs_tpfa.c \
|
||||||
@ -245,10 +246,18 @@ opm/core/transport/reorder/tarjan.h
|
|||||||
if UMFPACK
|
if UMFPACK
|
||||||
libopmcore_la_SOURCES += \
|
libopmcore_la_SOURCES += \
|
||||||
opm/core/linalg/call_umfpack.c \
|
opm/core/linalg/call_umfpack.c \
|
||||||
opm/core/linalg/LinearSolverUmfpack.cpp \
|
opm/core/linalg/LinearSolverUmfpack.cpp
|
||||||
opm/core/pressure/IncompTpfa.cpp
|
|
||||||
|
|
||||||
nobase_include_HEADERS += \
|
nobase_include_HEADERS += \
|
||||||
opm/core/linalg/call_umfpack.h \
|
opm/core/linalg/call_umfpack.h \
|
||||||
opm/core/linalg/LinearSolverUmfpack.hpp
|
opm/core/linalg/LinearSolverUmfpack.hpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if DUNE_ISTL
|
||||||
|
libopmcore_la_SOURCES += \
|
||||||
|
opm/core/linalg/LinearSolverIstl.cpp
|
||||||
|
|
||||||
|
nobase_include_HEADERS += \
|
||||||
|
opm/core/linalg/LinearSolverIstl.hpp
|
||||||
|
endif
|
||||||
|
@ -40,6 +40,8 @@ AX_BOOST_DATE_TIME
|
|||||||
AX_BOOST_FILESYSTEM
|
AX_BOOST_FILESYSTEM
|
||||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||||
|
|
||||||
|
AX_DUNE_ISTL
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
|
AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
|
||||||
|
|
||||||
|
37
m4/ax_dune_common.m4
Normal file
37
m4/ax_dune_common.m4
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
AC_DEFUN([AX_DUNE_COMMON],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING(for installed dune-common headers)
|
||||||
|
|
||||||
|
AC_LANG_PUSH([C++])[]dnl
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(dnl
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <dune/common/fvector.hh>
|
||||||
|
#include <dune/common/fmatrix.hh>
|
||||||
|
]],dnl
|
||||||
|
[[Dune::FieldVector<double,1> v;
|
||||||
|
Dune::FieldMatrix<double,1,1> m;
|
||||||
|
m[0][0] = 1.0;
|
||||||
|
v[0] = 1.0;
|
||||||
|
Dune::FieldVector<double,1> w = m*v;
|
||||||
|
]])[]dnl
|
||||||
|
],dnl
|
||||||
|
[ax_cv_dune_common_available=yes],dnl
|
||||||
|
[ax_cv_dune_common_available=no]dnl
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_LANG_POP([C++])[]dnl
|
||||||
|
|
||||||
|
AS_IF([test "x$ax_cv_dune_common_available" = "xyes"],dnl
|
||||||
|
[AC_DEFINE([HAVE_DUNE_COMMON], [1],dnl
|
||||||
|
[Define to 1 if `dune-common' is available])[]dnl
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
LIBS="-ldunecommon $LIBS"
|
||||||
|
],dnl
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
])[]dnl
|
||||||
|
|
||||||
|
AM_CONDITIONAL([DUNE_COMMON],
|
||||||
|
[test "x$ax_cv_dune_common_available" = "xyes"])
|
||||||
|
|
||||||
|
])
|
38
m4/ax_dune_istl.m4
Normal file
38
m4/ax_dune_istl.m4
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
AC_DEFUN([AX_DUNE_ISTL],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AX_DUNE_COMMON])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for installed dune-istl headers)
|
||||||
|
|
||||||
|
AC_LANG_PUSH([C++])[]dnl
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(dnl
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[#include <dune/common/deprecated.hh>
|
||||||
|
#include <dune/istl/bcrsmatrix.hh>
|
||||||
|
#include <dune/common/fmatrix.hh>
|
||||||
|
]],dnl
|
||||||
|
[[typedef Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> > Matrix;
|
||||||
|
Matrix matrix( 3, 3, Matrix::random );
|
||||||
|
for (int i = 0; i < 3; ++i) matrix.setrowsize(i, 2);
|
||||||
|
matrix.endrowsizes();
|
||||||
|
]])[]dnl
|
||||||
|
],dnl
|
||||||
|
[ax_cv_dune_istl_available=yes],dnl
|
||||||
|
[ax_cv_dune_istl_available=no]dnl
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_LANG_POP([C++])[]dnl
|
||||||
|
|
||||||
|
AS_IF([test "x$ax_cv_dune_istl_available" = "xyes" -a "x$ax_cv_dune_common_available"],dnl
|
||||||
|
[AC_DEFINE([HAVE_DUNE_ISTL], [1],dnl
|
||||||
|
[Define to 1 if `dune-istl' is available])[]dnl
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],dnl
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
])[]dnl
|
||||||
|
|
||||||
|
AM_CONDITIONAL([DUNE_ISTL],
|
||||||
|
[test "x$ax_cv_dune_istl_available" = "xyes" -a "x$ax_cv_dune_common_available"])
|
||||||
|
|
||||||
|
])
|
@ -24,9 +24,13 @@
|
|||||||
|
|
||||||
#include <opm/core/linalg/LinearSolverIstl.hpp>
|
#include <opm/core/linalg/LinearSolverIstl.hpp>
|
||||||
|
|
||||||
|
// Work around the fact that istl headers expect
|
||||||
|
// HAVE_BOOST to be 1, and not just defined.
|
||||||
|
#undef HAVE_BOOST
|
||||||
|
#define HAVE_BOOST 1
|
||||||
|
|
||||||
// TODO: clean up includes.
|
// TODO: clean up includes.
|
||||||
#define DUNE_DEPRECATED
|
#include <dune/common/deprecated.hh>
|
||||||
#include <dune/istl/bvector.hh>
|
#include <dune/istl/bvector.hh>
|
||||||
#include <dune/istl/bcrsmatrix.hh>
|
#include <dune/istl/bcrsmatrix.hh>
|
||||||
#include <dune/istl/operators.hh>
|
#include <dune/istl/operators.hh>
|
||||||
|
Loading…
Reference in New Issue
Block a user