[petsc-users] petsc binary matrix file for dense matrices
    Umut Tabak 
    u.tabak at tudelft.nl
       
    Tue Apr 10 04:27:42 CDT 2012
    
    
  
Dear all,
For a simple interface to SLEPc, I need to write my sparse or dense 
matrices in PETSc binary format, at first, I need to solve reduced dense 
generalized eigenvalue problems which are in dense matrix format.
I first had a look at the MATLAB routines to read and write the matrices 
as examples and MatLoad function manual. I got the idea however I have a 
question regarding the write operation for dense matrices, in MATLAB 
code, it is given as
     [m,n] = size(A);
     write(fd,[1211214,m*n],'int32');
     write(fd,A,'double');
I guess the dense matrix is written as a 1d array, is this right? and 
there is no need for row and column information for the matrix. I am 
guessing that MATLAB writes the matrix, A, in column-major orientation, 
is not this a problem for petsc dense matrices? Most probably this info 
is somewhere in the documentation, but could not find. Any pointers are 
appreciated.
Best,
Umut
    
    
More information about the petsc-users
mailing list