[petsc-users] Change entries after MatCopy

Lisandro Dalcin dalcinl at gmail.com
Fri May 14 14:37:26 CDT 2010


On 13 May 2010 17:50,  <hxie at umn.edu> wrote:
> On May 13 2010, hxie at umn.edu wrote:
>
>>
>>>
>>> On 12 May 2010 19:18,  <hxie at umn.edu> wrote:
>>>>
>>>> Hi,
>>>>
>>>> If I use MatCopy to get a new matrix, can i use MatSetValues to change
>>>> some
>>>> entries of that matrix and do the assemble after that? Or if I just need
>>>> to
>>>> change some diagonal entries, can I use MatDiagonalSet to change the
>>>> entries
>>>> without assembling? Thanks.
>>>>
>>>
>>> Yes and Yes.
>>
>> The first way does no work. I will try the second way.
>
> Sorry. I made a mistake in the variable declaration. The first way works.
> Thanks.
>

Next time you ask something, please make it explicit what "does not
work" actually means. Such vague statements are not helpful for any of
us in order to help people.



-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


More information about the petsc-users mailing list