[petsc-dev] DMDABoundaryType

Ethan Coon ecoon at lanl.gov
Fri Mar 11 11:01:47 CST 2011


It's not hard, just a lot of code.  GetLocalInfo(), the DM_DA struct,
the DMDALocalInfo struct, etc etc.  I started going through this,
shouldn't take long.  Barry can take it or leave it ;)

Not that I'm volunteering, but at what point does this all go to ADDA?

Ethan

On Fri, 2011-03-11 at 13:50 -0300, Lisandro Dalcin wrote:
> On 11 March 2011 13:38, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> > 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.
> >
> 
> And DMDAGetInfo() ... well, it seems not so easy now...
> 
> 
> 

-- 
------------------------------------
Ethan Coon
Post-Doctoral Researcher
Applied Mathematics - T-5
Los Alamos National Laboratory
505-665-8289

http://www.ldeo.columbia.edu/~ecoon/
------------------------------------




More information about the petsc-dev mailing list