Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
preconditionerifpack.hpp
1 /* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2 
3 This file is part of the Feel library
4 
5 Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
6 Date: 2006-03-06
7 
8 Copyright (C) 2006 EPFL
9 
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 3.0 of the License, or (at your option) any later version.
14 
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
30 #ifndef __preconditionerIfpack_H
31 #define __preconditionerIfpack_H 1
32 
34 
35 #if defined( FEELPP_HAS_TRILINOS_IFPACK )
36 #undef PACKAGE_BUGREPORT
37 #undef PACKAGE_NAME
38 #undef PACKAGE_STRING
39 #undef PACKAGE_TARNAME
40 #undef PACKAGE_VERSION
41 #include <Teuchos_ParameterList.hpp>
42 #include <Ifpack_config.h>
43 #include <Ifpack.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
49 #undef PACKAGE_NAME
50 #undef PACKAGE_STRING
51 #undef PACKAGE_TARNAME
52 #undef PACKAGE_VERSION
53 
54 
55 namespace Feel
56 {
57 class PreconditionerIfpack
58 {
59 public:
60 
61  typedef Ifpack_Preconditioner prec_type;
62  typedef boost::shared_ptr<prec_type> prec_ptrtype;
63 
64 
65  typedef MatrixSparse<double> sparse_matrix_type;
66  typedef boost::shared_ptr<sparse_matrix_type> sparse_matrix_ptrtype;
67 
68  typedef MatrixEpetra epetra_sparse_matrix_type;
69  typedef boost::shared_ptr<epetra_sparse_matrix_type> epetra_sparse_matrix_ptrtype;
70 
71  typedef Teuchos::ParameterList list_type;
72 
73  PreconditionerIfpack( std::string str = "Amesos" );
74 
75  PreconditionerIfpack( list_type options, std::string str = "Amesos" );
76 
77  PreconditionerIfpack( PreconditionerIfpack const& tc );
78 
79  void setAmesosSolver( std::string str="Amesos_Klu" );
80 
81  void setOptions( list_type options );
82 
83  int initializePreconditioner( sparse_matrix_ptrtype const& A );
84 
85  int computePreconditioner();
86 
87  int buildPreconditioner( sparse_matrix_ptrtype const& A );
88 
89  prec_ptrtype getPrec();
90 
91 private:
92 
93  prec_ptrtype M_Prec;
94 
95  Teuchos::ParameterList M_List;
96 
97  std::string M_precType;
98 
99  int M_overlap;
100 };
101 
102 } // Feel
103 #endif /* FEELPP_HAS_TRILINOS_IFPACK */
104 #endif /* __preconditionerIfpack_H */

Generated on Sun Dec 22 2013 13:11:11 for Feel++ by doxygen 1.8.5