[petsc-dev] PetscBinaryRead for complex double dense matrices
Alexander Grayver
agrayver at gfz-potsdam.de
Thu Mar 31 09:20:36 CDT 2011
Hallo,
May be this topic has already been discussed, I've not done search, but
anyway it seems that PetscBinaryRead from 3.1-p7 doesn't support reading
complex double dense matrices.
I had to add this code:
if (nz == -1)
if strcmp(comp,'complex')
s = read(fd,2*m*n,'double');
A = reshape(complex(s(1:2:2*m*n),s(2:2:2*m*n)),n,m).';
else
s = read(fd,m*n,'double');
A = reshape(s,n,m)';
end
else
to be able to read them.
Regards,
Alexander
More information about the petsc-dev
mailing list