[petsc-users] Nested Fieldsplit for custom index sets

Safin, Artur aks084000 at utdallas.edu
Tue Jul 26 20:00:13 CDT 2016


Hello all,

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:

--------------------------------------------------------------------------------
   KSP *ksp_all, ksp_P;
   PCFieldSplitGetSubKSP(pc, &i, &ksp_all);

   ksp_P = ksp_all[0];
   PC pc_P;
   KSPGetPC(ksp_P, &pc_P);                     // This should extract the preconditioner for fieldsplit P
   PCFieldSplitSetIS(pc_P, "A", P_A_IS);
   PCFieldSplitSetIS(pc_P, "B", P_B_IS);
--------------------------------------------------------------------------------

And these are the run-time arguments:

--------------------------------------------------------------------------------
   -pc_type fieldsplit
   -pc_fieldsplit_type multiplicative

   -fieldsplit_P_ksp_type gmres
   -fieldsplit_P_pc_type fieldsplit
   -fieldsplit_P_pc_fieldsplit_type multiplicative

   -fieldsplit_P_fieldsplit_A_ksp_type gmres
   -fieldsplit_P_fieldsplit_B_pc_type lu
   -fieldsplit_P_fieldsplit_B_ksp_type preonly
--------------------------------------------------------------------------------

But that does not work:

--------------------------------------------------------------------------------
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Cannot locate function PCFieldSplitSetIS_C in object
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.7.2, Jun, 05, 2016
[0]PETSC ERROR: ./main_2D on a x86_64 named artur-ubuntu by artur Tue Jul 26 18:55:29 2016
[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
[0]PETSC ERROR: #1 PCFieldSplitSetIS() line 1756 in /home/artur/Rorsrach/Packages/petsc-3.7.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Cannot locate function PCFieldSplitSetIS_C in object
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.7.2, Jun, 05, 2016
[0]PETSC ERROR: ./main_2D on a x86_64 named artur-ubuntu by artur Tue Jul 26 18:55:29 2016
[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
[0]PETSC ERROR: #2 PCFieldSplitSetIS() line 1756 in /home/artur/Rorsrach/Packages/petsc-3.7.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
--------------------------------------------------------------------------------

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?

Best,

Artur

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160727/f64a52ba/attachment.html>


More information about the petsc-users mailing list