[petsc-users] help on how to use petsc in a smart way

NAN ZHAO zhaonanavril at gmail.com
Sat Jun 25 20:57:50 CDT 2011


I think I may rephrase my problem like that, I have a huge matrix with n by
n, at row m, I put a 1 in the location (m,m), other element in the row is
zero. Then I construct a vector with size n, put zero in the m location. All
other location I just put random number. I should get a answer vector with 0
in the mth element, But I some times got unreasonable number in this
location. I am wondering if there is some option in petsc to avoid this
case.

Thanks

On Sat, Jun 25, 2011 at 2:58 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Sat, Jun 25, 2011 at 2:49 PM, NAN ZHAO <zhaonanavril at gmail.com> wrote:
>
>> Dear all,
>>
>> I have a question about how to use the ksp in a smart way to solve a
>> linear system. I had a simple test to generate a random matrix and vector,
>> but I put only one nonzero value in a row (let's say 1), and in the respect
>> location of the  RHS vector I put a zero. The size of the matrix is kind of
>> big, I saw petsc some time give unreasonable value at that loaction (it
>> should be zero or some really small number). I want to know if there is a
>> way to avoid it?
>>
>
> The problem sounds degenerate. A full rank A with 1 nonzero/row and b = 0
> would not have a solution other than 0. What will this tell you?
>
>    Matt
>
>
>> Thanks
>>
> --
> 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/20110625/4cc17284/attachment-0001.htm>


More information about the petsc-users mailing list