Re: [petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Sajid Ali via petsc-users
I use spack variants which do the same thing behind the scenes. Thanks ! On Fri, Nov 30, 2018 at 5:10 PM Smith, Barry F. wrote: > >I assume you are ./configure PETSc with --with-scalar-type=complex? If > so, the values in the file are the real and imaginary parts interlaced: > That is > r0

Re: [petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Smith, Barry F. via petsc-users
I assume you are ./configure PETSc with --with-scalar-type=complex? If so, the values in the file are the real and imaginary parts interlaced: That is r0 i0 r1 i1 where r0 is the first matrix entry's real part and i0 is the first matrix imaginary part. Barry > On Nov 30,

Re: [petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Sajid Ali via petsc-users
If the matrix is filled with complex numbers is each complex number stored as a sequences of doubles ? Or is it better to split the matrix into real/imaginary and store each part separately?

Re: [petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Sajid Ali via petsc-users
Thanks for the advice! I'll look into using the binary format then. On Fri, Nov 30, 2018 at 4:47 PM Smith, Barry F. wrote: > > I would start by simply using the PETSc binary dense format for the > matrices; it will work find for 1d (and 2d) development work with dozens of > processes.

Re: [petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Smith, Barry F. via petsc-users
I would start by simply using the PETSc binary dense format for the matrices; it will work find for 1d (and 2d) development work with dozens of processes. Latter, if need be, you can switch to the HDF5, the only difference in your code would be the viewer you MatLoad() from will be an

[petsc-users] Load dense matrices from hdf5

2018-11-30 Thread Sajid Ali via petsc-users
Hi, I'm trying to solve the Helmholtz equation in 1D for x-rays which roughly like : u_dot = a*u_xx + h(t)*u I've already implemented the case where h(t) is always zero (free-space) in PETSc as per the last box on