Hi !!
In the following code, I am trying to define a matrix in CCS (which is equivalent to CSR for a symmetric matrix, right ?) in ARPACK++.
I have installed and patched ARPACK++.
(The matrix is not sparse, but still it should not give an error)
Code:
#include <iostream>
#include "arlsmat.h"//matrix class is here
#define N 3
using namespace std;
double acsr[]={7,1,1,
1,2,3,
1,3,6};//array with non-zero values
//actually, this is the whole matrix (there are no zero values !)
int ja[]={0,1,2,0,1,2,0,1,2};//column indices
int ia[]={0,3,6,9};//row indices
int main()
{
ARluSymMatrix<double> arr(N, 9, acsr, ja, ia); //default value of last parameter, uplo='L' (store lower triangle)
return 0;
}
This code gives me the error-
Arpack error in ARluSymMatrix:
efineMatrix.
-> Matrix data contain inconsistencies.
Why is this so ? I have checked the values of ia and ja by running intel MKl on the matrix to find the CSR (again, CSR=CCS for symmetric matrix, right ?--I am asking this because ARPACK++ uses CCS, not CSR), and the values are the same.
Is this some problem of 0 and 1 indexing ? Does ARPACK++ use 1 indexing ?
Thank you for your help in advance !!