[petsc-users] Is there something to be paid attention to about MatIsSymmetric?

Matthew Knepley knepley at gmail.com
Wed Jan 16 12:15:59 CST 2013


On Wed, Jan 16, 2013 at 12:09 PM, w_ang_temp <w_ang_temp at 163.com> wrote:

>
>
>
>
>
>
> >At 2012-12-02 23:10:51,"Jed Brown" <jedbrown at mcs.anl.gov> wrote:
>
> >The test for symmetry is not implemented for all matrix types. Looking at
> the code, it seems to only be SeqAIJ, but MatIsTranspose(A,A,...) would
> also work >for MPIAIJ.
>
>
> I made a test. I get all the elements of the matrix and compare the
> element A(i,j) with
> A(j,i). The result shows that the matrix is symmetric. But the result of
> MatIsTranspose(A,A,0.0,matsysflg,ierr)
> shows that it is unsymmetric(matsysflg=0). I think there is something that
> I donot know about using the function.
>
>
Obviously your comparison has a tolerance.

  Matt


> >>On Sun, Dec 2, 2012 at 8:45 AM, w_ang_temp <w_ang_temp at 163.com> wrote:
>
>>  >>Hello,
>>
>> >>    I use MatIsSymmetric to know if the matrix A is symmetric.
>>
>> >>According to my model, it should be symmetric due to the theory.
>>
>> >>But I always get the result 'PetscBool  *flg = 0', although I
>>
>> >>set 'tol' a large value(0.001).
>>
>> >>    Because the matrix is of 20000 dimension, I can not output the
>>
>> >>matrix to the txt. So I want to konw if there is something to be paid
>> attention to
>>
>> >>about the function 'MatIsSymmetric' in version 3.2. Or do I have some
>> other ways
>>
>> >>to determine the symmetry.I think symmetry is one of the most important
>> thing
>>
>> >>in my analysis.
>>
>> >>    Thanks.
>>
>> >>                                               Jim
>>
>>
>>
>
>
>


-- 
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/20130116/7e000aae/attachment.html>


More information about the petsc-users mailing list