[petsc-users] IS from DA by coordinates

2010-12-15 Thread Ethan Coon
On Wed, 2010-12-15 at 13:26 -0600, Barry Smith wrote: > Ethan, > > I don't think there is any reason to create a new DA or call > DAGetGlobalIndices().. Just call DAGetLocalToGlobalMappingBlock() on the > original DA Then > > for i in range(xs, xs+xl): > for j in range(ys, ys+yl): >for

[petsc-users] IS from DA by coordinates

2010-12-15 Thread Barry Smith
Ethan, I don't think there is any reason to create a new DA or call DAGetGlobalIndices().. Just call DAGetLocalToGlobalMappingBlock() on the original DA Then for i in range(xs, xs+xl): for j in range(ys, ys+yl): for k in range(zs, zs+zl): if vecc_a[k,j,i,:] == whatever_coordinat

[petsc-users] IS from DA by coordinates

2010-12-15 Thread Ethan Coon
Hi all, Is there a cleaner way to create an IS to a global vector on a DA for a subset of nodes using a coordinate value than the following? (Pardon my pseudo-code combo of python and c and imprecise arguments) // get the coordinates of the nodes DAGetCoordinateDA(da, dac) DAGetCoordinates(da,