...
 
Commits (3)
  • Felix Gruber's avatar
    overlappingschwarztest: remove broken runtime check · 2b7ceffa
    Felix Gruber authored
    This test should not be necessary anymore, since commit
    05f80ffa fixed the CMAKE_GUARD argument
    for this test, so that it is not compiled anymore if either UMFPACK or
    SuperLU are missing.
    
    That line had to be removed as it did not compile if either UMFPACK or
    SuperLU were missing. For example while I had UMFPACK installed but not
    SuperLU, gcc gave me the following error message for the removed line:
    
    …/dune/istl/test/overlappingschwarztest.cc:260:17: error: ‘HAVE_SUPERLU’ was not declared in this scope
    2b7ceffa
  • Carsten Gräser's avatar
    [bugfix] Fix macro guard in overlappingschwarztest · 11b4eeb2
    Carsten Gräser authored
    The loaction of the macro guard lead to the method `test`
    not returning a value if neiter SUperLU nore SuiteSparse
    are found. While the test is not executed in this case due
    to a CMake guard, these macro guards should be placed
    in the correct place anyways for reasons of code hygiene.
    11b4eeb2
  • Christoph Grüninger's avatar
    [!384] overlappingschwarztest: remove broken runtime check and fix missing return value · 399ed599
    Christoph Grüninger authored
    Merge branch 'backport/make-overlappingschwarztest-compile' into 'releases/2.7'
    
    ref:core/dune-istl\> This cherry picks e5ee5ead46fad46f from [!372] and
    62b6707e. The problem fixed by this are:
    
    -   The test does not compile if either SuperLU or SuiteSparse are not
        present. The reason is a check that assumes that the corresponding macros
        are defined to false while they are in fact undefined.
    -   The test function is missing a return statement if neither of the libs is
        found.
    
    However, the original commit message of e5ead46f does not fit exactly: In
    master the test is guarded in CMakeLists.txt which makes this check useless.
    But since guarding the test in CMake is more invasive, simply disabling the
    broken check in the test is IMO the preferred fix.
    
    See merge request [!384]
    
      [!372]: gitlab.dune-project.org/NoneNone/merge_requests/372
      [!384]: gitlab.dune-project.org/core/dune-istl/merge_requests/384
    399ed599
......@@ -21,8 +21,8 @@
template<class MatrixBlock, class VectorBlock>
Dune::TestSuite test(int argc, char** argv)
{
#if HAVE_SUPERLU || HAVE_SUITESPARSE_UMFPACK
Dune::TestSuite suite;
#if HAVE_SUPERLU || HAVE_SUITESPARSE_UMFPACK
const int BS=1;
int N=4;
......@@ -251,13 +251,12 @@ Dune::TestSuite test(int argc, char** argv)
solver4.apply(x,b, res);
suite.check(res.converged) << "solver4 did not converge";
return suite;
#endif // HAVE_SUPERLU || HAVE_SUITESPARSE_UMFPACK
return suite;
}
int main(int argc, char** argv){
Dune::TestSuite suite;
suite.require(HAVE_SUPERLU || HAVE_SUITESPARSE_UMFPACK) << "You need SuperLU or SuiteSparse's UMFPack to run this test.";
suite.subTest(test<Dune::FieldMatrix<double, 1, 1>, Dune::FieldVector<double, 1>>(argc, argv));
suite.subTest(test<double, double>(argc, argv));
return suite.exit();
......