[petsc-users] On PCFIELDSPLIT and its implementation
Edoardo alinovi
edoardo.alinovi at gmail.com
Mon Nov 14 14:46:15 CST 2022
Thanks Barry, Your help is always much appreciated! I'll try this out asap.
I have ended using baij because I have read the section "solving block
matrices" and I was thinking that baij was the only way to use fieldsplit!
Completely misunderstood then!
Il Lun 14 Nov 2022, 20:34 Barry Smith <bsmith at petsc.dev> ha scritto:
>
> 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> 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>
>> 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/fa1c7914/attachment.html>
More information about the petsc-users
mailing list