On 11 March 2011 13:29, Ethan Coon <ecoon at lanl.gov> wrote: > On Thu, 2011-03-10 at 23:53 -0300, Lisandro Dalcin wrote: >> While updating petsc4py for the latest DMDA chages, and alto taking >> into account some new in NumPy C API related to neighborhood >> iterators, ?I've got new idea. What about the API below?: >> >> enum DMDABoundaryType: >> ? ? DMDA_BOUNDARY_NONE = 0 >> ? ? DMDA_BOUNDARY_GHOSTED = 1 >> ? ? DMDA_BOUNDARY_MIRROR = 2 >> ? ? DMDA_BOUNDARY_PERIODIC = 4 >> >> PetscErrorCode DMDASetBoundaryType(DM dm, DMDABoundaryType bx, >> DMDABoundaryType by, DMDABoundaryType bz) >> >> Changes for GHOSTED and PERIODIC should be easy >> (http://lkml.org/lkml/2000/8/25/132) ;-). >> >> The new MIRROR boundary type could be implemented later. >> > > How does this fit into DMDACreate*D()? ?Are you changing the create API > as well? > > PetscErrorCode DMDACreate3d(MPI_Comm comm,DMDABoundaryType bx, > DMDABoundaryType by, DMDABoundaryType bz, DMDAStencilType > stencil_type,PetscInt M,PetscInt N,PetscInt P,PetscInt m,PetscInt > n,PetscInt p,PetscInt dof,PetscInt s,const PetscInt lx[],const PetscInt > ly[],const PetscInt lz[],DM *da) >
Ups, I forgot about them.. Yes, these should be updated, too. Anyway, these are convenience wrappers for create+set+setup. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo 3000 Santa Fe, Argentina Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169