[petsc-users] ublas sparse matrix bindings?
Satish Balay
balay at mcs.anl.gov
Tue Jun 29 09:31:35 CDT 2010
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
>
> which seem to suggest that I can use command line flags --with-scalar-type
> etc to control these typedefs is it possible to control these in the code
> directly if so how?
They are configure/compile time constants - and one can't have 2 types
in the same code. By default PetscScalar is 'double; and 'PetscInt is 'int'.
Satish
More information about the petsc-users
mailing list