[petsc-users] confusion about MatSetValues(A, ,ADD_VALUES);

丁老师 ztdepyahoo at 163.com
Fri May 31 20:25:19 CDT 2013


 in the user manual, it taks about the MAT_FLUSH_ASSEMbLY, and MAT_FINAL_ASSEMBLY, 
how to use the MAT_FLUSH_ASSEMBLY, if i want to mix the add value and insert value.











在 2013-06-01 00:30:45,"Jed Brown" <jedbrown at mcs.anl.gov> 写道:
>丁老师 <ztdepyahoo at 163.com> writes:
>
>> I write a simple c procedure to test the MatSetValues.  the main body of procedure is like this
>>         
>>      int row=1;
>>      int col=10;
>>      double v=1.0;
>>    
>>      MatSetValues(A,1,&row,1,&col,&v,INSERT_VALUES);
>>       MatSetValues(A,1,&row,1,&row,&v,ADD_VALUES);
>>       MatSetValues(A,1,&col,1,&col,&v,ADD_VALUES);
>
>You can't mix INSERT_VALUES and ADD_VALUES.  Please use debugging PETSc
>for development.  It warns about this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130601/0d611067/attachment.html>


More information about the petsc-users mailing list