<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 24, 2018 at 6:13 AM, saturday luis <span dir="ltr"><<a href="mailto:luis.saturday@gmail.com" target="_blank">luis.saturday@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi PETSc team:<br><br></div>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.<br><br></div>I created a Schur complement by calling <br><br><span style="color:rgb(0,0,255)">Mat S;<br>MatCreateSchurComplement(<wbr>gloAssem_ptr->K_11, gloAssem_ptr->K_11, gloAssem_ptr->K_10, gloAssem_ptr->K_01, gloAssem_ptr->K_00, &S);</span><br><br></div>Then I use the Mat S as an input for KSP:<br><span style="color:rgb(0,0,255)">KSPSetOperators(ksp, S, S);</span><br><br></div>I got error message as follows.<br><span style="color:rgb(255,0,0)">[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/<wbr>linearsolvertable.html</a> for possible LU and Cholesky solvers<br>[0]PETSC ERROR: Could not locate a solver package. Perhaps you must ./configure with --download-<package><br>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.8.3, Dec, 09, 2017 <br>[0]PETSC ERROR: ./bipn3d on a arch-linux2-cxx-debug named bacon by luis Tue Jan 23 11:02:34 2018<br>[0]PETSC ERROR: Configure options --prefix=~/lib/petsc-3.8.3-<wbr>debug --with-x=0 -with-pic --with-mpi-compilers=1 --with-mpi-dir=/home/lib/<wbr>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<br>[0]PETSC ERROR: #1 MatGetFactor() line 4346 in /home/lib/petsc-3.8.3/src/mat/<wbr>interface/matrix.c<br>[0]PETSC ERROR: #2 PCSetUp_ILU() line 142 in /home/lib/petsc-3.8.3/src/ksp/<wbr>pc/impls/factor/ilu/ilu.c<br>[0]PETSC ERROR: #3 PCSetUp() line 924 in /home/lib/petsc-3.8.3/src/ksp/<wbr>pc/interface/precon.c<br>[0]PETSC ERROR: #4 KSPSetUp() line 381 in /home/lib/petsc-3.8.3/src/ksp/<wbr>ksp/interface/itfunc.c<br>[0]PETSC ERROR: #5 KSPSolve() line 612 in /home/lib/petsc-3.8.3/src/ksp/<wbr>ksp/interface/itfunc.c<br><br></span></div><span style="color:rgb(255,0,0)"><font color="#000000">Let me know if you can see any issue in the usage of Schur complement creation.<br></font></span></div></div></div></blockquote><div><br></div><div>This will work if you give</div><div><br></div><div> -pc_type none</div><div><br></div><div>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.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><span style="color:rgb(255,0,0)"><font color="#000000"></font></span></div><span style="color:rgb(255,0,0)"><font color="#000000">Thanks,<br><br></font></span></div><span style="color:rgb(255,0,0)"><font color="#000000">Luis<br></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>