Reindend, add also the 'coarse values' calculation

Former-commit-id: 2dc73a2875823cae187585787bd4d344dea232f9
This commit is contained in:
Marek Nečada 2019-08-27 20:41:30 +03:00
parent 5471367aad
commit 1aa9890155
1 changed files with 101 additions and 100 deletions

View File

@ -417,21 +417,22 @@ int BeynSolve(BeynSolver *Solver, beyn_function_M_t M_function,
}
gsl_vector_complex *Eigenvalues = Solver->Eigenvalues;
//gsl_vector_complex *EVErrors = Solver->EVErrors;
gsl_vector_complex *EVErrors = Solver->EVErrors;
gsl_matrix_complex *Eigenvectors = Solver->Eigenvectors;
int K = ProcessAMatrices(Solver, M_function, Params, A0, A1, z0, Eigenvalues, Eigenvectors);
//int KCoarse = ProcessAMatrices(Solver, UserFunc, Params, A0Coarse, A1Coarse, z0, EVErrors, Eigenvectors);
int KCoarse = ProcessAMatrices(Solver, M_function, Params, A0Coarse, A1Coarse, z0, EVErrors, Eigenvectors);
// Log("{K,KCoarse}={%i,%i}",K,KCoarse);
/*
for(int k=0; k<EVErrors->N && k<Eigenvalues->N; k++)
{ EVErrors->ZV[k] -= Eigenvalues->ZV[k];
gsl_blas_zaxpy(gsl_complex_rect(-1,0), Eigenvalues, EVErrors);
#if 0
for(size_t k = 0; k < EVErrors->size && k < Eigenvalues->size; ++k) {
EVErrors->ZV[k] -= Eigenvalues->ZV[k];
EVErrors->ZV[k] = cdouble( fabs(real(EVErrors->ZV[k])),
fabs(imag(EVErrors->ZV[k]))
);
}
*/
#endif
return K;
}