Problem with rectangular matrices

2009-05-26 Thread Jed Brown
Matthew Knepley wrote: > I am fine with this too, which is option 1 in my original > mail. However, this means that when users preallocate, they must > understand the column layout. They are going to multiply with a vector, the layout of which must be compatible with the column layout of the matr

Problem with rectangular matrices

2009-05-26 Thread Jed Brown
Matthew Knepley wrote: > Yes, I want to go into the code and every place we query the diagonal > block, replace cMap by rMap. This is the only thing that makes sense > to me. By my definitions, diagonal blocks are disjoint, so they must > be square. Since we normally own rows, it makes sense to us

Problem with rectangular matrices

2009-05-26 Thread Jed Brown
Matthew Knepley wrote: > It not computing Ab. Its computing Ab, A^2b, A^3b, etc. Of course, but that's all possible if A*b is computable. Lisandro demonstrated that A*x was fine, which it better be because of how x was obtained. Had he tried A*b, which is the first thing the KSP needs, the prob

Problem with rectangular matrices

2009-05-26 Thread Jed Brown
Lisandro Dalcin wrote: > The only real issue I see here is that the term "diagonal block" could > lead to misinterpretation. But the behaviour you commented is the one > I would expect. > > The rest of this mail is perhaps off-topic, but it is somewhat related. > > The other issues is that some M

Problem with rectangular matrices

2009-05-26 Thread Lisandro Dalcin
On Tue, May 26, 2009 at 4:18 PM, Matthew Knepley wrote: > > I am fine with this too, which is option 1 in my original mail. However, > this means that > when users preallocate, they must understand the column layout. I guess this > is better > than changing the code unless I can think of a case wh

Problem with rectangular matrices

2009-05-26 Thread Lisandro Dalcin
On Tue, May 26, 2009 at 2:15 PM, Matthew Knepley wrote: > On Tue, May 26, 2009 at 12:07 PM, Lisandro Dalcin > wrote: >> >> The only real issue I see here is that the term "diagonal block" could >> lead to misinterpretation. But the behaviour you commented is the one >> I would expect. > > Okay,

Problem with rectangular matrices

2009-05-26 Thread Lisandro Dalcin
On Tue, May 26, 2009 at 2:31 PM, Matthew Knepley wrote: > On Tue, May 26, 2009 at 12:29 PM, Jed Brown wrote: >> >> Matthew Knepley wrote: >> >> > It not computing Ab. Its computing Ab, A^2b, A^3b, etc. >> >> Of course, but that's all possible if A*b is computable. ?Lisandro >> demonstrated that A

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 2:25 PM, Lisandro Dalcin wrote: > On Tue, May 26, 2009 at 4:18 PM, Matthew Knepley > wrote: > > > > I am fine with this too, which is option 1 in my original mail. However, > > this means that > > when users preallocate, they must understand the column layout. I guess > t

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 2:10 PM, Jed Brown wrote: > Matthew Knepley wrote: > > > Yes, I want to go into the code and every place we query the diagonal > > block, replace cMap by rMap. This is the only thing that makes sense > > to me. By my definitions, diagonal blocks are disjoint, so they must

Problem with rectangular matrices

2009-05-26 Thread Lisandro Dalcin
The only real issue I see here is that the term "diagonal block" could lead to misinterpretation. But the behaviour you commented is the one I would expect. The rest of this mail is perhaps off-topic, but it is somewhat related. The other issues is that some Mat preallocation routines are lazy ab

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 1:48 PM, Lisandro Dalcin wrote: > On Tue, May 26, 2009 at 2:15 PM, Matthew Knepley > wrote: > > On Tue, May 26, 2009 at 12:07 PM, Lisandro Dalcin > wrote: > >> > >> The only real issue I see here is that the term "diagonal block" could > >> lead to misinterpretation. But

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 12:29 PM, Jed Brown wrote: > Matthew Knepley wrote: > > > It not computing Ab. Its computing Ab, A^2b, A^3b, etc. > > Of course, but that's all possible if A*b is computable. Lisandro > demonstrated that A*x was fine, which it better be because of how x was > obtained. H

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 12:18 PM, Jed Brown wrote: > Lisandro Dalcin wrote: > > The only real issue I see here is that the term "diagonal block" could > > lead to misinterpretation. But the behaviour you commented is the one > > I would expect. > > > > The rest of this mail is perhaps off-topic,

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
On Tue, May 26, 2009 at 12:07 PM, Lisandro Dalcin wrote: > The only real issue I see here is that the term "diagonal block" could > lead to misinterpretation. But the behaviour you commented is the one > I would expect. Okay, anyone else not want me to try and do this? > > The rest of this ma

Problem with rectangular matrices

2009-05-26 Thread Matthew Knepley
I think there is an inconsistency in our definitions. If you create a matrix which is 4x8 on 2 procs, then you end up with a row and column map like this: rowMap colMap [0..2) [2..4) [0..4) [4..8) However, we use the column map for queries which then give nonsense. The most d