Re: [petsc-users] Set matrix column to vector

2014-09-02 Thread Florian Lindner
Am 01.09.2014 16:11, schrieb Matthew Knepley: I recommend running using the debugger so you can get a stack trace, and perhaps see exactly what the problem is. You can also run under valgrind as the error says. This of course I tried, but had no real success. It crashes in

Re: [petsc-users] Set matrix column to vector

2014-09-02 Thread Lawrence Mitchell
On 02/09/14 09:41, Florian Lindner wrote: Am 01.09.2014 16:11, schrieb Matthew Knepley: I recommend running using the debugger so you can get a stack trace, and perhaps see exactly what the problem is. You can also run under valgrind as the error says. This of course I tried, but had no

[petsc-users] Set matrix column to vector

2014-09-01 Thread Florian Lindner
Hello, I want to set the entire column of a N x M matrix to a N vector. What is the best way to do that? My first guess would be to VecGetArray and use that array for MatSetValuesLocal with nrow = VecGetLocalSize. What is the best to say MatSetValuesLocal that I want to set all rows

Re: [petsc-users] Set matrix column to vector

2014-09-01 Thread Matthew Knepley
On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de wrote: Hello, I want to set the entire column of a N x M matrix to a N vector. What is the best way to do that? My first guess would be to VecGetArray and use that array for MatSetValuesLocal with nrow = VecGetLocalSize.

Re: [petsc-users] Set matrix column to vector

2014-09-01 Thread Florian Lindner
Am 01.09.2014 12:45, schrieb Matthew Knepley: On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de wrote: Hello, I want to set the entire column of a N x M matrix to a N vector. What is the best way to do that? My first guess would be to VecGetArray and use that array for

Re: [petsc-users] Set matrix column to vector

2014-09-01 Thread Florian Lindner
Am 01.09.2014 15:44, schrieb Florian Lindner: Am 01.09.2014 12:45, schrieb Matthew Knepley: On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de wrote: Hello, I want to set the entire column of a N x M matrix to a N vector. What is the best way to do that? My first guess

Re: [petsc-users] Set matrix column to vector

2014-09-01 Thread Matthew Knepley
On Mon, Sep 1, 2014 at 8:44 AM, Florian Lindner mailingli...@xgm.de wrote: Am 01.09.2014 12:45, schrieb Matthew Knepley: On Mon, Sep 1, 2014 at 4:10 AM, Florian Lindner mailingli...@xgm.de wrote: Hello, I want to set the entire column of a N x M matrix to a N vector. What is the best