[petsc-users] Preconditioner for LSC
Jed Brown
jed at jedbrown.org
Wed Feb 24 12:31:33 CST 2021
We should add a PCLSCGetKSP() interface to pull out that solver. It'll be somewhat hard to use because the PC needs to be set up before that part would exist. (This is a recurring interface challenge for nested solvers and we don't have a good solution. Options are convenient.)
Elena Travaglia <elena.travaglia at edu.unito.it> writes:
> Thank you for the replay.
>
> Now I have set the precondition on the command line with
> "-fieldsplit_1_lsc_pc_type" , but is it also possible to set it from within
> the code instead?
> What is the equivalent code to obtain the effect of
> "-fieldsplit_1_lsc_pc_type mat" ?
>
> Elena
>
> Il giorno mer 24 feb 2021 alle ore 06:04 Jed Brown <jed at jedbrown.org> ha
> scritto:
>
>> If you've already attached a MatShell, you could presumably use
>> -fieldsplit_1_lsc_pc_type mat to just call its MatMult.
>>
>> The sense I've gotten when I wrote PCLSC and was experimenting with these
>> methods is that the main selling point of LSC (for most discretizations) is
>> that it's more algebraic than the cheaper PCD methods.
>>
>> Elena Travaglia <elena.travaglia at edu.unito.it> writes:
>>
>> > Dear PETSc users,
>> >
>> > we would like to compare our preconditioner for the Schur complement
>> > of a Stokes system, with the LSC preconditioner already implemented in
>> > PETSc. Following the example in the PETSc manual, we've tried
>> > -fieldsplit_1_pc_type lsc -fieldsplit_1_lsc_pc_type ml
>> > but this is not working (properly) on our problem.
>> >
>> > On the other hand we think we have a good preconditioner for A10*A01,
>> > so we'd like to try
>> > -fieldsplit_1_pc_type lsc -fieldsplit_1_lsc_pc_type shell
>> > but we cannot figure out how to attach our apply() routine to
>> > the pc object of fieldsplit_1_lsc.
>> >
>> > Can this be done in the current interface?
>> > Or perhaps, should we call KSPGetOperators on the fieldsplit_1 solver
>> > and attach to its Sp operator a "LSC_Lp" of type MATSHELL with our
>> routine
>> > attached to the MATOP_SOLVE of the shell matrix?
>> >
>> > Thanks in advance,
>> >
>> > Elena and Matteo
>> >
>> > --
>> > ------------------------
>> >
>> >
>> >
>> > Indirizzo istituzionale di posta elettronica
>> > degli studenti e dei laureati dell'Università degli Studi di
>> TorinoOfficial
>> > University of Turin email address for students and graduates
>>
>
> --
> ------------------------
>
>
>
> Indirizzo istituzionale di posta elettronica
> degli studenti e dei laureati dell'Università degli Studi di TorinoOfficial
> University of Turin email address for students and graduates
More information about the petsc-users
mailing list