44 #ifndef _build_solver_hpp_ 45 #define _build_solver_hpp_ 47 #include "Teuchos_RefCountPtr.hpp" 48 #include "Teuchos_ParameterList.hpp" 49 #include "Teuchos_Time.hpp" 50 #include "Epetra_LinearProblem.h" 51 #include "Epetra_Map.h" 52 #include "Epetra_Comm.h" 64 azparams = test_params.
sublist(
"AztecOO");
69 solver->SetProblem(*problem);
71 solver->SetParameters(azparams);
73 std::string ifpack_precond(
"not specified");
75 if (ifpack_precond !=
"not specified") {
90 std::cout <<
"Time to initialize/compute preconditioner: " << prec_time.
totalElapsedTime() <<
"s" << std::endl;
93 solver->SetPrecOperator(precond);
virtual const Epetra_Map & RowMatrixRowMap() const=0
bool isSublist(const std::string &name) const
RCP< ParameterList > sublist(const RCP< ParameterList > ¶mList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
virtual int Initialize()=0
Computes all it is necessary to initialize the preconditioner.
virtual int MyPID() const=0
virtual int SetParameters(Teuchos::ParameterList &List)=0
Sets all parameters for the preconditioner.
void start(bool reset=false)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
const Epetra_Comm & Comm() const
Teuchos::RCP< AztecOO > build_solver(Teuchos::ParameterList &test_params, Teuchos::RCP< Epetra_LinearProblem > problem)
double totalElapsedTime(bool readCurrentTime=false) const
void GetParameter(const Teuchos::ParameterList ¶ms, const std::string &name, T &value)
Set a value from a ParameterList if a parameter with the specified name exists.
static Ifpack_Preconditioner * Create(EPrecType PrecType, Epetra_RowMatrix *Matrix, const int overlap=0, bool overrideSerialDefault=false)
Creates an instance of Ifpack_Preconditioner given the enum value of the preconditioner type (can not...
virtual int Compute()=0
Computes all it is necessary to apply the preconditioner.
Epetra_RowMatrix * GetMatrix() const