Thanks for the response. Thats unfortunate as i use many different types of matrices that i would like use with petsc.
I'm not much of a c++ whiz, but i'm curious if something like an adaptor would be possible that would make a (float *) behave like a (petscscalar *) as far as petsc was concerned? Thoughts? -Luke On 06/29/2010 10:31 AM, 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 >> >> 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 >
