[petsc-users] vector outer product
Yifei Li
yifli82 at gmail.com
Thu Aug 9 22:26:29 CDT 2012
On Thu, Aug 9, 2012 at 11:22 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Thu, Aug 9, 2012 at 10:19 PM, Yifei Li <yifli82 at gmail.com> wrote:
>
>>
>>
>> On Thu, Aug 9, 2012 at 10:59 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>
>>> On Thu, Aug 9, 2012 at 9:56 PM, Yifei Li <yifli82 at gmail.com> wrote:
>>>
>>>> Matt,
>>>>
>>>> I'm new to PETSC, can you pls explain what you mean by 'keep it in
>>>> unassembled form'?
>>>>
>>>
>>> Just keep two vectors, u^T v, instead of the dense matrix.
>>>
>>>
>> But I need the result of the outer product (e.g, A) for
>> further calculation (e.g., A*W).
>>
>
> A * W = A * (u v^T) = (A * u) v^T
>
>
Ah, how come I missed such a simple technique
thanks :)
>
>
> Matt
>
>
>>
>>>
>>> Matt
>>>
>>>
>>>> A small example would be nice too. Thanks
>>>>
>>>> Yifei
>>>>
>>>> On Thu, Aug 9, 2012 at 9:15 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>>>
>>>>> On Thu, Aug 9, 2012 at 5:39 PM, Yifei Li <yifli82 at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I did not find any function doing this in the manual. Could someone
>>>>>> suggest a good way to do this?
>>>>>>
>>>>>
>>>>> That gives a dense matrix. You would never want to do this. You would
>>>>> keep it in unassembled form.
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Yifei
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> What most experimenters take for granted before they begin their
>>>>> experiments is infinitely more interesting than any results to which their
>>>>> experiments lead.
>>>>> -- Norbert Wiener
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120809/353f7bf4/attachment.html>
More information about the petsc-users
mailing list