ufuncs, iterators

Barry Smith bsmith at mcs.anl.gov
Fri Aug 19 09:01:15 CDT 2005


  After sleeping on it, it may be ok to include these methods
in Mat as methods for "filling up matrices" so long as in the 
end you end up with a Mat that you then use as an operator.

  But I'd still like to see/understand a little more of the "construction" 
process. Classically one would do that as loops over elements and perform all 
the computations for the one element before moving to the next. In Matlab this 
can be done instead (with some impact on performance) using a sequence of array 
operations (with the loop inside each array operation). In the past, since PETSc 
was used exclusively from C/C++ and Fortran users built their matrices 
(operators) using the "classical" approach, now with python it appears 
reasonable that we may need to add the "array" approach.

   Barry

On Fri, 19 Aug 2005, Matthew Knepley wrote:

> Simon Burton <simon at arrowtheory.com> writes:
> 
> > On Thu, 18 Aug 2005 19:57:02 -0500
> > Matthew Knepley <knepley at mcs.anl.gov> wrote:
> >
> >> 
> >> > (d) m=exp(m)		(pointwise exp)
> >> 
> >>   We could add pointwise operations just like the VecPointwise*().
> >> 
> >>      Matt
> >
> > Yes, we need MatPointwiseMult aswell.
> >
> > Should I make a start on this ?
> 
>   I am thinking more about what Barry said. The VecPointwise*() operations
> can be given a solid mathematical interpretation in terms of spinor operations.
> However, I do not see anything like that for the Mat stuff yet. We need to
> understand the mathematicas better.
> 
>            Matt
> 




More information about the petsc-dev mailing list