← Back to team overview

dolfin team mailing list archive

Fwd: Re: Identity matrix

 

I think so, but maybe the experts should answer. :P

Regards,
Mads Hoel

------- Forwarded message -------
From: jesperc <jesperc@xxxxxx>
To: "Mads Hoel" <mfhoel@xxxxxxxxxx>
Cc:
Subject: Re: [DOLFIN-dev] Identity matrix
Date: Wed, 18 Jul 2007 16:29:43 +0200

Hi,

Yes, I see that this has changed in the new version but I still use the
old one.
However, I see now that the number of columns and rows can be different
which indicates that set() may work in another way than I thought.
Doesn't val={1,2}, col={3,4}, row={5,6} mean that element (5,3) is 1 and
element (6,4) is 2?

Regards, Jesper

Mads Hoel skrev:
On Wed, 18 Jul 2007 15:56:48 +0200, jesperc <jesperc@xxxxxx> wrote:

A->set(vals, cols, n, rows, n);

void set (const real *block, uint m, const uint *rows, uint n, const uint *cols)
     Set block of values.

I think you need to rearrange the parameters

A->set(vals, cols, n, rows, n); to A->set(vals, n, rows, n, cols);

Regards,
Mads Hoel


Follow ups

References