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
solverumfpack.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: 2004-10-04
7 
8  Copyright (C) 2004 EPFL
9  Copyright (C) 2007 Universite Joseph Fourier (Grenoble I)
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 3.0 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 */
30 #ifndef __SolverUMFPACK_H
31 #define __SolverUMFPACK_H 1
32 
33 #include <boost/shared_array.hpp>
34 #include <boost/shared_ptr.hpp>
35 #include <boost/utility.hpp>
36 #include <boost/numeric/ublas/vector.hpp>
37 
38 #include <feel/feelcore/feel.hpp>
39 #include <feel/feelalg/glas.hpp>
41 
42 #if defined(FEELPP_HAS_UMFPACK)
43 
44 extern "C"
45 {
46 #if defined (FEELPP_HAS_SUITESPARSE_UMFPACK_H)
47 #include <suitesparse/umfpack.h>
48 #elif defined (FEELPP_HAS_UFSPARSE_UMFPACK_H)
49 #include <ufsparse/umfpack.h>
50 #elif defined (FEELPP_HAS_UMFPACK_UMFPACK_H)
51 #include <umfpack/umfpack.h>
52 #else
53 #include <umfpack.h>
54 #endif
55 };
56 #endif
57 
58 
59 namespace Feel
60 {
70 {
71 public:
72 
73 
77 
78  typedef double value_type;
79 
80  //typedef boost::numeric::ublas::compressed_matrix<value_type, boost::numeric::ublas::column_major> matrix_type;
82 
83  typedef ublas::vector<value_type> array_type;
84 
85 
86 
88 
92 
98  SolverUMFPACK();
99 
100  SolverUMFPACK( SolverUMFPACK const & umfpackSolver );
101 
102  ~SolverUMFPACK();
103 
105 
109 
110 
112 
116 
117 
119 
123 
124  void setMatrix( matrix_type const& m );
125 
136  void setStrategy( int strategy );
137 
139 
143 
144 
146 
152  void solve( array_type& __X, array_type const& __B );
153 
155  void reportInfo();
156 
157 
163  void reportStatus( int status );
164 
166 
167 private:
168 
169  void prepareSolve();
170 
171 
172 private:
173 
174  class Pimpl;
175  boost::shared_ptr<Pimpl> M_p;
176 
177  bool M_matrix_reset;
178  bool M_matrix_values_reset;
179 
180  void *M_symbolic;
181  void *M_numeric;
182 
183  double* M_Control;
184  double* M_Info;
185 
186 };
187 }
188 #endif /* __SolverUMFPACK_H */
189 
void reportStatus(int status)
brief description
Definition: matrixtriplet.hpp:43
void solve(array_type &__X, array_type const &__B)
solve A X = B
void reportInfo()
report some info about umfpack
Interface for the UMFPACK Solver.
Definition: solverumfpack.hpp:69
void setStrategy(int strategy)

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