~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/la/Vector.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:
7
7
// Modified by Martin Sandve Alnes, 2008.
8
8
//
9
9
// First added:  2007-07-03
10
 
// Last changed: 2008-04-29
 
10
// Last changed: 2008-05-17
11
11
 
12
12
#ifndef __VECTOR_H
13
13
#define __VECTOR_H
14
14
 
15
 
#include "default_la_types.h"
 
15
#include <dolfin/common/Variable.h>
 
16
#include "DefaultFactory.h"
16
17
#include "GenericVector.h"
17
18
 
18
19
namespace dolfin
26
27
  public:
27
28
 
28
29
    /// Create empty vector
29
 
    Vector() : Variable("x", "DOLFIN vector"),
30
 
               vector(new DefaultVector())
31
 
    {}
32
 
    
 
30
    Vector() : Variable("x", "DOLFIN vector"), vector(0)
 
31
    { DefaultFactory factory; vector = factory.createVector(); }
 
32
 
33
33
    /// Create vector of size N
34
 
    explicit Vector(uint N) : Variable("x", "DOLFIN vector"),
35
 
                              vector(new DefaultVector(N))
36
 
    {}
 
34
    explicit Vector(uint N) : Variable("x", "DOLFIN vector"), vector(0)
 
35
    { DefaultFactory factory; vector = factory.createVector(); vector->init(N); }
37
36
 
38
37
    /// Copy constructor
39
38
    explicit Vector(const Vector& x) : Variable("x", "DOLFIN vector"),