30 #ifndef __preconditionerIfpack_H
31 #define __preconditionerIfpack_H 1
35 #if defined( FEELPP_HAS_TRILINOS_IFPACK )
36 #undef PACKAGE_BUGREPORT
39 #undef PACKAGE_TARNAME
40 #undef PACKAGE_VERSION
41 #include <Teuchos_ParameterList.hpp>
42 #include <Ifpack_config.h>
44 #include <Ifpack_Preconditioner.h>
45 #include <Ifpack_AdditiveSchwarz.h>
46 #include <Ifpack_Amesos.h>
47 #include <Ifpack_ILU.h>
48 #undef PACKAGE_BUGREPORT
51 #undef PACKAGE_TARNAME
52 #undef PACKAGE_VERSION
57 class PreconditionerIfpack
61 typedef Ifpack_Preconditioner prec_type;
62 typedef boost::shared_ptr<prec_type> prec_ptrtype;
65 typedef MatrixSparse<double> sparse_matrix_type;
66 typedef boost::shared_ptr<sparse_matrix_type> sparse_matrix_ptrtype;
68 typedef MatrixEpetra epetra_sparse_matrix_type;
69 typedef boost::shared_ptr<epetra_sparse_matrix_type> epetra_sparse_matrix_ptrtype;
71 typedef Teuchos::ParameterList list_type;
73 PreconditionerIfpack( std::string str =
"Amesos" );
75 PreconditionerIfpack( list_type options, std::string str =
"Amesos" );
77 PreconditionerIfpack( PreconditionerIfpack
const& tc );
79 void setAmesosSolver( std::string str=
"Amesos_Klu" );
81 void setOptions( list_type options );
83 int initializePreconditioner( sparse_matrix_ptrtype
const& A );
85 int computePreconditioner();
87 int buildPreconditioner( sparse_matrix_ptrtype
const& A );
89 prec_ptrtype getPrec();
95 Teuchos::ParameterList M_List;
97 std::string M_precType;