29#ifndef OOMPH_EIGEN_SOLVER_HEADER
30#define OOMPH_EIGEN_SOLVER_HEADER
34#include <oomph-lib-config.h>
51 class DoubleMatrixBase;
91 Vector<std::complex<double>>& eigenvalue,
109 unsigned n = alpha.
size();
110 eigenvalue.resize(
n);
111 for (
unsigned i = 0;
i <
n;
i++)
113 eigenvalue[
i] = alpha[
i] / beta[
i];
131 Vector<std::complex<double>>& alpha,
186 Vector<std::complex<double>>& alpha,
198 Vector<std::complex<double>>& eigenvalue,
221 Vector<std::complex<double>>& alpha,
232 <<
"info = " <<
info << std::endl;
234 <<
"Diagnostics below are from \n\n"
235 <<
"http://www.netlib.org/lapack/explore-html/d9/d8e/"
236 "group__double_g_eeigen_ga4f59e87e670a755b41cbdd7e97f36bea.html"
244 error_stream <<
"The QZ iteration failed. No eigenvectors have been\n"
245 <<
"calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)\n"
246 <<
"should be correct for j=INFO+1,...,N, where \n"
247 <<
"info = " <<
info <<
" and N = " <<
n << std::endl;
249 else if (
info == (
n + 1))
253 else if (
info == (
n + 2))
258 <<
"Aborting here; if you know how to proceed then\n"
259 <<
"then implement ability to catch this error and continue\n";
271 <<
"info = " <<
info << std::endl;
273 <<
"http://www.netlib.org/lapack/explore-html/"
274 <<
"db/d55/group__complex16_g_eeigen_ga79fcce20c"
275 <<
"617429ccf985e6f123a6171.html" << std::endl;
282 error_stream <<
"The QZ iteration failed. No eigenvectors have been\n"
283 <<
"calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)\n"
284 <<
"should be correct for j=INFO+1,...,N, where \n"
285 <<
"info = " <<
info <<
" and N = " <<
n << std::endl;
287 else if (
info == (
n + 1))
291 else if (
info == (
n + 2))
296 <<
"Aborting here; if you know how to proceed then\n"
297 <<
"then implement ability to catch this error and continue\n";
Abstract base class for matrices of complex doubles – adds abstract interfaces for solving,...
Base class for any linear algebra object that is distributable. Just contains storage for the LinearA...
Base class for all EigenProblem solves. This simply defines standard interfaces so that different sol...
virtual ~EigenSolver()
Empty destructor.
EigenSolver(const EigenSolver &)
Empty copy constructor.
virtual void solve_eigenproblem(Problem *const &problem_pt, const int &n_eval, Vector< std::complex< double > > &eigenvalue, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &do_adjoint_problem=false)
Solve the real eigenproblem that is assembled by elements in a mesh in a Problem object....
virtual void solve_eigenproblem(Problem *const &problem_pt, const int &n_eval, Vector< std::complex< double > > &alpha, Vector< double > &beta, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &do_adjoint_problem=false)=0
Solve the real eigenproblem that is assembled by elements in a mesh in a Problem object....
EigenSolver()
Empty constructor.
const double & get_shift() const
Return the value of the (real) shift (const version)
void set_shift(const double &shift_value)
Set the value of the (real) shift.
double Sigma_real
Double value that represents the real part of the shift in shifted eigensolvers.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
Class for the LAPACK QZ eigensolver.
void ZGGEV_error(const int &info, const int &n)
Provide diagonstic for ZGGEV error return.
void solve_eigenproblem_helper(Problem *const &problem_pt, const int &n_eval, Vector< std::complex< double > > &alpha, Vector< double > &beta, Vector< DoubleVector > &eigenvector)
Helper function called from "raw" lapack code.
double tolerance_for_ccness_check() const
Access to tolerance for checking complex conjugateness of eigenvalues (const version)
void operator=(const LAPACK_QZ &)=delete
Broken assignment operator.
void DGGEV_error(const int &info, const int &n)
Provide diagonstic for DGGEV error return.
double Tolerance_for_ccness_check
Tolerance for checking complex conjugateness of eigenvalues.
void find_eigenvalues(const ComplexMatrixBase &A, const ComplexMatrixBase &M, Vector< std::complex< double > > &eigenvalue, Vector< Vector< std::complex< double > > > &eigenvector)
Find the eigenvalues of a complex generalised eigenvalue problem specified by . Note: the (real) shif...
virtual ~LAPACK_QZ()
Empty desctructor.
void solve_eigenproblem(Problem *const &problem_pt, const int &n_eval, Vector< std::complex< double > > &alpha, Vector< double > &beta, Vector< DoubleVector > &eigenvector_real, Vector< DoubleVector > &eigenvector_imag, const bool &do_adjoint_problem=false)
Solve the real eigenproblem that is assembled by elements in a mesh in a Problem object....
LAPACK_QZ()
Empty constructor.
double & tolerance_for_ccness_check()
Access to tolerance for checking complex conjugateness of eigenvalues.
LAPACK_QZ(const LAPACK_QZ &)=delete
Broken copy constructor.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).