~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/la/DefaultFactory.h

  • Committer: Kent-Andre Mardal
  • Date: 2008-05-19 14:21:52 UTC
  • mfrom: (2668.5.1 trunk)
  • mto: (2668.1.16 trunk)
  • mto: This revision was merged to the branch mainline in revision 2670.
  • Revision ID: kent-and@simula.no-20080519142152-7zb7r4htl7111izh
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2008 Anders Logg.
 
2
// Licensed under the GNU LGPL Version 2.1.
 
3
//
 
4
// First added:  2008-05-17
 
5
// Last changed: 2007-05-17
 
6
 
 
7
#ifndef __DEFAULT_FACTORY_H
 
8
#define __DEFAULT_FACTORY_H
 
9
 
 
10
#include "LinearAlgebraFactory.h"
 
11
 
 
12
namespace dolfin
 
13
{
 
14
 
 
15
  class DefaultFactory : public LinearAlgebraFactory
 
16
  {
 
17
    public:
 
18
 
 
19
    /// Constructor
 
20
    DefaultFactory() {}
 
21
 
 
22
    /// Destructor
 
23
    virtual ~DefaultFactory() {}
 
24
 
 
25
    /// Create empty matrix
 
26
    virtual dolfin::GenericMatrix* createMatrix() const;
 
27
 
 
28
    /// Create empty vector
 
29
    virtual dolfin::GenericVector* createVector() const;
 
30
 
 
31
    /// Create empty sparsity pattern 
 
32
    virtual dolfin::GenericSparsityPattern * createPattern() const;
 
33
 
 
34
  private:
 
35
 
 
36
    // Return instance of default backend
 
37
    LinearAlgebraFactory& factory() const;
 
38
 
 
39
  };
 
40
 
 
41
}
 
42
 
 
43
#endif