Memory preallocation in python
Marek Wojciechowski
mwojc at p.lodz.pl
Mon Aug 21 07:58:08 CDT 2006
> 1) It would have to be for a subclass like MatSeqAIJ
>
> 2) It is setPreallocation()
>
> Thanks,
>
> Matt
>
Honestly, I can find neither subclass MatSeqAIJ nor the method
setPreallocation(). I create matrix as follows:
import PETSc.Mat
K = PETSc.Mat.Mat() ## as far as i know this is the only way to create
matrix in python
K.setSizes(size, size, Size, Size)
K.setFromOptions()
K.setType("seqaij") ## i choose matrix type here, I don't know another
way...
Where is the moment to preallocate?
--
Marek Wojciechowski
More information about the petsc-users
mailing list