Matthew Knepley knepley at
Wed Jun 14 12:18:45 CDT 2006

On 6/14/06, Christophe Picard <picard2 at> wrote:
> Hello,
> I have been trying to used DMMG and DA in the following way.
> I have a DA with several degree of freedom, and several of them have the
> same
> jacobian but different RHS (what I want to do is solve Ax1=b1(x1,x,2,x3),
> Ax2=b2(x1,x2,x3)).
> So how does DMMGsolve handle that?

I am not sure I understand completely what you want, but I will start with
DA. DA objects only encode a data layout. All data resides in Vec and Mat
objects. So, if you have several fields that you want to solve separately,
create a DA with 1 dof, and use several Vecs. Since the Jacobian is the
you will have 1 Mat.


Since x1,x2,x3 are DA variables, but I want to solve only x1 and x2 using
> the
> same Jacobian, I figured that I can have some kind of switch in the
> definition of the RHS function that will make the selection, and calling
> dmmgSolve several times, but by modifyng the switch trough DMMGSetUser and
> DMMGGetUser before each call. But then where the output of the solve
> operation is stored? The way I understand it now is that it is
> overwritting
> x1. Am I right?
> Is there a way to solve x1 and x2 simultaneously, I mean by only 1 call of
> dmmgSolve, and without solving x3?
> I hope I am not too confusing.
> Thank you,
> Christophe
> ---

"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list