~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/la/uBlasFactory.cpp

  • Committer: Garth N. Wells
  • Date: 2008-05-18 16:18:26 UTC
  • mfrom: (2668.2.1 trunk)
  • mto: (2668.7.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2670.
  • Revision ID: gnw20@cam.ac.uk-20080518161826-rb28aps5hkd304zh
merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright (C) 2007 Ola Skavhaug.
2
 
// Licensed under the GNU LGPL Version 2.1.
3
 
//
4
 
// First added:  2007-12-06
5
 
// Last changed: 2007-12-07
6
 
 
7
 
#include "uBlasFactory.h"
8
 
 
9
 
using namespace dolfin;
10
 
 
11
 
//-----------------------------------------------------------------------------
12
 
uBlasMatrix<ublas_sparse_matrix>* uBlasFactory::createMatrix() const 
13
 
{
14
 
  return new uBlasMatrix<ublas_sparse_matrix>(); 
15
 
}
16
 
//-----------------------------------------------------------------------------
17
 
SparsityPattern* uBlasFactory::createPattern() const 
18
 
{
19
 
  return new SparsityPattern(); 
20
 
}
21
 
//-----------------------------------------------------------------------------
22
 
uBlasVector* uBlasFactory::createVector() const 
23
 
{
24
 
  return new uBlasVector(); 
25
 
}
26
 
//-----------------------------------------------------------------------------
27
 
 
28
 
// Singleton instance
29
 
uBlasFactory uBlasFactory::factory;