10 #ifndef __Teko_InverseLibrary_hpp__
11 #define __Teko_InverseLibrary_hpp__
13 #include "Teko_InverseFactory.hpp"
16 #include "Teuchos_ParameterList.hpp"
19 #include "Stratimikos_DefaultLinearSolverBuilder.hpp"
22 #include "Teko_RequestHandler.hpp"
23 #include "Teko_RequestHandlerContainer.hpp"
27 void addToStratimikosBuilder(
const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder>& builder);
29 class InverseLibrary :
public RequestHandlerContainer {
33 InverseLibrary(
const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder>& strat);
36 void addInverse(
const std::string& label,
const Teuchos::ParameterList& pl);
39 void addStratSolver(
const std::string& label,
const std::string& type,
40 const Teuchos::ParameterList& pl);
43 void addStratPrecond(
const std::string& label,
const std::string& type,
44 const Teuchos::ParameterList& pl);
47 void addBlockPrecond(
const std::string& label,
const std::string& type,
48 const Teuchos::ParameterList& pl);
57 Teuchos::RCP<const Teuchos::ParameterList> getParameterList(
const std::string& label)
const;
60 Teuchos::RCP<InverseFactory> getInverseFactory(
const std::string& label)
const;
63 void PrintAvailableInverses(std::ostream& os)
const;
66 void setRequestHandler(
const Teuchos::RCP<RequestHandler>& rh) { callbackHandler_ = rh; }
69 Teuchos::RCP<RequestHandler> getRequestHandler()
const {
return callbackHandler_; }
73 std::map<std::string, Teuchos::RCP<const Teuchos::ParameterList> > stratSolver_;
74 std::map<std::string, Teuchos::RCP<const Teuchos::ParameterList> > stratPrecond_;
75 std::map<std::string, Teuchos::RCP<const Teuchos::ParameterList> > blockPrecond_;
78 std::vector<std::string> stratValidSolver_;
79 std::vector<std::string> stratValidPrecond_;
80 std::vector<std::string> blockValidPrecond_;
83 Teuchos::RCP<RequestHandler> callbackHandler_;
86 Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> defaultBuilder_;
99 static Teuchos::RCP<InverseLibrary> buildFromParameterList(
const Teuchos::ParameterList& pl,
100 bool useStratDefaults =
true);
112 static Teuchos::RCP<InverseLibrary> buildFromParameterList(
113 const Teuchos::ParameterList& pl,
114 const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder>& strat);
124 static Teuchos::RCP<InverseLibrary> buildFromStratimikos();
135 static Teuchos::RCP<InverseLibrary> buildFromStratimikos(
136 const Stratimikos::DefaultLinearSolverBuilder& strat);
147 static Teuchos::RCP<InverseLibrary> buildFromStratimikos(
148 const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder>& strat);