DMMG with different

Barry Smith bsmith at mcs.anl.gov
Wed Sep 16 15:53:30 CDT 2009


On Sep 16, 2009, at 3:55 PM, Dave May wrote:

> Hi,
>   I'm trying to use DMMG to solve linear Stokes flow discretised  
> with finite elements.
> Does anyone know how to specify different matrices for the matrix  
> associated with the linear system and the matrix used to construct  
> the preconditioner? Ie, like choosing a different Amat and Bmat with  
> KSPSetOperators().

    There is not a current user friendly way to specify this. After  
you have called DMMGSetKSP() or DMMGSetSNES() you can call  
MatDestroy( dmmg[level]->B) or MatDestroy( dmmg[level]->J ) for any  
levels you want to change; create new matrices and put them into those  
locations. Different ones for B and J if you like.
>
> In looking at DMMGSetKSP(), I don't see how this is possible. DMMG  
> seems to generate the operator B via DMGetMatrix(), and then sets J  
> equal to B. A dirty hack around the problem seemed to be to used  
> PCDMMG, but I think I should be able to define different A and B  
> mat's with DMMG directly.
>
> I also noted that PCDMMG does not appear to be a registered PC  
> implementation in petsc 3.

    That is all dead code. It was an experiment that failed.

     Barry


>
> Thanks in advance,
>   Dave
>
>
>



More information about the petsc-users mailing list