diff --git a/.hgignore b/.hgignore index b0d92c60..53e2d2a8 100644 --- a/.hgignore +++ b/.hgignore @@ -32,5 +32,8 @@ missing # Ignoring executables *_test examples/scaneclipsedeck +examples/spu_2p +tests/test_cfs_tpfa +tests/test_jacsys tests/test_readvector tests/test_sf2p diff --git a/configure.ac b/configure.ac index 4d0b2126..b67a70b4 100644 --- a/configure.ac +++ b/configure.ac @@ -33,10 +33,6 @@ AX_LAPACK # Checks for header files. AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h]) -AC_CHECK_HEADERS([suitesparse/umfpack.h], - [umfpack_header=yes], - [umfpack_header=no]) - # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T @@ -45,8 +41,17 @@ AC_CHECK_TYPES([ptrdiff_t]) # Checks for library functions. AC_CHECK_FUNCS([floor memmove pow sqrt strchr strtol]) + +# To use UMFPACK, we need the header, and both the AMD and UMFPACK libs. +AC_CHECK_HEADERS([suitesparse/umfpack.h], + [umfpack_header=yes], + [umfpack_header=no]) + +AC_SEARCH_LIBS([amd_free], [amd], + [amd_lib=yes], [amd_lib=no], [-lm]) + AC_SEARCH_LIBS([umfpack_dl_solve], [umfpack], - [umfpack_lib=yes], [umfpack_lib=no]) + [umfpack_lib=yes], [umfpack_lib=no], [-lamd -lm]) AM_CONDITIONAL([UMFPACK], [test "x$umfpack_header" != "xno" -a "x$umfpack_lib" != "xno"]) diff --git a/opm/core/transport/CSRMatrixBlockAssembler.hpp b/opm/core/transport/CSRMatrixBlockAssembler.hpp index b55236a3..342ce455 100644 --- a/opm/core/transport/CSRMatrixBlockAssembler.hpp +++ b/opm/core/transport/CSRMatrixBlockAssembler.hpp @@ -102,12 +102,12 @@ namespace Opm { sa_.insert(sa_.end(), nconn * ndof, double(0.0)); - construct(); - setCSRSize(); + finalizeStructure(); } void finalizeStructure() { + construct(); setCSRSize(); } @@ -121,8 +121,6 @@ namespace Opm { ia_.push_back(0); ndof_ = ndof; - - construct(); } struct CSRMatrix& matrix() { return mat_; } diff --git a/tests/test_readvector.cpp b/tests/test_readvector.cpp index 9fe07d8e..d82c898c 100644 --- a/tests/test_readvector.cpp +++ b/tests/test_readvector.cpp @@ -26,7 +26,7 @@ read_grid(const std::string& dir) read_vector_from_file(fn, actnum); fn = dir + '/' + "dimens.txt"; - ::std::vector dimens; + ::std::vector dimens; read_vector_from_file(fn, dimens); struct grdecl grdecl;