~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/la/uBlasVector.cpp

  • Committer: Niclas Jansson
  • Date: 2010-10-17 10:21:52 UTC
  • Revision ID: njansson@csc.kth.se-20101017102152-e6u3c9uwxa4z19c8
Minor fixes in configure.ac

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
// First added:  2006-04-04
9
9
// Last changed: 2008-04-29
10
10
 
 
11
#include <dolfin/config/dolfin_config.h>
 
12
 
 
13
#ifndef NO_UBLAS
 
14
 
11
15
#include <iostream>
12
16
#include <sstream>
13
17
#include <iomanip>
19
23
#include "uBlasFactory.h"
20
24
#include "LinearAlgebraFactory.h"
21
25
 
22
 
#ifdef HAS_PETSC
 
26
#ifdef HAVE_PETSC
23
27
#include "PETScVector.h"
24
28
#endif
25
29
 
62
66
  x.clear();
63
67
}
64
68
//-----------------------------------------------------------------------------
 
69
dolfin::uint uBlasVector::size() const
 
70
{
 
71
  return x.size();
 
72
}
 
73
//-----------------------------------------------------------------------------
 
74
dolfin::uint uBlasVector::local_size() const
 
75
{
 
76
  return size();
 
77
}
 
78
//-----------------------------------------------------------------------------
65
79
uBlasVector* uBlasVector::copy() const
66
80
{
67
81
  return new uBlasVector(*this);
103
117
    x(rows[i]) += block[i];
104
118
}
105
119
//-----------------------------------------------------------------------------
106
 
void uBlasVector::apply()
 
120
void uBlasVector::apply(FinalizeType finaltype)
107
121
{
108
122
  // Do nothing
109
123
}
206
220
    entry << *it << " ";
207
221
    dolfin::cout << entry.str().c_str() << dolfin::endl;
208
222
  }
209
 
  dolfin::cout << " ]";
 
223
  dolfin::cout << " ]" << endl;
210
224
}
211
225
//-----------------------------------------------------------------------------
212
226
LogStream& dolfin::operator<< (LogStream& stream, const uBlasVector& x)
227
241
  return uBlasFactory<>::instance();
228
242
}
229
243
//-----------------------------------------------------------------------------
 
244
 
 
245
#endif