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 <[email protected]> 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 <[email protected]> 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
