~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/la/LinearSolver.h

  • Committer: Johannes Ring
  • Date: 2008-03-05 22:43:06 UTC
  • Revision ID: johannr@simula.no-20080305224306-2npsdyhfdpl2esji
The BIG commit!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2004-2007 Anders Logg and Garth N. Wells.
 
2
// Licensed under the GNU LGPL Version 2.1.
 
3
//
 
4
// Modified by Garth N. Wells, 2006.
 
5
//
 
6
// First added:  2004-06-19
 
7
// Last changed: 2006-08-07
 
8
 
 
9
#ifndef __LINEAR_SOLVER_H
 
10
#define __LINEAR_SOLVER_H
 
11
 
 
12
#include <dolfin/main/constants.h>
 
13
#include "Matrix.h"
 
14
#include "Vector.h"
 
15
 
 
16
namespace dolfin
 
17
{
 
18
 
 
19
  /// This class defines the interfaces for default linear solvers for
 
20
  /// systems of the form Ax = b.
 
21
 
 
22
  class LinearSolver
 
23
  {
 
24
  public:
 
25
 
 
26
    /// Constructor
 
27
    LinearSolver() {}
 
28
 
 
29
    /// Destructor
 
30
    virtual ~LinearSolver() {}
 
31
 
 
32
    /// Solve linear system Ax = b
 
33
    virtual uint solve(const Matrix& A, Vector& x, const Vector& b) = 0;
 
34
 
 
35
  };
 
36
 
 
37
}
 
38
 
 
39
#endif