[petsc-users] On PCFIELDSPLIT and its implementation

Barry Smith bsmith at petsc.dev
Mon Nov 14 13:33:49 CST 2022


  Can you clarify what you mean? For some classes of problems, PCFIELDSPLIT can be a very efficacious preconditioner; for example when certain fields have very different mathematical structure than others. In those cases it is worth using AIJ and PCFIELDSPLIT instead of keeping BAIJ.


> On Nov 14, 2022, at 2:21 PM, Edoardo alinovi <edoardo.alinovi at gmail.com> wrote:
> 
> Hi Barry no worries!
> 
> Thanks for letting me know! It is not a problem for me to use MPIAIJ, do you think field split will be a game changer?
>  
> 
> 
> Il Lun 14 Nov 2022, 20:13 Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> ha scritto:
>> 
>>    Very sorry for wasting so much of your time. The PCFIELDSPLIT generally will not work with BAIJ matrices because the MatCreateSubMatrix() for BAIJ requires indexing by block in the matrix. Your code should work if you use MPIAIJ matrices.  Note you can still use MatSetValuesBlocked() with MPAIJ matrices.
>> 
>>   Barry
>> 
>> 
>> > On Nov 10, 2022, at 5:24 PM, Edoardo alinovi <edoardo.alinovi at gmail.com <mailto:edoardo.alinovi at gmail.com>> wrote:
>> > 
>> > True, 
>> > 
>> > Maybe somebody merged it already? I have  attached my silly example. 
>> > 
>> > To compile:
>> > mpifort -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc -fdefault-real-8 -o test test.F90 -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include
>> > 
>> > Do you need the petsc code MAtt did? 
>> > <test.F90>
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221114/71913129/attachment.html>


More information about the petsc-users mailing list