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
solvernonlineartrilinos.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): Florent Vielfaure <florent.vielfaure@gmail.com>
6  Date: 2009-05-25
7 
8  Copyright (C) 2009-2012 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 */
30 #ifndef __SolverNonLinearTrilinos_H
31 #define __SolverNonLinearTrilinos_H 1
32 
33 #include <feel/feelcore/feel.hpp>
38 // #include <feel/feelalg/operatortrilinos.hpp>
39 
40 #if defined( FEELPP_HAS_TRILINOS )
41 #include "NOX.H"
42 #include "NOX_Epetra_Interface_Required.H"
43 #include "NOX_Epetra_Interface_Jacobian.H"
44 #include "NOX_Epetra_LinearSystem_AztecOO.H"
45 #include "NOX_Epetra_Group.H"
46 
47 namespace Feel
48 {
58 template<typename T>
59 class SolverNonLinearTrilinos
60  :
61 public SolverNonLinear<T>
62 {
63  typedef SolverNonLinear<T> super;
64 public:
65 
66 
70 
71  typedef SolverNonLinearTrilinos<T> self_type;
72 
73  typedef typename super::value_type value_type;
74  typedef typename super::real_type real_type;
75  typedef typename super::sparse_matrix_ptrtype sparse_matrix_ptrtype;
76  typedef typename super::vector_ptrtype vector_ptrtype;
77 
78  typedef typename super::dense_matrix_type dense_matrix_type;
79  typedef typename super::dense_vector_type dense_vector_type;
80 
82 
86 
90  SolverNonLinearTrilinos(WorldComm const& worldComm=Environment::worldComm());
91  SolverNonLinearTrilinos( SolverNonLinearTrilinos const & );
92 
96  ~SolverNonLinearTrilinos();
97 
101  virtual void init ();
102 
104 
108 
109 
111 
115 
117 
121 
123 
127 
131  virtual void clear ();
132 
137  virtual std::pair<int, real_type> solve ( sparse_matrix_ptrtype&, // System Jacobian Matrix
138  vector_ptrtype&, // Solution vector
139  vector_ptrtype&, // Residual vector
140  const double, // Stopping tolerance
141  const unsigned int ); // N. Iterations
142 
143  virtual std::pair<unsigned int, real_type> solve ( dense_matrix_type&, // System Jacobian Matrix
144  dense_vector_type&, // Solution vector
145  dense_vector_type&, // Residual vector
146  const double, // Stopping tolerance
147  const unsigned int ); // N. Iterations
148 
149 
150 
152 
156  //bool computeF( const Epetra_Vector & x, Epetra_Vector & f, NOX::Epetra::Interface::Required::FillType F );
157  //bool computeJacobian( const Epetra_Vector & x, Epetra_Operator & Jac );
158  //bool computePrecMatrix( const Epetra_Vector & x, Epetra_RowMatrix & M );
159  //bool computePreconditioner( const Epetra_Vector & x, Epetra_Operator & O );
160 
161 private:
162 
163 };
164 
165 template <typename T>
166 inline
167 SolverNonLinearTrilinos<T>::SolverNonLinearTrilinos (WorldComm const& worldComm)
168 {}
169 
170 
171 
172 template <typename T>
173 inline
174 SolverNonLinearTrilinos<T>::~SolverNonLinearTrilinos ()
175 {
176  this->clear ();
177 }
178 
179 } // Feel
180 #endif// FEELPP_HAS_TRILINOS_NOX
181 #endif /* __SolverNonLinearTrilinos_H */

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