[petsc-users] fieldsplit: Unhandled case, must have at least two fields, not 1!

Nico Schlömer nico.schloemer at gmail.com
Thu Nov 28 09:22:16 CST 2013


Hi all,

I'm toying around with PETSc's field split capabilities for the
2D-Stokes problem, and similar to ex42 I call

  // set of the operators
  // set of a bunch of options
  PetscOptionsSetValue("-pc_type", "fieldsplit");
  PC pc;
  ierr = KSPGetPC(*_ksp, &pc);
  const PetscInt ufields[] = {0,1}, pfields[] = {2};
  ierr = PCFieldSplitSetBlockSize(pc,3);
  PCFieldSplitSetFields(pc,"u",2,ufields,ufields);
  PCFieldSplitSetFields(pc,"p",1,pfields,pfields);

When finally solving, however, I'm getting the error message

[0]PETSC ERROR: Petsc has generated inconsistent data!
[0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!

which confuses me since seem to set two fields u, p above.
Any hints on what the problem could be?

Cheers,
Nico


More information about the petsc-users mailing list