[petsc-users] confusion about MatSetValues(A, ,ADD_VALUES);
Jed Brown
jedbrown at mcs.anl.gov
Fri May 31 11:30:45 CDT 2013
丁老师 <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.
More information about the petsc-users
mailing list