[petsc-users] Incorrect Eigenvalues when Setting KSP and PC types

Hong hzhang at mcs.anl.gov
Fri Sep 29 16:13:07 CDT 2017


OK, making things easier and flexible, I only did
1) Move test to MatGetFactor()

2) Test:
   complex build && ftype==CHOLESKY||ICC:
  if (mat->hermitian) throw an "not supported" error

MatIsSymmetric() is either expensive or not supported, and users may apply
Cholesky or ICC to almost symmetric matrix, so I will not change existing
way for real build.

Hong

On Fri, Sep 29, 2017 at 1:48 PM, Jed Brown <jed at jedbrown.org> wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
>
> >   1) The test is definitely in the wrong place. If we are testing and
> erroring if using Cholesky and mat is not marked as symmetric or hermitian
> the test should be in MatGetFactor() not in a particular implementation.
> >
> >  2) It is a tough call if we should do this check or not.  There are
> good arguments in both directions.
> >
> >    One thing we could do is if the matrix is not marked as
> symmetric/hermitian is we could just check at that point (but expensive) or
> we could just check in debug mode.
> >
> >  But I think we should require the user to set the flag (note for SBAIJ
> the flag for symmetric (or hermitian? which one) should be automatically
> set at creation).
>
> So what's the approach if the user wants to do Cholesky on the nearby
> symmetric matrix defined by the upper triangular part?  Now they'll need
> to create that matrix explicitly?  It's certainly relevant for a
> nearly-symmetric matrix, either due to a weak transport process or
> implementation of boundary conditions.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170929/bc49ed9b/attachment.html>


More information about the petsc-users mailing list