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
preconditionerml.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 __preconditionerML_H
31 #define __preconditionerML_H 1
32 
33 #include <feel/feelconfig.h>
34 
36 
37 #if defined( FEELPP_HAS_TRILINOS_ML )
38 #undef PACKAGE_BUGREPORT
39 #undef PACKAGE_NAME
40 #undef PACKAGE_STRING
41 #undef PACKAGE_TARNAME
42 #undef PACKAGE_VERSION
44 #include <ml_config.h>
45 #include <ml_RowMatrix.h>
46 #include <ml_MultiLevelPreconditioner.h>
47 #undef PACKAGE_BUGREPORT
48 #undef PACKAGE_NAME
49 #undef PACKAGE_STRING
50 #undef PACKAGE_TARNAME
51 #undef PACKAGE_VERSION
52 namespace Feel
53 {
54 class PreconditionerML
55 {
56 public:
57 
58  typedef ML_Epetra::MultiLevelPreconditioner prec_type;
59  typedef boost::shared_ptr<prec_type> prec_ptrtype;
60 
61  typedef MatrixSparse<double> sparse_matrix_type;
62  typedef boost::shared_ptr<sparse_matrix_type> sparse_matrix_ptrtype;
63 
64  typedef MatrixEpetra epetra_sparse_matrix_type;
65  typedef boost::shared_ptr<epetra_sparse_matrix_type> epetra_sparse_matrix_ptrtype;
66 
67  typedef Teuchos::ParameterList list_type;
68 
69  PreconditionerML( list_type options );
70 
71  PreconditionerML( PreconditionerML const& tc );
72 
73  int buildPreconditioner( sparse_matrix_ptrtype& A );
74 
75  prec_ptrtype getPrec();
76 
77 private:
78 
79  prec_ptrtype M_Prec;
80 
81  Teuchos::ParameterList M_List;
82 
83  std::string M_precType;
84 
85 };
86 
87 } // Feel
88 #endif /* FEELPP_HAS_TRILINOS_ML */
89 #endif /* __preconditionerML_H */

Generated on Sun Oct 20 2013 08:25:04 for Feel++ by doxygen 1.8.4