[petsc-users] How Efficiently copy matrices
behzad baghapour
behzad.baghapour at gmail.com
Sat Oct 1 10:24:56 CDT 2011
Thanks, I will try MatGetSubMatrix for this matter...
On Sat, Oct 1, 2011 at 4:23 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> 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().
>
--
==================================
Behzad Baghapour
Ph.D. Candidate, Mechecanical Engineering
University of Tehran, Tehran, Iran
https://sites.google.com/site/behzadbaghapour
Fax: 0098-21-88020741
==================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111001/a50e35a5/attachment.htm>
More information about the petsc-users
mailing list