[petsc-users] ASM with matrix-free method

Stefano Zampini stefano.zampini at gmail.com
Thu Feb 2 09:20:09 CST 2017


> On Feb 2, 2017, at 6:02 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Thu, Feb 2, 2017 at 8:55 AM, Sonia Pozzi <sonia.pozzi at usi.ch <mailto:sonia.pozzi at usi.ch>> wrote:
> Dear Barry, 
> 
> At the moment I’m dealing with the following problem.
> 
> Suppose I want to solve Sx=b, where is a product of matrices. In particular inside it contains also an inverse of a matrix.
> To compute the action of S I have created a shell matrix, but know I would like to apply the ASM as preconditioner.
> 
> Are you using a Schur complement? Have you looked at
> 
>   http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/MatCreateSchurComplement.html <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/MatCreateSchurComplement.html>

Which kind of Schur complement is it? Why do you want to use ASM?
If it comes from non-overlapping domain decomposition, then you could try PCNN (though it has been not maintained for a while) or PCBDDC.

>  
> Citing your words as answer to a previous similar question:
> 
> Thu Jan 13 13:14:47 CST 2011
> Is it possible use ASM and/or FieldSplit with a matrix-free method?
> "Yes, BUT the algorithms are coded around MatGetSubMatrix() and or MatGetSubMatrices() so to do matrix free you need to have code that applies "part" of the operator at a time (that is you cannot just have a matrix vector product that applies the entire operator to the entire vector. Once you have the ability to apply "part" of the operator at a time you need to code up a MATSHELL that responds appropriately to MatGetSubMatrix() and or MatGetSubMatrices() and returns new matrix-free shell matrices that apply only "their" part of the operator. This is non-trivial for many people but possible."
> 
> Could you be so kind to explain me better how, or do you have some code that is doing something similar?
> ASM says "I will take a block of your operator and invert it", but we do not know how to take a block of your MATSHELL
> because it only provides the action on a vector. You could
> 
>   a) Also provide MatGetSubmatrix() or MAtGetSubmatrices() for your MATSHELL as Barry says
> 
>   b) Make a matrix M that is an approximation to your MATSHELL, perhaps using the block diagonal portions of the inverse
>       so that you can explicitly give the values. Then pass M in as the preconditioner matrix for the solver.
> 
>   c) Use Chebyshev or some matrix-free preconditioner instead of ASM
> 
>   Thanks,
> 
>     Matt 
> Regards,
> 
> Sonia
> 
> 
> 
> -- 
> 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/20170202/b517c393/attachment.html>


More information about the petsc-users mailing list