<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div>sorry for the cryptic title but this is a little complex.</div><div>Here is what I am doing:</div><div>I created a DMShell that gets four fields passed from a PetscSection.</div><div>Now I am doing this because I want to apply a schur complement to my problem.</div><div>In order to do so I pass the following arguments to my code:</div><div><br></div><div><font class="Apple-style-span" face="'Lucida Console'">-ksp_type gmres</font></div><div><font class="Apple-style-span" face="'Lucida Console'">-pc_type fieldsplit</font></div><div><font class="Apple-style-span" face="'Lucida Console'">-pc_fieldsplit_type schur</font></div><div><font class="Apple-style-span" face="'Lucida Console'">-pc_fieldsplit_schur_factorization_type full</font></div><div><font class="Apple-style-span" face="'Lucida Console'">-pc_fieldsplit_0_fields 2,3 <--- This define A00 for my schur</font></div><div><font class="Apple-style-span" face="'Lucida Console'">-pc_fieldsplit_1_fields 0,1</font></div><div><font class="Apple-style-span" face="'Lucida Console'"><br></font></div><div>Up to here everything works fine and as expected (I actually do a -ksp_view to make sure that everything makes sense).</div><div>Now things get tricky, I would like to compute A00^-1 using another schur decomposition so here are the commands I issue:</div><div><br></div><div><font class="Apple-style-span" face="'Lucida Console'"> -fieldsplit_0_ksp_type preonly</font></div><div><font class="Apple-style-span" face="'Lucida Console'"> -fieldsplit_0_pc_type fieldsplit</font></div><div><font class="Apple-style-span" face="'Lucida Console'"> -fieldsplit_0_</font><span class="Apple-style-span" style="font-family: 'Lucida Console'; ">pc_fieldsplit_type schur</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Console'; "> </span><font class="Apple-style-span" face="'Lucida Console'">-fieldsplit_0_</font><span class="Apple-style-span" style="font-family: 'Lucida Console'; ">pc_fieldsplit_</span><span class="Apple-style-span" style="font-family: 'Lucida Console'; ">schur_factorization_type full</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Console'; "> -fieldsplit_0_pc_fieldsplit_0_fields 2</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Console'; "> </span><span class="Apple-style-span" style="font-family: 'Lucida Console'; ">-fieldsplit_0_pc_fieldsplit_1_fields 3</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Console'; "><br></span></div><div>I am almost sure that the 4 first commands are correct, I am not however sure that the last two are understood by PETSc.</div><div>Actually I am worried that the DMShell that I created for the first level schur is not passed on the second level schur.</div><div>Here is the error message I get when I run my code:</div><div><br></div><div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Object is in wrong state!</div><div>[0]PETSC ERROR: Decomposition defined only after DMSetUp!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Development GIT revision: v3.4.3-4597-g3edecfd GIT Date: 2014-02-20 20:43:18 -0600</div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div><div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: /home/luc/research/feap_repo/ShearBands/parfeap-petsc34/feap on a arch-linux2-c-opt named euler by luc Fri Feb 28 20:07:18 2014</div><div>[0]PETSC ERROR: Libraries linked from /home/luc/research/petsc/arch-linux2-c-opt/lib</div><div>[0]PETSC ERROR: Configure run at Fri Feb 21 17:31:31 2014</div><div>[0]PETSC ERROR: Configure options --download-cmake --download-hypre --download-metis --download-mpich --download-parmetis --with-debugging=0 --with-share-libraries=0</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: DMCreateFieldDecomposition() line 1262 in /home/luc/research/petsc/src/dm/interface/dm.c</div><div>[0]PETSC ERROR: PCFieldSplitSetDefaults() line 336 in /home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div><div>[0]PETSC ERROR: PCSetUp_FieldSplit() line 485 in /home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div><div>[0]PETSC ERROR: PCSetUp() line 888 in /home/luc/research/petsc/src/ksp/pc/interface/precon.c</div><div>[0]PETSC ERROR: KSPSetUp() line 278 in /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div><div>[0]PETSC ERROR: KSPSolve() line 390 in /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div><div>[0]PETSC ERROR: PCApply_FieldSplit_Schur() line 859 in /home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div><div>[0]PETSC ERROR: PCApply() line 440 in /home/luc/research/petsc/src/ksp/pc/interface/precon.c</div><div>[0]PETSC ERROR: KSP_PCApply() line 227 in /home/luc/research/petsc/include/petsc-private/kspimpl.h</div><div>[0]PETSC ERROR: KSPInitialResidual() line 64 in /home/luc/research/petsc/src/ksp/ksp/interface/itres.c</div><div>[0]PETSC ERROR: KSPSolve_GMRES() line 234 in /home/luc/research/petsc/src/ksp/ksp/impls/gmres/gmres.c</div><div>[0]PETSC ERROR: KSPSolve() line 432 in /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div></div><div><br></div><div>Let me know if I'm doing something wrong or misunderstood something.</div><div><br></div><div>Best,</div><div>Luc</div></body></html>