~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to skit/plib2/solver.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///
 
2
/// This file is part of Rheolef.
 
3
///
 
4
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
 
5
///
 
6
/// Rheolef is free software; you can redistribute it and/or modify
 
7
/// it under the terms of the GNU General Public License as published by
 
8
/// the Free Software Foundation; either version 2 of the License, or
 
9
/// (at your option) any later version.
 
10
///
 
11
/// Rheolef is distributed in the hope that it will be useful,
 
12
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
/// GNU General Public License for more details.
 
15
///
 
16
/// You should have received a copy of the GNU General Public License
 
17
/// along with Rheolef; if not, write to the Free Software
 
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
///
 
20
/// =========================================================================
 
21
// direct solver interface
 
22
//
 
23
#include "rheolef/solver.h"
 
24
#include "solver_pastix.h"
 
25
 
 
26
namespace rheolef {
 
27
 
 
28
template<class T, class M>
 
29
solver_rep<T,M>::solver_rep (const csr<T,M>& a, const solver_option_type& opt)
 
30
 : _ptr(new_macro(rep(a,opt)))
 
31
{
 
32
}
 
33
template<class T, class M>
 
34
solver_rep<T,M>::~solver_rep ()
 
35
{
 
36
  delete_macro (_ptr);
 
37
}
 
38
template<class T, class M>
 
39
void 
 
40
solver_rep<T,M>::update_values (const csr<T,M>& a)
 
41
{
 
42
  _ptr->update_values (a);
 
43
}
 
44
template<class T, class M>
 
45
vec<T,M>
 
46
solver_rep<T,M>::solve (const vec<T,M>& b)
 
47
{
 
48
  return _ptr->solve (b);
 
49
}
 
50
template<class T, class M>
 
51
vec<T,M>
 
52
solver_rep<T,M>::trans_solve (const vec<T,M>& b)
 
53
{
 
54
  return _ptr->trans_solve (b);
 
55
}
 
56
// ----------------------------------------------------------------------------
 
57
// instanciation in library
 
58
// ----------------------------------------------------------------------------
 
59
template class solver_rep<Float,sequential>;
 
60
 
 
61
#ifdef _RHEOLEF_HAVE_MPI
 
62
template class solver_rep<Float,distributed>;
 
63
#endif // _RHEOLEF_HAVE_MPI
 
64
 
 
65
} // namespace rheolef