[petsc-users] Changing a few entries in a matrix

Jed Brown jed at jedbrown.org
Fri May 8 16:10:32 CDT 2015


Ganesh Vijayakumar <ganesh.iitm at gmail.com> writes:

> Hello,
>
>   I have a CFD application where some entries of the matrix change every
> time step. 

The entries change value or the set of nonzero entries changes?  If the
former, just MatSetValues and carry on.  If the latter, either allocate
for the union of all possible nonzeros (storing some explicit zeros) or
reallocate the matrix each time.

> However, the total number of non-zero elements never changes. Is there
> anyway I can efficiently do this. My current attempts at doing this
> results in running over the total initial memory allocation very soon.
>
> ganesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150508/c09778c3/attachment.pgp>


More information about the petsc-users mailing list