[petsc-users] fieldsplit: Unhandled case, must have at least two fields, not 1!
Matthew Knepley
knepley at gmail.com
Fri Nov 29 10:53:28 CST 2013
On Fri, Nov 29, 2013 at 10:43 AM, Nico Schlömer <nico.schloemer at gmail.com>wrote:
> 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* ================
>
> What would I have to look at to debug this?
>
The PC is getting recreated somewhere in the intervening code. At least
this makes the
most sense to me. I would get in the debugger and break in
PCCreate_FieldSplit.
Matt
> --Nico
>
> On Thu, Nov 28, 2013 at 5:53 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> > Nico Schlömer <nico.schloemer at gmail.com> writes:
> >
> >> Hi Jed,
> >>
> >> thanks for the quick answer!
> >> I can of course generate the strided index sets (01x34x6...,
> >> xx2xx5x...) myself and insert them via PCFieldSplitSetIS(), but I
> >> thought that ultimately does the same thing that I would have liked
> >> PCFieldSplitSetFields() to do for me. Not true?
> >
> > PCFieldSplitSetFields is something you call only once to identify all
> > the fields. It doesn't let you group multiple strides in one, so you
> > could create "ux", "uy", and "p", but then those would be separate. You
> > can create splits using numbers, -fieldsplit_block_size 3
> > -fieldsplit_0_fields 0,1 -fieldsplit_1_fields 2 (assuming collocated
> > discretization), but this can be rather opaque to maintain.
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131129/24a4c4da/attachment.html>
More information about the petsc-users
mailing list