On Aug 4, 2010, at 7:04 AM, Lisandro Dalcin wrote: > On 4 August 2010 01:30, Barry Smith <bsmith at mcs.anl.gov> wrote: >> >> On Jun 22, 2010, at 4:21 PM, Jed Brown wrote: >> >>> On Tue, 22 Jun 2010 11:30:47 -0500, Barry Smith <bsmith at mcs.anl.gov> >>> wrote: >>>> Actually we should add the same support for matrices and then the >>>> inconsistency would disappear. >>> >> >> Because we got an email from an intelligent person who went down the wrong >> track because of this inconsistency I have implemented this. Now the >> MatView() also remaps back to the natural ordering. >> > > Sorry, but I'm still lost with you concept of "inheritance" :-).
A DA MPI vector isa MPI Vec with a new VecView and a DA MPI Mat isa MPI Mat with a new MatView() the simplest implementation inheritance you can think of. > So > would you consider a good pattern to change (if you were able to) > function pointers in a C++ virtual table? Do you like Python's > new.instacemethod(...) and think it is a proper way to implement APIs? In general I favor the idea of being able to dynamic add new methods to objects; the specifics of instancemethod() I don't know. In fact, I got the original idea of PetscObjectComposeFunction() from the ability to do this in Objective C. Barry > ... I still think we should have DAVecView() and DAMatView(). > > > -- > Lisandro Dalcin > --------------- > CIMEC (INTEC/CONICET-UNL) > Predio CONICET-Santa Fe > Colectora RN 168 Km 472, Paraje El Pozo > Tel: +54-342-4511594 (ext 1011) > Tel/Fax: +54-342-4511169
