message: Bugfix to support rectangular matrices
diff: @@ -3169,6 +3169,10 @@ SparseMatrix * ComplexSparseMatrix::GetSystemMatrix() const
  const int nrows_i = (A_i)?A_i->Height():0;
  const int nrows = std::max(nrows_r, nrows_i);
  + const int ncols_r = (A_r)?A_r->Width():0;
  + const int ncols_i = (A_i)?A_i->Width():0;
  + const int ncols = std::max(ncols_r, ncols_i);
  +
  const int *I_r = (A_r)?A_r->GetI():NULL;
  const int *I_i = (A_i)?A_i->GetI():NULL;
  @@ -3203,7 +3207,7 @@ SparseMatrix * ComplexSparseMatrix::GetSystemMatrix() const
  J[I[i] + j] = J_r[I_r[i] + j];
  D[I[i] + j] = D_r[I_r[i] + j];
  - J[I[i+nrows] + off_i + j] = J_r[I_r[i] + j] + nrows;
  + J[I[i+nrows] + off_i + j] = J_r[I_r[i] + j] + ncols;
  D[I[i+nrows] + off_i + j] = factor*D_r[I_r[i] + j];
  }
  }
  @@ -3212,7 +3216,7 @@ SparseMatrix * ComplexSparseMatrix::GetSystemMatrix() const
  const int off_r = (I_r)?(I_r[i+1] - I_r[i]):0;
  for (int j=0; j<I_i[i+1] - I_i[i]; j++)
  {
  - J[I[i] + off_r + j] = J_i[I_i[i] + j] + nrows;
  + J[I[i] + off_r + j] = J_i[I_i[i] + j] + ncols;
  D[I[i] + off_r + j] = -D_i[I_i[i] + j];
  J[I[i+nrows] + j] = J_i[I_i[i] + j];
  