Reindend, add also the 'coarse values' calculation
Former-commit-id: 2dc73a2875823cae187585787bd4d344dea232f9
This commit is contained in:
parent
5471367aad
commit
1aa9890155
23
qpms/beyn.c
23
qpms/beyn.c
|
@ -97,8 +97,8 @@ BeynSolver *CreateBeynSolver(int M, int L)
|
|||
#if 0
|
||||
// internal workspace: need storage for 2 MxL matrices
|
||||
// plus 3 LxL matrices
|
||||
#define MLBUFFERS 2
|
||||
#define LLBUFFERS 3
|
||||
#define MLBUFFERS 2
|
||||
#define LLBUFFERS 3
|
||||
size_t ML = MLMax*L, LL = L*L;
|
||||
#endif
|
||||
|
||||
|
@ -347,7 +347,7 @@ int BeynSolve(BeynSolver *Solver, beyn_function_M_t M_function,
|
|||
printf("Applying Beyn method with z0=%s,R=%e,N=%i...\n",z2s(z0),Rx,N);
|
||||
else
|
||||
printf("Applying Beyn method with z0=%s,Rx=%e,Ry=%e,N=%i...\n",z2s(z0),Rx,Ry,N);
|
||||
*/
|
||||
*/
|
||||
const int M = Solver->M;
|
||||
const int L = Solver->L;
|
||||
gsl_matrix_complex *A0 = Solver->A0;
|
||||
|
@ -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);
|
||||
// Log("{K,KCoarse}={%i,%i}",K,KCoarse);
|
||||
/*
|
||||
for(int k=0; k<EVErrors->N && k<Eigenvalues->N; k++)
|
||||
{ EVErrors->ZV[k] -= Eigenvalues->ZV[k];
|
||||
int KCoarse = ProcessAMatrices(Solver, M_function, Params, A0Coarse, A1Coarse, z0, EVErrors, Eigenvectors);
|
||||
// Log("{K,KCoarse}={%i,%i}",K,KCoarse);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue