[petsc-dev] Unions of IS and MatNest

Pierre Jolivet pierre.jolivet at enseeiht.fr
Fri Mar 13 02:19:50 CDT 2020



> On 12 Mar 2020, at 11:40 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Thu, Mar 12, 2020 at 5:59 PM Jed Brown <jed at jedbrown.org <mailto:jed at jedbrown.org>> wrote:
> Pierre Jolivet <pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> writes:
> 
> > Hello,
> > Has there been any follow-up on this https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/024020.html <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/024020.html> <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/024020.html <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/024020.html>>?
> > Given a 3x3 MatNest A = [A_00,0,0 ; 0,A_11,0 ; 0,0,A_22], I’d like to setup a two-way fieldsplit coupling [A_00,0 ; 0,A_11] and [A_22] but I can’t figure out the proper options.
> 
> Are you looking for a Schur split or additive/multiplicative?

Don’t know yet which will perform best, do you have a specific solution in mind for one scenario or the other?
I was mostly wondering if it was possible in a general context, not taking -pc_fieldsplit_type into account.

> -pc_fieldsplit_field_0 0,1 -pc_fieldsplit_field_1 2 -pc_fieldsplit_type schur

These flags, used with my .cpp, yield:
[0]PETSC ERROR: Arguments are incompatible
[0]PETSC ERROR: To use Schur complement preconditioner you must have exactly 2 fields
If I use -pc_fieldsplit_%d_fields <a,b,..> as advocated in the manual (instead of -pc_fieldsplit_field_%d as you suggested), I get the same error.

> I believe.
> 
>    Matt
>  
> > Jed, in this answer https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/023993.html <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/023993.html> <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/023993.html <https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/023993.html>>, you recommend not to use MatNest. What would you recommend instead?
> 
> See src/snes/examples/tutorials/ex28.c for my preferred approach.

I’m not using DM, so in terms of Mat, I guess this example shows that I pretty much need to reimplement the field splitting myself?

Thanks,
Pierre

> -- 
> 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
> 
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200313/30ee98f9/attachment.html>


More information about the petsc-dev mailing list