Debian Codegraph @

packages/muelu/test/unit_tests/Smoothers/AmesosSmoother.cpp

raw
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 #include <Teuchos_UnitTestHarness.hpp>
11 #include <Amesos_config.h>
12 #include "MueLu_TestHelpers.hpp"
13 #include "MueLu_TestHelpersSmoothers.hpp"
14
15 #include "MueLu_AmesosSmoother.hpp"
16
17 namespace MueLuTests {
18
19 typedef double Scalar;
20 typedef int LocalOrdinal;
21 typedef int GlobalOrdinal;
22 typedef Xpetra::EpetraNode Node;
23 #include "MueLu_UseShortNames.hpp"
24
25 using namespace TestHelpers::Smoothers;
26
27 TEUCHOS_UNIT_TEST(AmesosSmoother, NotSetup) {
28 MUELU_TEST_ONLY_FOR(Xpetra::UseEpetra) {
29 testApplyNoSetup(AmesosSmoother(), out, success);
30 }
31 }
32
33 TEUCHOS_UNIT_TEST(AmesosSmoother, Apply_Correctness) {
34 MUELU_TEST_ONLY_FOR(Xpetra::UseEpetra) {
35 Teuchos::RCP<AmesosSmoother> smoother;
36 #ifdef HAVE_AMESOS_KLU
37 smoother = rcp(new AmesosSmoother("Klu"));
38 testDirectSolver(*smoother, out, success);
39 #endif
40
41 #ifdef HAVE_AMESOS_SUPERLU
42 smoother = rcp(new AmesosSmoother("Superlu"));
43 testDirectSolver(*smoother, out, success);
44 #endif
45 }
46 }
47
48 } // namespace MueLuTests
49
50 // TODO
51 // Test with invalid std::string
52 // Test with invalid parameterList? (== a characterization test for Amesos)
53 // Test if paramList takes into account
54 // Check if all the defaults that are used by MueLu are tested