[petsc-users] Solve Schur complement problem
Matthew Knepley
knepley at gmail.com
Tue Jan 23 14:27:21 CST 2018
On Wed, Jan 24, 2018 at 6:13 AM, 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.
>
This will work if you give
-pc_type none
which will give you plain GMRES. As Barry says, a more sophisticated thing
to do is to use PCFIELDSPLIT. I do this in the examples for SNES ex62.
Thanks,
Matt
> Thanks,
>
> Luis
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180124/09c54cea/attachment-0001.html>
More information about the petsc-users
mailing list