[petsc-users] Assemble a Jacobian for a DMComposite object.

Mike McCourt mccomic at mcs.anl.gov
Fri Mar 19 15:28:59 CDT 2010


    Sorry, MatSetValuesStencil() only "knows" about DA's, not more  
general DMs. In the arguments to MatSetValuesStencil() there is no way  
to indicate anything except the location in a single regular grid. We  
all need to think about what makes sense for an interface for  
composite grids.

I think we're working on this now.  But it's not ready yet.

-Mike

----- Original Message -----
From: "(Rebecca) Xuefei YUAN" <xy2102 at columbia.edu>
To: "PETSc users list" <petsc-users at mcs.anl.gov>
Sent: Friday, March 19, 2010 3:24:10 PM GMT -06:00 US/Canada Central
Subject: [petsc-users] Assemble a Jacobian for a DMComposite object.

Dear all,

I am working on assembling a Jacobian for a DMComposite object.

In FormJacobian(), I am not sure how to use MatSetValuesStencil() in  
this case, so I use MatSetValues() to assemble this Jacobian row by row.

MatSetValues(Mat mat,PetscInt m,const PetscInt idxm[],PetscInt n,const  
PetscInt idxn[],const PetscScalar v[],InsertMode addv)

To specify the row and columns' global indices idxm[] and idxn[], I  
need processor (rank=i) to receive (info.xm*info.ym) from each  
processor (rank<i), totally n(=rank) ints,  and send its  
info.xm*info.ym to each processor (rank<i), totally m (=size-rank-1).

Is there an existing call for that?

Thanks a lot!

Rebecca




-- 
(Rebecca) Xuefei YUAN
Department of Applied Physics and Applied Mathematics
Columbia University
Tel:917-399-8032
www.columbia.edu/~xy2102



More information about the petsc-users mailing list