dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #03310
Re: bug in vector summation???
No wonder, the sum() function in uBlasVector has the following elegant
implementation:
real uBlasVector::sum() const
{
return sum();
}
:-)
Replace with the following (will commit this update shortly):
real uBlasVector::sum() const
{
// FIXME: Find suitable uBlas call to compute sum
real s = 0.0;
for (uint i = 0; i < size(); i++)
s += (this)[i];
return s;
}
/Anders
On Fri, Sep 15, 2006 at 01:59:42PM +0200, Dag Lindbo wrote:
> Hello all,
>
> I have a possible bug to report in the Vector class. The summation call,
> sum(), causes my program to freeze. To test I use this little code
>
> Vector vec;
> vec.init(100);
> vec = 1.0;
> vec.disp(); // All seems fine
> real s = vec.sum(); // Does not return. 100% CPU load
>
> Ideas??
>
> /Dag Lindbo
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References