[petsc-users] more flexible MatSetValues?
Barry Smith
bsmith at mcs.anl.gov
Sat Feb 19 08:27:51 CST 2011
Because PETSc is designed as an object oriented library with class inheritance one could derive a new subclass with dynamic allocation from the current class without needing to write much new code.
Barry
On Feb 19, 2011, at 2:25 AM, Gong Ding wrote:
> Hi,
> After reading the source code of aij.c, I think the MatSetValues function can be more flexible when preallocation is not correct.
>
> Why not use a dynamic array such as c++ vector of triple(a, i, j) to buffer the operation?
> And flush the buffer to real a,i,j array when MatAssemblyEnd is called?
>
> Gong Ding
More information about the petsc-users
mailing list