[petsc-users] Any suggestion for this kinds of matrix?

Bao Kai paeanball at gmail.com
Thu Nov 10 14:45:13 CST 2011


Dear Matthew,

PCFIELDSPLIT seems a little more complex, I will try that.

I tried some different preconditioners, only lu can get right results.

With some pc, some wrong results can be obtained, such as the following
one.

tutorials]$ time ./ex78 -Ain A_in -rhs rhs -solu solu -noshift -pc_type
hypre -pc_hypre_type parasails -ksp_gmres_restart 600 -ksp_rtol 1e-5
-ksp_typ gmres

 Read matrix in ascii format ...
m: 288399, n: 288399, nz: 4023176
 read A completed
 rowNumber[0] = 13
 rowNumber[1] = 13
 rowNumber[2] = 19
 read A is complete !

 Read rhs in ascii format ...

 Read exact solution in ascii format ...

 Accuracy of the reading data: | b - A*u |_2 : 3321.15

 Iteration number is  :  38

real    0m11.977s
user    0m11.752s
sys    0m0.216s

The iteration should have converged, while converge to some wrong results.

Regards,
Kai

Message: 8
> Date: Thu, 10 Nov 2011 14:10:14 +0000
> From: Matthew Knepley <knepley at gmail.com>
> Subject: Re: [petsc-users] Any suggestion for this kinds of matrix?
> To: PETSc users list <petsc-users at mcs.anl.gov>
> Message-ID:
>        <CAMYG4GnxR2A+TcVzmsiOgD4wp4P+a_GRnPBg1YQKz7bJT5XiDw at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Thu, Nov 10, 2011 at 1:48 PM, Bao Kai <paeanball at gmail.com> wrote:
>
> > Dear all,
> >
> > I have been trying with PETSC to solve the linear system from mixed
> finite
> > element method.
> >
> > The pattern of the matrix is as the following, but due to the irregular
> > boundary involved, the matrix A is not strictly symmetric.
> >
> >    A     dt* C
> >
> >    C^T     0
> >
> >  As a  result of the matrix pattern, the diagonal entries of the
> > bottom-right portion are all zero.
> >
> > I am just wondering if there are any suggestion of the type of the solver
> > and preconditioner for this kinds of linear system?  Thank you very much.
> >
> > When I tried to solve the system with PETSC, I got the following
> > information. (  PCType PCASM,  KSPType, KSPFGMRES )
> >
>
> ILU is jsut not going to work for this type of matrix (a saddle point). I
> suggest reading about PCFIELDSPLIT.
>
>   Matt
>
>
> > [0]PETSC ERROR: --------------------- Error Message
> > ------------------------------------
> > [0]PETSC ERROR: Object is in wrong state!
> > [0]PETSC ERROR: Matrix is missing diagonal entry 288398!
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 4, Sun Oct 23 12:23:18
> > CDT 2011
> > [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> > [0]PETSC ERROR: See docs/index.html for manual pages.
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: Libraries linked from
> > /home/baok/software/petsc-3.2-p4/arch-linux2-c-debug-withhypre/lib
> > [0]PETSC ERROR: Configure run at Thu Nov 10 11:49:03 2011
> > [0]PETSC ERROR: Configure options --download-hypre=yes
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ_ilu0() line 1636 in
> > /home/baok/software/petsc-3.2-p4/src/mat/impls/aij/seq/aijfact.c
> > [0]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ() line 1740 in
> > /home/baok/software/petsc-3.2-p4/src/mat/impls/aij/seq/aijfact.c
> > [0]PETSC ERROR: MatILUFactorSymbolic() line 6092 in
> > /home/baok/software/petsc-3.2-p4/src/mat/interface/matrix.c
> > [0]PETSC ERROR: PCSetUp_ILU() line 216 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/pc/impls/factor/ilu/ilu.c
> > [0]PETSC ERROR: PCSetUp() line 819 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/pc/interface/precon.c
> > [0]PETSC ERROR: KSPSetUp() line 260 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/ksp/interface/itfunc.c
> > [0]PETSC ERROR: PCSetUpOnBlocks_ASM() line 339 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/pc/impls/asm/asm.c
> > [0]PETSC ERROR: PCSetUpOnBlocks() line 852 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/pc/interface/precon.c
> > [0]PETSC ERROR: KSPSetUpOnBlocks() line 154 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/ksp/interface/itfunc.c
> > [0]PETSC ERROR: KSPSolve() line 380 in
> > /home/baok/software/petsc-3.2-p4/src/ksp/ksp/interface/itfunc.c
> > [0]PETSC ERROR: main() line 261 in src/ksp/ksp/examples/tutorials/ex78.c
> >
> >
> > Best Regards,
> > Kai
> >
> >
>
>
> --
> 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/20111110/2ea2b385/attachment.htm
> >
>
> ------------------------------
>
> _______________________________________________
> petsc-users mailing list
> petsc-users at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/petsc-users
>
>
> End of petsc-users Digest, Vol 35, Issue 29
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111110/da069f92/attachment.htm>


More information about the petsc-users mailing list