eigen_preconditioner.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_EIGEN_PRECONDITIONER_H
21 #define LIBMESH_EIGEN_PRECONDITIONER_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_HAVE_EIGEN
26 
27 // Local includes
29 #include "libmesh/preconditioner.h"
30 #include "libmesh/libmesh_common.h"
34 #include "libmesh/libmesh.h"
35 
36 // Eigen includes
37 
38 // C++ includes
39 
40 namespace libMesh
41 {
42 
43 // forward declarations
44 template <typename T> class AutoPtr;
45 template <typename T> class SparseMatrix;
46 template <typename T> class NumericVector;
47 template <typename T> class ShellMatrix;
48 
56 template <typename T>
58 {
59 public:
60 
65  LIBMESH_CAN_DEFAULT_TO_COMMWORLD);
66 
70  virtual ~EigenPreconditioner ();
71 
76  virtual void apply(const NumericVector<T> & x, NumericVector<T> & y);
77 
81  virtual void clear () {}
82 
86  virtual void init ();
87 
88 protected:
89 };
90 
91 
92 
93 
94 /*----------------------- inline functions ----------------------------------*/
95 template <typename T>
96 inline
98  Preconditioner<T>(comm)
99 {
100 }
101 
102 
103 
104 template <typename T>
105 inline
107 {
108  this->clear ();
109 }
110 
111 } // namespace libMesh
112 
113 #endif // #ifdef LIBMESH_HAVE_EIGEN
114 #endif // LIBMESH_EIGEN_PRECONDITIONER_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo