1
// Copyright (C) 2007 Ola Skavhaug.
2
// Licensed under the GNU LGPL Version 2.1.
4
// First added: 2007-12-06
5
// Last changed: 2007-12-06
8
#ifndef __UBLAS_FACTORY_H
9
#define __UBLAS_FACTORY_H
11
#include <dolfin/uBlasMatrix.h>
12
#include <dolfin/uBlasVector.h>
13
#include <dolfin/SparsityPattern.h>
14
#include <dolfin/LinearAlgebraFactory.h>
19
class uBlasFactory: public LinearAlgebraFactory
24
virtual ~uBlasFactory() {}
26
/// Create empty matrix
27
uBlasMatrix<ublas_sparse_matrix>* createMatrix() const;
29
/// Create empty sparsity pattern
30
SparsityPattern* createPattern() const;
32
/// Create empty vector
33
uBlasVector* createVector() const;
35
/// Return sigleton instance
36
static uBlasFactory& instance() { return ublasfactory; }
39
/// Private Constructor
42
static uBlasFactory ublasfactory;