~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/la/PETScFactory.cpp

  • 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:
13
13
 
14
14
using namespace dolfin;
15
15
 
 
16
//-----------------------------------------------------------------------------
16
17
SparsityPattern* PETScFactory::createPattern() const 
17
18
{
18
19
  return new SparsityPattern(); 
19
20
}
20
 
 
 
21
//-----------------------------------------------------------------------------
21
22
PETScMatrix* PETScFactory::createMatrix() const 
22
23
23
24
  PETScMatrix* pm = new PETScMatrix();
24
25
  return pm;
25
26
}
26
 
 
 
27
//-----------------------------------------------------------------------------
27
28
PETScVector* PETScFactory:: createVector() const 
28
29
29
30
  return new PETScVector(); 
30
31
}
 
32
//-----------------------------------------------------------------------------
31
33
 
32
 
PETScFactory PETScFactory::petscfactory;
 
34
// Singleton instance
 
35
PETScFactory PETScFactory::factory;
33
36
 
34
37
#endif