<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div>Hello all,</div>
<div><br>
</div>
<div>I would like to work out how to get nested fieldsplit to work correctly. I have a submatrix (labeled fieldsplit_P) that I would like to block precondition with sub-blocks A & B. To do this, I access the PC object within fieldsplit_P, and pass index sets
corresponding to these sub-blocks (P_A_IS, P_B_IS) that tell how the matrix should be split. This is what I have:</div>
<div><br>
</div>
<div>--------------------------------------------------------------------------------</div>
<div> KSP *ksp_all, ksp_P;</div>
<div> PCFieldSplitGetSubKSP(pc, &i, &ksp_all);</div>
<div> </div>
<div> ksp_P = ksp_all[0];</div>
<div> PC pc_P;</div>
<div> KSPGetPC(ksp_P, &pc_P); <span> </span><span> </span><span> </span><span> </span><span> </span>// This should extract the preconditioner for fieldsplit P</div>
<div> PCFieldSplitSetIS(pc_P, "A", P_A_IS);</div>
<div> PCFieldSplitSetIS(pc_P, "B", P_B_IS);</div>
<div>--------------------------------------------------------------------------------</div>
<div><br>
</div>
<div>And these are the run-time arguments:</div>
<div><br>
</div>
<div>--------------------------------------------------------------------------------</div>
<div> -pc_type fieldsplit</div>
<div> -pc_fieldsplit_type multiplicative</div>
<div><br>
</div>
<div> -fieldsplit_P_ksp_type gmres</div>
<div> -fieldsplit_P_pc_type fieldsplit</div>
<div> -fieldsplit_P_pc_fieldsplit_type multiplicative</div>
<div><br>
</div>
<div> -fieldsplit_P_fieldsplit_A_ksp_type gmres</div>
<div> -fieldsplit_P_fieldsplit_B_pc_type lu</div>
<div> -fieldsplit_P_fieldsplit_B_ksp_type preonly</div>
<div>--------------------------------------------------------------------------------</div>
<div><br>
</div>
<div>But that does not work:</div>
<div><br>
</div>
<div>--------------------------------------------------------------------------------</div>
<div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div>
<div>[0]PETSC ERROR: No support for this operation for this object type</div>
<div>[0]PETSC ERROR: Cannot locate function PCFieldSplitSetIS_C in object</div>
<div>[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.7.2, Jun, 05, 2016 </div>
<div>[0]PETSC ERROR: ./main_2D on a x86_64 named artur-ubuntu by artur Tue Jul 26 18:55:29 2016</div>
<div>[0]PETSC ERROR: Configure options --with-scalar-type=complex --with-mpi=1 --with-clanguage=c++ --with-cc=mpicc --with-fc=gfortran --with-cxx=mpic++ --with-fc=mpif90 --download-mumps --download-scalapack</div>
<div>[0]PETSC ERROR: #1 PCFieldSplitSetIS() line 1756 in /home/artur/Rorsrach/Packages/petsc-3.7.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div>
<div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div>
<div>[0]PETSC ERROR: No support for this operation for this object type</div>
<div>[0]PETSC ERROR: Cannot locate function PCFieldSplitSetIS_C in object</div>
<div>[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.7.2, Jun, 05, 2016 </div>
<div>[0]PETSC ERROR: ./main_2D on a x86_64 named artur-ubuntu by artur Tue Jul 26 18:55:29 2016</div>
<div>[0]PETSC ERROR: Configure options --with-scalar-type=complex --with-mpi=1 --with-clanguage=c++ --with-cc=mpicc --with-fc=gfortran --with-cxx=mpic++ --with-fc=mpif90 --download-mumps --download-scalapack</div>
<div>[0]PETSC ERROR: #2 PCFieldSplitSetIS() line 1756 in /home/artur/Rorsrach/Packages/petsc-3.7.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div>
<div>--------------------------------------------------------------------------------</div>
<div><br>
</div>
<div>It seems that the preconditioner object for fieldsplit_P does not know that it is also of fieldsplit type. Does anyone have any idea of how I can specify the proper fieldsplit?</div>
<div><br>
</div>
<div>Best,</div>
<div><br>
</div>
<div>Artur</div>
<br>
<p></p>
</div>
</body>
</html>