[petsc-users] How Efficiently copy matrices
Jed Brown
jedbrown at mcs.anl.gov
Sat Oct 1 07:53:22 CDT 2011
On Sat, Oct 1, 2011 at 02:33, behzad baghapour
<behzad.baghapour at gmail.com>wrote:
> I want to copy some elements of a calculated matrix (A) into another matrix
> (B) with DIFFERENT_NONZERO_PATTERN.
>
Which "some elements"?
> How could I efficiently do this?
> Is this should be done after or before matrix assembly of (A)?
>
You can only copy after assembling A.
> Then, what is the sparse pattern of the matrix (A) after assembling and how
> is the correct access into its elements?
>
You probably want MatGetSubMatrix().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111001/1eabebe7/attachment.htm>
More information about the petsc-users
mailing list