[petsc-dev] DMDABoundaryType

Lisandro Dalcin dalcinl at gmail.com
Fri Mar 11 10:50:35 CST 2011


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...



-- 
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



More information about the petsc-dev mailing list