[petsc-users] Solve Schur complement problem

saturday luis luis.saturday at gmail.com
Tue Jan 23 14:18:51 CST 2018


Barry:

Thanks for the quick response!

I assumed that the Mat object created by MatCreateSchurComplement can
somehow be solved by a KSP option (like plain CG).

I am aware of the fieldsplit pc. My situation is that I have to solve a
problem with S = L - D K^-1 D^T, wherein L, D, K  are all sparse. Of
course, the last option for me is to write a simple CG solver for S myself.
Do you have any recommendations?

Thanks,

Luis

2018-01-23 11:25 GMT-08:00 Smith, Barry F. <bsmith at mcs.anl.gov>:

>
>   Luis,
>
>    This doesn't really have any thing to do with the Schur complement per
> se, you are asking do an ILU on this abstract Schur complement matrix which
> is not possible.
>
>    Almost for sure you want to use PCFIELDSPLIT and not directly create
> the MatCreateSchurComplement() yourself. PCFIELDSPLIT has many possible
> variants for solving systems with segregated Schur complement methods.
>
>    Barry
>
>
> > On Jan 23, 2018, at 1:13 PM, saturday luis <luis.saturday at gmail.com>
> wrote:
> >
> > Hi PETSc team:
> >
> > I am trying to solve a Stokes problem in a segregated manner, in which
> the pressure field is obtained by solving the pressure Schur complement.
> This is what I did.
> >
> > I created a Schur complement by calling
> >
> > Mat S;
> > MatCreateSchurComplement(gloAssem_ptr->K_11, gloAssem_ptr->K_11,
> gloAssem_ptr->K_10, gloAssem_ptr->K_01, gloAssem_ptr->K_00, &S);
> >
> > Then I use the Mat S as an input for KSP:
> > KSPSetOperators(ksp, S, S);
> >
> > I got error message as follows.
> > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/
> linearsolvertable.html for possible LU and Cholesky solvers
> > [0]PETSC ERROR: Could not locate a solver package. Perhaps you must
> ./configure with --download-<package>
> > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> > [0]PETSC ERROR: Petsc Release Version 3.8.3, Dec, 09, 2017
> > [0]PETSC ERROR: ./bipn3d on a arch-linux2-cxx-debug named bacon by luis
> Tue Jan 23 11:02:34 2018
> > [0]PETSC ERROR: Configure options --prefix=~/lib/petsc-3.8.3-debug
> --with-x=0 -with-pic --with-mpi-compilers=1 --with-mpi-dir=/home/lib/mpich-3.2/
> --with-clanguage=C++ --with-scalar-type=real --with-shared-libraries=1
> --with-precision=double --with-hypre=1 --download-hypre --with-spai=1
> --download-spai --with-superlu_dist=1 --download-superlu_dist
> --with-superlu=1 --download-superlu --with-parmetis=1 --download-parmetis
> --with-metis=1 --download-metis --with-mumps=1 --download-mumps
> --with-parmetis=1 --download-parmetis --with-metis=1 --download-metis
> --with-scalapack=1 --download-scalapack --with-blacs=1 --download-blacs
> --with-spooles=1 --download-spooles --with-debugging=yes
> --download-fblaslapack
> > [0]PETSC ERROR: #1 MatGetFactor() line 4346 in
> /home/lib/petsc-3.8.3/src/mat/interface/matrix.c
> > [0]PETSC ERROR: #2 PCSetUp_ILU() line 142 in
> /home/lib/petsc-3.8.3/src/ksp/pc/impls/factor/ilu/ilu.c
> > [0]PETSC ERROR: #3 PCSetUp() line 924 in /home/lib/petsc-3.8.3/src/ksp/
> pc/interface/precon.c
> > [0]PETSC ERROR: #4 KSPSetUp() line 381 in /home/lib/petsc-3.8.3/src/ksp/
> ksp/interface/itfunc.c
> > [0]PETSC ERROR: #5 KSPSolve() line 612 in /home/lib/petsc-3.8.3/src/ksp/
> ksp/interface/itfunc.c
> >
> > Let me know if you can see any issue in the usage of Schur complement
> creation.
> >
> > Thanks,
> >
> > Luis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180123/3fac1f0e/attachment.html>


More information about the petsc-users mailing list