[petsc-dev] PetscBinaryRead for complex double dense matrices
Barry Smith
bsmith at mcs.anl.gov
Thu Mar 31 09:51:09 CDT 2011
Thank you for letting us know. This is now fixed in petsc-dev
Barry
On Mar 31, 2011, at 9:20 AM, Alexander Grayver wrote:
> 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