80 int n = problem_pt->
ndof();
118 for (
int i = 0;
i <
n; ++
i)
120 for (
int j = 0;
j <
n; ++
j)
141 double* beta =
new double[
n];
149 std::vector<double>
work(1, 0.0);
220 for (
int i = 0;
i <
n; ++
i)
235 for (
int k = 0;
k <
n; ++
k)
276 throw OomphLibError(
"Solving an adjoint eigenproblem is not currently "
277 "implemented for LAPACK_QZ.",
298 unsigned n = problem_pt->
ndof();
311 for (
unsigned j = 0;
j <
n; ++
j)
340 error_stream <<
"Non-zero imaginary part of eigenvalue "
344 <<
"isn't the negative of its subsequent value : "
347 <<
" is greater than Tolerance_for_ccness_check = "
360 <<
" doesn't agree with its supposed-to-be cc counterpart : "
362 <<
"Their difference "
364 <<
" is greater than Tolerance_for_ccness_check = "
381 for (
unsigned j = 0;
j <
n; ++
j)
404 Vector<std::complex<double>>& eigenvalue,
412 <<
" ignored in LAPACK_QZ::find_eigenvalues\n";
435 for (
int i = 0;
i <
n; ++
i)
437 for (
int j = 0;
j <
n; ++
j)
449 double* alpha =
new double[2 *
n];
450 double* beta =
new double[2 *
n];
458 std::vector<double>
work(2, 0.0);
463 std::vector<double>
rwork(8 *
n, 0.0);
526 eigenvalue.resize(
n);
530 for (
int i = 0;
i <
n; ++
i)
533 std::complex<double>
num(alpha[2 *
i], alpha[2 *
i + 1]);
534 std::complex<double>
den(beta[2 *
i], beta[2 *
i + 1]);
544 for (
int k = 0;
k <
n; ++
k)
A class for compressed row matrices. This is a distributable object.
Abstract base class for matrices of complex doubles – adds abstract interfaces for solving,...
virtual unsigned long nrow() const =0
Return the number of rows of the matrix.
LinearAlgebraDistribution * distribution_pt() const
access to the LinearAlgebraDistribution
void build_distribution(const LinearAlgebraDistribution *const dist_pt)
setup the distribution of this distributable linear algebra object
double Sigma_real
Double value that represents the real part of the shift in shifted eigensolvers.
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.
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...
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....
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
virtual void get_eigenproblem_matrices(CRDoubleMatrix &mass_matrix, CRDoubleMatrix &main_matrix, const double &shift=0.0)
Get the matrices required by a eigensolver. If the shift parameter is non-zero the second matrix will...
unsigned long ndof() const
Return the number of dofs.
OomphCommunicator * communicator_pt()
access function to the oomph-lib communicator
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).