Skip to content
Snippets Groups Projects
Commit 977e2380 authored by Van Dung Nguyen's avatar Van Dung Nguyen
Browse files

add critical point test function²

parent cf07fb26
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@ bool eigenSolver::solve(int numEigenValues, std::string which)
// set some default options
_try(EPSSetDimensions(eps, numEigenValues, PETSC_DECIDE, PETSC_DECIDE));
_try(EPSSetTolerances(eps, 1.e-7, 20));//1.e-7 20
//_try(EPSSetType(eps, EPSKRYLOVSCHUR)); //default
_try(EPSSetType(eps, EPSARNOLDI));
_try(EPSSetType(eps, EPSKRYLOVSCHUR)); //default
//_try(EPSSetType(eps, EPSARNOLDI));
//_try(EPSSetType(eps, EPSARPACK));
//_try(EPSSetType(eps, EPSPOWER));
......
......@@ -32,6 +32,13 @@ class eigenSolver{
int getNumEigenValues(){ return _eigenValues.size(); }
std::complex<double> getEigenValue(int num){ return _eigenValues[num]; }
std::vector<std::complex<double> > &getEigenVector(int num){ return _eigenVectors[num]; }
void clear(){
_eigenValues.clear();
_eigenVectors.clear();
};
std::complex<double>& getEigenVectorComp(int num, int com){
return _eigenVectors[num][com];
};
};
#else
......@@ -51,6 +58,8 @@ class eigenSolver{
int getNumEigenValues(){ return 0; }
std::complex<double> getEigenValue(int num){ return 0.; }
std::vector<std::complex<double> > &getEigenVector(int num){ return _dummy; }
void clear(){};
std::complex<double>& getEigenVectorComp(int num, int com) return 0;
};
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment