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
matrixshell.hpp
Go to the documentation of this file.
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@feelpp.org>
6  Date: 2008-12-28
7 
8  Copyright (C) 2008 Universite Joseph Fourier (Grenoble I)
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
29 #ifndef __MatrixShell_H
30 #define __MatrixShell_H 1
31 
32 #include <feel/feelcore/traits.hpp>
33 #include <feel/feelalg/vector.hpp>
34 
35 namespace Feel
36 {
48 template <typename T>
50 {
51 public:
52 
53 
57 
58  typedef T value_type;
59  typedef typename type_traits<T>::real_type real_type;
60  typedef Vector<T> vector_type;
61  typedef boost::shared_ptr<Vector<T> > vector_ptrtype;
62 
64 
68 
69  MatrixShell() {}
70  virtual ~MatrixShell() {}
71 
73 
77 
78 
80 
84 
89  virtual size_type size1 () const = 0;
90 
95  virtual size_type size2 () const = 0;
96 
97 
99 
103 
104 
106 
110 
112  virtual void diagonal( vector_type& v ) const = 0;
113 
114  void diagonal ( boost::shared_ptr<Vector<T> >& dest ) const
115  {
116  this->diagonal( *dest );
117  }
118 
120  virtual void multVector( vector_type const& in, vector_type& out ) const = 0;
121 
126  void multVector ( const boost::shared_ptr<Vector<T> >& arg,
127  boost::shared_ptr<Vector<T> >& dest ) const
128  {
129  this->multVector( *arg, *dest );
130  }
131 
133  virtual void multAddVector( vector_type const& in, vector_type& out ) const = 0;
134 
135  void multAddVector ( const boost::shared_ptr<Vector<T> >& arg,
136  boost::shared_ptr<Vector<T> >& dest ) const
137  {
138  this->multAddVector( *arg, *dest );
139  }
141 
142 
143 
144 protected:
145 
146 private:
147 
148 };
149 } // Feel
150 #endif /* __MatrixShell_H */

Generated on Fri Oct 25 2013 14:24:18 for Feel++ by doxygen 1.8.4