Debian Codegraph @

packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_SolverFactory_decl.hpp

raw
1 // @HEADER
2 // *****************************************************************************
3 // ShyLU: Scalable Hybrid LU Preconditioner and Solver
4 //
5 // Copyright 2011 NTESS and the ShyLU contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 #ifndef _FROSCH_SOLVER_FACTORY_DECL_HPP
11 #define _FROSCH_SOLVER_FACTORY_DECL_HPP
12
13 #include <ShyLU_DDFROSch_config.h>
14
15 // FROSch
16 #include <FROSch_Solver_def.hpp>
17 #if defined(HAVE_SHYLU_DDFROSCH_AMESOS) && defined(HAVE_SHYLU_DDFROSCH_EPETRA)
18 #include <FROSch_AmesosSolverEpetra_def.hpp>
19 #endif
20 #ifdef HAVE_SHYLU_DDFROSCH_EPETRA
21 #include <FROSch_Amesos2SolverEpetra_def.hpp>
22 #endif
23 #include <FROSch_Amesos2SolverTpetra_def.hpp>
24 #ifdef HAVE_SHYLU_DDFROSCH_BELOS
25 #ifdef HAVE_SHYLU_DDFROSCH_EPETRA
26 #include <FROSch_BelosSolverEpetra_def.hpp>
27 #endif
28 #include <FROSch_BelosSolverTpetra_def.hpp>
29 #endif
30 #include <FROSch_FROSchPreconditioner_def.hpp>
31 #ifdef HAVE_SHYLU_DDFROSCH_IFPACK2
32 #include <FROSch_Ifpack2PreconditionerTpetra_def.hpp>
33 #endif
34 #ifdef HAVE_SHYLU_DDFROSCH_MUELU
35 #include <FROSch_MueLuPreconditioner_def.hpp>
36 #endif
37 #if defined(HAVE_SHYLU_DDFROSCH_THYRA) && defined(HAVE_SHYLU_DDFROSCH_STRATIMIKOS)
38 #include <FROSch_ThyraPreconditioner_def.hpp>
39 #include <FROSch_ThyraSolver_def.hpp>
40 #endif
41
42
43 namespace FROSch {
44
45 using namespace Teuchos;
46 using namespace Xpetra;
47
48 template <class SC,
49 class LO,
50 class GO,
51 class NO>
52 class SolverFactory {
53
54 protected:
55
56 using XMatrixPtr = typename Solver<SC,LO,GO,NO>::XMatrixPtr;
57 using ConstXMatrixPtr = typename Solver<SC,LO,GO,NO>::ConstXMatrixPtr;
58
59 using ParameterListPtr = typename Solver<SC,LO,GO,NO>::ParameterListPtr;
60
61 using SolverPtr = RCP<Solver<SC,LO,GO,NO> >;
62 #if defined(HAVE_SHYLU_DDFROSCH_AMESOS) && defined(HAVE_SHYLU_DDFROSCH_EPETRA)
63 using AmesosSolverEpetraPtr = RCP<AmesosSolverEpetra<SC,LO,GO,NO> >;
64 #endif
65 #ifdef HAVE_SHYLU_DDFROSCH_EPETRA
66 using Amesos2SolverEpetraPtr = RCP<Amesos2SolverEpetra<SC,LO,GO,NO> >;
67 #endif
68 using Amesos2SolverTpetraPtr = RCP<Amesos2SolverTpetra<SC,LO,GO,NO> >;
69 #ifdef HAVE_SHYLU_DDFROSCH_BELOS
70 #ifdef HAVE_SHYLU_DDFROSCH_EPETRA
71 using BelosSolverEpetraPtr = RCP<BelosSolverEpetra<SC,LO,GO,NO> >;
72 #endif
73 using BelosSolverTpetraPtr = RCP<BelosSolverTpetra<SC,LO,GO,NO> >;
74 #endif
75 using FROSchPreconditionerPtr = RCP<FROSchPreconditioner<SC,LO,GO,NO> >;
76 #ifdef HAVE_SHYLU_DDFROSCH_IFPACK2
77 using Ifpack2PreconditionerTpetraPtr = RCP<Ifpack2PreconditionerTpetra<SC,LO,GO,NO> >;
78 #endif
79 #ifdef HAVE_SHYLU_DDFROSCH_MUELU
80 using MueLuPreconditionerPtr = RCP<MueLuPreconditioner<SC,LO,GO,NO> >;
81 #endif
82 #if defined(HAVE_SHYLU_DDFROSCH_THYRA) && defined(HAVE_SHYLU_DDFROSCH_STRATIMIKOS)
83 using ThyraPreconditionerPtr = RCP<ThyraPreconditioner<SC,LO,GO,NO> >;
84 using ThyraSolverPtr = RCP<ThyraSolver<SC,LO,GO,NO> >;
85 #endif
86
87 public:
88
89 static SolverPtr Build(ConstXMatrixPtr k,
90 ParameterListPtr parameterList,
91 string description);
92 };
93
94 }
95
96 #endif