[petsc-users] Which type of matrix do I use to define my own interpolation operators in PCMG?

Ben Yee bcyee at umich.edu
Mon Aug 21 13:58:51 CDT 2017


Hi,

I was wondering what type of matrix I should use if I want to define my own
interpolation matrix in PCMG.

I don't have any DM objects, and I wanted to provide the matrix entries to
the interpolation matrix manually.  Moreover, I want the coarse grid
operators to be defined via the Galerkin process, so I only need to define
the interpolation operator.  The fine grid problem/operator is defined as a
parallel sparse matrix using MATMPIAIJ.  My interpolation operator is also
parallel and sparse -- does that mean I should also use MATMPIAIJ for my
interpolation operator?

I did some digging but I couldn't find any examples where the
interpolation/restriction operators in PETSc were defined explicitly by the
user.  I also found the documentation for the matrix type MATMAIJ (
http://www.mcs.anl.gov/petsc/petsc-current/docs/
manualpages/Mat/MATMAIJ.html#MATMAIJ), which indicates that it is a
specialized matrix for interpolation/restriction operations.  However, I
also noticed that the description for MATMAIJ indicates that it will
interpolate each component the same way independently.  I do have a
multicomponent problem, but I was hoping to interpolate each component
differently -- does that mean I can't use the MATMAIJ matrix type?

If it is recommended that I use the MATMAIJ matrix type, I would like some
clarification regarding the MatCreateMAIJ function.  In particular, I'm not
really sure how the input matrix "A" (first argument of MatCreateMAIJ) is
supposed to be -- the description of MatCreateMAIJ says "the AIJ matrix
describing the action on blocks," but I don't know what that means.  The
use of MatCreateMAIJ in ex48.c is not really clear to me.

Any guidance would be much appreciated.  Thanks!

-- 
Ben Yee

NERS PhD Candidate, University of Michigan
B.S. Mech. & Nuclear Eng., U.C. Berkeley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170821/69405c0b/attachment.html>


More information about the petsc-users mailing list