1
// Copyright (C) 2007 Ilmar Wilbers.
2
// Licensed under the GNU LGPL Version 2.1.
4
// Modified by Garth N. Wells, 2008.
6
// First added: 2008-05-21
7
// Last changed: 2008-05-21
9
#ifndef __ASSEMBLY_FACTORY_H
10
#define __ASSEMBLY_FACTORY_H
12
#include "AssemblyMatrix.h"
13
#include "uBlasVector.h"
14
#include "SparsityPattern.h"
15
#include "LinearAlgebraFactory.h"
21
class AssemblyFactory : public LinearAlgebraFactory
26
virtual ~AssemblyFactory() {}
28
/// Create empty matrix
29
AssemblyMatrix* createMatrix() const
30
{ return new AssemblyMatrix(); }
32
/// Create empty vector
33
uBlasVector* createVector() const
34
{ return new uBlasVector(); }
36
/// Create empty sparsity pattern
37
SparsityPattern* createPattern() const
38
{ return new SparsityPattern(); }
40
/// Return singleton instance
41
static AssemblyFactory& instance()
46
/// Private Constructor
50
static AssemblyFactory factory;
54
// Initialise static data
55
AssemblyFactory AssemblyFactory::factory;