[petsc-dev] DAGetOwnershipRanges or DAGetVertexDivision

Barry Smith bsmith at mcs.anl.gov
Wed Sep 22 14:05:02 CDT 2010


On Sep 22, 2010, at 1:57 PM, Jed Brown wrote:

> I was looking for the symmetric function to DASetVertexDivision, so I
> implemented DAGetVertexDivision (which returns the array whether the
> user set it or PETSc generated it).  Then I found DAGetOwnershipRanges
> which has the same interface, but returns NULL if the user didn't set
> the array.  My implementation creates the arrays lazily, so the
> operation is collective.
> 
> 1. The interface should be symmetric, which name?

   DASet/GetOwnerShipRanges() since that is the language used for Vecs and Mats also

> 
> 2. Should da->lx,ly,lz always be created, or should they remain empty
> until the user requests it?  Note that the latter makes the Get
> collective.

   It's cheap to store so I guess one could just always have them.

   Barry


> 
> Jed




More information about the petsc-dev mailing list