← Back to team overview

dolfin team mailing list archive

Re: [HG] Split la unit tests into separate files.

 

On Fri, Aug 11, 2006 at 02:24:59PM +0200, Johan Jansson wrote:
> On Fri, Aug 11, 2006 at 12:46:12PM +0200, Garth N. Wells wrote:
> > What's the status with using linear algebra from pyDOLFIN? Is it 
> > possible yet to assign vectors, add vectors and so forth?
> > 
> > Garth
> > 
> 
> Previously most operators have existed. Assignment is not redefinable
> in Python, so I renamed it "copy()". operator+=() etc. are
> automatically translated.
> 
> I would vote for keeping a small set of operators in GenericVector
> which are guaranteed to be provided by PyDOLFIN. Otherwise we will
> have different syntax for uBlasVector and PETScVector.
> 
>   Johan

Could we define a GenericMatrixElement in the same way as we have
defined a PETScMatrixElement to allow access according to

    a = A(i, j)
    A(i, j) = a

?

This will be *slow* for PETSc, but fast for uBlas. The question is if
we can do this without introducing any overhead when indexing a
matrix that is known to be a uBlasMatrix at compile-time.

/Anders


Follow ups

References