47 #ifndef __Teko_InverseLibrary_hpp__
48 #define __Teko_InverseLibrary_hpp__
50 #include "Teko_InverseFactory.hpp"
53 #include "Teuchos_ParameterList.hpp"
56 #include "Stratimikos_DefaultLinearSolverBuilder.hpp"
59 #include "Teko_RequestHandler.hpp"
60 #include "Teko_RequestHandlerContainer.hpp"
64 void addToStratimikosBuilder(
const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> & builder);
66 class InverseLibrary :
public RequestHandlerContainer {
70 InverseLibrary(
const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> & strat);
73 void addInverse(
const std::string & label,
const Teuchos::ParameterList & pl);
76 void addStratSolver(
const std::string & label,
const std::string & type,
const Teuchos::ParameterList & pl);
79 void addStratPrecond(
const std::string & label,
const std::string & type,
const Teuchos::ParameterList & pl);
82 void addBlockPrecond(
const std::string & label,
const std::string & type,
const Teuchos::ParameterList & pl);
91 Teuchos::RCP<const Teuchos::ParameterList> getParameterList(
const std::string & label)
const;
94 Teuchos::RCP<InverseFactory> getInverseFactory(
const std::string & label)
const;
97 void PrintAvailableInverses(std::ostream & os)
const;
100 void setRequestHandler(
const Teuchos::RCP<RequestHandler> & rh)
101 { callbackHandler_ = rh; }
104 Teuchos::RCP<RequestHandler> getRequestHandler()
const
105 {
return callbackHandler_; }
110 std::map<std::string,Teuchos::RCP<const Teuchos::ParameterList> > stratSolver_;
111 std::map<std::string,Teuchos::RCP<const Teuchos::ParameterList> > stratPrecond_;
112 std::map<std::string,Teuchos::RCP<const Teuchos::ParameterList> > blockPrecond_;
115 std::vector<std::string> stratValidSolver_;
116 std::vector<std::string> stratValidPrecond_;
117 std::vector<std::string> blockValidPrecond_;
120 Teuchos::RCP<RequestHandler> callbackHandler_;
123 Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> defaultBuilder_;
137 static Teuchos::RCP<InverseLibrary> buildFromParameterList(
const Teuchos::ParameterList & pl,
bool useStratDefaults=
true);
149 static Teuchos::RCP<InverseLibrary> buildFromParameterList(
const Teuchos::ParameterList & pl,
150 const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> & strat);
160 static Teuchos::RCP<InverseLibrary> buildFromStratimikos();
171 static Teuchos::RCP<InverseLibrary> buildFromStratimikos(
172 const Stratimikos::DefaultLinearSolverBuilder & strat);
183 static Teuchos::RCP<InverseLibrary> buildFromStratimikos(
184 const Teuchos::RCP<Stratimikos::DefaultLinearSolverBuilder> & strat);