Skip to content

Commit

Permalink
small
Browse files Browse the repository at this point in the history
  • Loading branch information
hverhelst committed Jun 3, 2021
1 parent 635d036 commit bd69764
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 40 deletions.
30 changes: 10 additions & 20 deletions gsBucklingSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,11 @@ gsBucklingSolver<T,GEigsMode>::computeSparse_impl(T shift, index_t number, index
if (m_verbose) { gsInfo<<"." ; }
solver.compute(selectionRule,1000,1e-6,sortRule);

if (solver.info()==Spectra::CompInfo::Successful)
gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n";
else if (solver.info()==Spectra::CompInfo::NumericalIssue)
GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue");
else if (solver.info()==Spectra::CompInfo::NotConverging)
GISMO_ERROR("Spectra did not converge! Error code: NotConverging");
else if (solver.info()==Spectra::CompInfo::NotComputed)
GISMO_ERROR("Spectra did not converge! Error code: NotComputed");
else
GISMO_ERROR("No error code known");
if (solver.info()==Spectra::CompInfo::Successful) { gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n"; }
else if (solver.info()==Spectra::CompInfo::NumericalIssue){ GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue"); }
else if (solver.info()==Spectra::CompInfo::NotConverging) { GISMO_ERROR("Spectra did not converge! Error code: NotConverging"); }
else if (solver.info()==Spectra::CompInfo::NotComputed) { GISMO_ERROR("Spectra did not converge! Error code: NotComputed"); }
else { GISMO_ERROR("No error code known"); }

if (m_verbose) { gsInfo<<"." ; }
m_values = solver.eigenvalues();
Expand Down Expand Up @@ -107,16 +102,11 @@ gsBucklingSolver<T,GEigsMode>::computeSparse_impl(T shift, index_t number, index
if (m_verbose) { gsInfo<<"." ; }
solver.compute(selectionRule,1000,1e-6,sortRule);

if (solver.info()==Spectra::CompInfo::Successful)
gsDebug<<"\nSpectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n";
else if (solver.info()==Spectra::CompInfo::NumericalIssue)
GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue");
else if (solver.info()==Spectra::CompInfo::NotConverging)
GISMO_ERROR("Spectra did not converge! Error code: NotConverging");
else if (solver.info()==Spectra::CompInfo::NotComputed)
GISMO_ERROR("Spectra did not converge! Error code: NotComputed");
else
GISMO_ERROR("No error code known");
if (solver.info()==Spectra::CompInfo::Successful) { gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n"; }
else if (solver.info()==Spectra::CompInfo::NumericalIssue){ GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue"); }
else if (solver.info()==Spectra::CompInfo::NotConverging) { GISMO_ERROR("Spectra did not converge! Error code: NotConverging"); }
else if (solver.info()==Spectra::CompInfo::NotComputed) { GISMO_ERROR("Spectra did not converge! Error code: NotComputed"); }
else { GISMO_ERROR("No error code known"); }

if (m_verbose) { gsInfo<<"." ; }
m_values = solver.eigenvalues();
Expand Down
30 changes: 10 additions & 20 deletions gsModalSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,11 @@ gsModalSolver<T,GEigsMode>::computeSparse_impl(T shift, index_t number, index_t
if (m_verbose) { gsInfo<<"." ; }
solver.compute(selectionRule,1000,1e-10,sortRule);

if (solver.info()==Spectra::CompInfo::Successful)
gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n";
else if (solver.info()==Spectra::CompInfo::NumericalIssue)
GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue");
else if (solver.info()==Spectra::CompInfo::NotConverging)
GISMO_ERROR("Spectra did not converge! Error code: NotConverging");
else if (solver.info()==Spectra::CompInfo::NotComputed)
GISMO_ERROR("Spectra did not converge! Error code: NotComputed");
else
GISMO_ERROR("No error code known");
if (solver.info()==Spectra::CompInfo::Successful) { gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n"; }
else if (solver.info()==Spectra::CompInfo::NumericalIssue){ GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue"); }
else if (solver.info()==Spectra::CompInfo::NotConverging) { GISMO_ERROR("Spectra did not converge! Error code: NotConverging"); }
else if (solver.info()==Spectra::CompInfo::NotComputed) { GISMO_ERROR("Spectra did not converge! Error code: NotComputed"); }
else { GISMO_ERROR("No error code known"); }

if (m_verbose) { gsInfo<<"." ; }
m_values = solver.eigenvalues();
Expand Down Expand Up @@ -91,16 +86,11 @@ gsModalSolver<T,GEigsMode>::computeSparse_impl(T shift, index_t number, index_t
if (m_verbose) { gsInfo<<"." ; }
solver.compute(selectionRule,1000,1e-10,sortRule);

if (solver.info()==Spectra::CompInfo::Successful)
gsDebug<<"\nSpectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n";
else if (solver.info()==Spectra::CompInfo::NumericalIssue)
GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue");
else if (solver.info()==Spectra::CompInfo::NotConverging)
GISMO_ERROR("Spectra did not converge! Error code: NotConverging");
else if (solver.info()==Spectra::CompInfo::NotComputed)
GISMO_ERROR("Spectra did not converge! Error code: NotComputed");
else
GISMO_ERROR("No error code known");
if (solver.info()==Spectra::CompInfo::Successful) { gsDebug<<"Spectra converged in "<<solver.num_iterations()<<" iterations and with "<<solver.num_operations()<<"operations. \n"; }
else if (solver.info()==Spectra::CompInfo::NumericalIssue){ GISMO_ERROR("Spectra did not converge! Error code: NumericalIssue"); }
else if (solver.info()==Spectra::CompInfo::NotConverging) { GISMO_ERROR("Spectra did not converge! Error code: NotConverging"); }
else if (solver.info()==Spectra::CompInfo::NotComputed) { GISMO_ERROR("Spectra did not converge! Error code: NotComputed"); }
else { GISMO_ERROR("No error code known"); }

if (m_verbose) { gsInfo<<"." ; }
m_values = solver.eigenvalues();
Expand Down

0 comments on commit bd69764

Please sign in to comment.