[petsc-users] ublas sparse matrix bindings?

Barry Smith bsmith at mcs.anl.gov
Tue Jun 29 13:49:17 CDT 2010


On Jun 29, 2010, at 12:59 PM, Matthew Knepley wrote:

> On Tue, Jun 29, 2010 at 12:58 PM, Jed Brown <jed at 59a2.org> wrote:
> On Tue, 29 Jun 2010 12:43:36 -0500, Matthew Knepley <knepley at gmail.com> wrote:
> > 3) What you really want is to make MatScalar to be float. Then use
> >     doubles for the residual calculation.
> 
> I have no idea what Luke's usage is, but MatScalar != PetscScalar is not
> currently supported.
> 
>  http://lists.mcs.anl.gov/pipermail/petsc-dev/2009-June/001417.html
> 
> I'm intrigued by it because my matrices are only for preconditioning
> purposes, but haven't caught the bug to try fixing it since the above
> thread.
> 
> If someone really needs it, I will fix it.

   It is a major mother to fix. Unless we can come up with a new clever paradigm it will be a big mess of ugly nasty code to "fix". The problem is that in many places in the code, values in the arrays of the matrices are passed as values through PETSc functions (which are all prototyped as PetscScalar) so at each passage one must be write code to convert from double to single pass in then free the copy.

   Barry


> 
>    Matt
>  
> 
> Jed
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100629/b387a255/attachment.htm>


More information about the petsc-users mailing list