[petsc-users] ublas sparse matrix bindings?

Umut Tabak u.tabak at tudelft.nl
Tue Jun 29 09:44:52 CDT 2010


Satish Balay wrote:
> On Tue, 29 Jun 2010, Luke Bloy wrote:
>
>   
>> Thanks for the quick responses.
>>
>> my matrices are fairly large 80,000 x 80,000 and not too sparse so I'd like to
>> avoid any serialization if possible.
>>
>> I've worked out how to use MatCreateSeqAIJWithArrays so long as i control the
>> types  used in my ublas matrix, which is something i'd like to avoid doing if
>> possible.
>>
>> unfortunately I'm not sure how to control the types petscscalar and petscint.
>> I've looked through
>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/include/petsc.h.html#PetscScalar
>> and
>> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Sys/PetscScalar.html
>>     
I did sth like this some time ago, where the matrices were in CSR format 
"compressed matrix", I guess, in ublas, That was not that difficult, I 
did that with MatSetValues, if I can find some code I will post that, 
maybe that could help.
Best,
Umut


More information about the petsc-users mailing list