Nico Schlömer <[email protected]> writes: > Hm, I tried > > ================ *snip* ================ > IS is; > ierr = ISCreateGeneral(PETSC_COMM_WORLD, u_indices.size(), u_indices.data(), > PETSC_USE_POINTER, &is); > PCFieldSplitSetIS(pc, "u", is); > IS p_is; > ierr = ISCreateGeneral(PETSC_COMM_WORLD, p_indices.size(), p_indices.data(), > PETSC_USE_POINTER, &p_is); > PCFieldSplitSetIS(pc, "p", p_is); > ================ *snap* ================ > > now (where u_indices, p_indices are set to {0,1,3,4,6,7...}, > {2,5,8,...}), but I'm still getting > > ================ *snip* ================ > [0]PETSC ERROR: Petsc has generated inconsistent data! > [0]PETSC ERROR: Unhandled case, must have at least two fields, not 1! > ================ *snap* ================
Are you also calling PCFieldSplitSetFields? Always send the entire error message. There are a few examples that do this, e.g., src/snes/examples/tutorials/ex28.c and src/ksp/ksp/examples/tests/ex11.c.
pgploDALfat1X.pgp
Description: PGP signature
