[petsc-users] Questions about ASM in petsc4py

Matthew Knepley knepley at gmail.com
Thu Mar 10 15:28:23 CST 2016


On Thu, Mar 10, 2016 at 3:23 PM, Chih-Hao Chen <
chih-hao.chen2 at mail.mcgill.ca> wrote:

> Hello PETSc members,
>
>
> Sorry for asking for help about the ASM in petsc4py.
> Currently I am using your ASM as my preconditioned in my solver.
> I know how to setup the PCASM based on the ex8.c in the following link.
> http://www.mcs.anl.gov/petsc/petsc-3.4/src/ksp/ksp/examples/tutorials/ex8.c
>
> But when using the function “getASMSubKSP” in petsc4py,
> I have tried several methods, but still cannot get the subksp from each
> mpi.
>

The subKSPs do not have to do with MPI. On each rank, you get the local
KSPs.


> Here is the snippet of the code of the function.
>
> def getASMSubKSP(self):        cdef PetscInt i = 0, n = 0        cdef PetscKSP *p = NULL        CHKERR( PCASMGetSubKSP(self.pc, &n, NULL, &p) )        return [ref_KSP(p[i]) for i from 0 <= i <n]
>
>
> In ex8.c, we could use a “FOR” loop to access the indiivdual subksp.
> But in python, could I use “FOR” loop to get all the subksps with:
>
> subksp[i] = pc.getASMSubKSP[i]
>

I do not understand this, but I think the answer is no.


> Another question is in ex8.c, it seems I don’t need to do any setup to
> decompose the RHS vector.
> But do I need to decompose the RHS vector with any settings if I don’t use
> PETSc solvers but with your preconditioners?
>

I do not understand what you mean by "decompose the RHS vector".

  Thanks,

    Matt


> Thanks very much.
>
> Best,
> Chih-Hao
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160310/758424d9/attachment.html>


More information about the petsc-users mailing list