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

Jed Brown jedbrown at mcs.anl.gov
Mon Dec 2 08:42:44 CST 2013


Mark Adams <mfadams at lbl.gov> writes:
> We use prefixes.  I left them out of the example.  So things like
> '-s2_pc_type fieldsplit' cause an error.  The 's2_' solver is a one field
> (Laplacian) solve.

So when you say to use fieldsplit for a solve with only one field, you
get an error saying that fieldsplit requires at least two fields?

1. Don't do that.

2. Sounds like the error message is correct.

3. Perhaps consider using a more intuitive prefix than "s2_".  When
   someone unfamiliar with your code sees "-s2_pc_type fieldsplit" their
   first thought will be that "s2_" is a multi-field solve of some sort.
   If they instead saw "-laplacian_pc_type fieldsplit" or
   "-pressure_pc_type fieldsplit", they might ask why fieldsplit was
   being attempted for what seems to be a scalar solve.

Let us know if you see a way to improve the message or handling of this
case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131202/f527ab8a/attachment.pgp>


More information about the petsc-users mailing list