[petsc-dev] pointing out raw pointer in CUSPARRAY

Pilhwa Lee leep at cims.nyu.edu
Tue Feb 12 18:31:26 CST 2013


Dear folks,

I try to get PetscScalar array from CUSPARRAY as follows:

CUSPARRAY *cusparray;
PetscScalar *abc;

abc = VecCUSPCastToRawPtr(*cusparray);

std::cout << abc[0];

However, there comes a segmentation violation error. Any opinions are welcome. Thanks.

With best regards,
Pilhwa



More information about the petsc-dev mailing list