[petsc-dev] [petsc-users] ublas sparse matrix bindings?

Matthew Knepley knepley at gmail.com
Tue Jun 29 15:26:38 CDT 2010


I am not so sure here. Our problem is not with type parametrization so much
I think (since MatScalar is there)
but with mixing this with another value type. I suspect that a templated
version would have 1G of compiler
errors right now.

   Matt

On Tue, Jun 29, 2010 at 1:53 PM, Aron Ahmadia <aron.ahmadia at kaust.edu.sa>wrote:

> This might be one of the rare cases which makes a strong argument for C++
> template metaprogramming.  A well-defined extension could make this
> seamless.  I know this is already one of the strengths of the Eigen
> libraries (freedom to mix types).
>
> A
>
> On Tue, Jun 29, 2010 at 2:49 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>> 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
>>
>>
>>
>


-- 
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-dev/attachments/20100629/6854a7d4/attachment.html>


More information about the petsc-dev mailing list