Mark Adams <[email protected]> writes:

>>
>>
>> >   ! setup solver now that matrix is complete
>> >   call KSPSetUp( solver%ksp, ierr )  !!! poisson.F90:213
>>
>> Where does your code call PCFieldSplitSetIS() or similar?
>
>
> I use DM's.  I've appended some of the code and attached the whole file.

You haven't given me enough to build this so you'll have to open a
debugger.  Your example should be executing the following at
fieldsplit.c:356:

      if (i == 0) {
        for (f = 0; f < numFields; ++f) {
          ierr = PCFieldSplitSetIS(pc, fieldNames[f], fields[f]);CHKERRQ(ierr);
          ierr = PetscFree(fieldNames[f]);CHKERRQ(ierr);
          ierr = ISDestroy(&fields[f]);CHKERRQ(ierr);
        }

numFields should be 2.  Compare to src/snes/examples/tutorials/ex28.c
(adapting runex28_3),

./ex28 -da_grid_x 20 -snes_converged_reason -snes_monitor_short 
-ksp_monitor_short -problem_type 2 -snes_mf_operator -pack_dm_mat_type nest 
-pc_type fieldsplit -pc_fieldsplit_dm_splits -pc_fieldsplit_type schur 
-fieldsplit_u_ksp_type gmres -fieldsplit_k_pc_type jacobi

Attachment: pgpAWG1OK2cct.pgp
Description: PGP signature

Reply via email to