set a column of a matrix
Barry Smith
bsmith at mcs.anl.gov
Sun Nov 1 11:16:26 CST 2009
Is your matrix dense? If it is sparse then it doesn't make sense
to take values from a vector (which is always dense) to a sparse matrix.
Barry
On Nov 1, 2009, at 10:57 AM, Umut Tabak wrote:
> On Sun, Nov 01, 2009 at 07:44:58AM -0600, Barry Smith wrote:
>>
>> MatSetValues() so long as you have good matrix preallocation this
>> will work fine.
>>
>> Doing a transpose is very expensive.
>>
> Dear Barry and Matt,
>
> Thanks for the replies, I am not doing anything in parallel. I
> should use MatSetValues with appropriate column and row indices.
>
> Actually, what I would like to do, I would like to set up a
> vectorset(rectangular) and assign to a block in a matrix. Is
> there a vectorset that I could use directly to somehow put
> these vectors directly into this set. And use this vectorset to
> set some part of a matrix.
>
> Thanks for the advice in advance.
>
> BR,
> Umut
> --
> Quote: Coming together is a beginning, staying together is
> progress, and working together is success.
> Author: Henry Ford 1863-1947, American Industrialist, Founder of
> Ford Motor Company
More information about the petsc-users
mailing list