Class for the Anasazi eigensolver. More...
#include <trilinos_eigen_solver.h>
Public Member Functions | |
ANASAZI () | |
Constructor. More... | |
ANASAZI (const ANASAZI &) | |
Empty copy constructor. More... | |
virtual | ~ANASAZI () |
Destructor, delete the linear solver. More... | |
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) |
Solve the real eigenproblem that is assembled by elements in a mesh in a Problem object. Note that the assembled matrices include the shift and are real. The eigenvalues and eigenvectors are, in general, complex. Eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs. There's a convenience wrapper to this function that simply computes these eigenvalues regardless. That version may die in NaN checking is enabled (via the fenv.h header and the associated feenable function). NOTE: While the above statement is true, the implementation of this function is actually everse engineered – trilinos actually computes the eigenvalues directly (and being an Arnoldi method it wouldn't be able to obtain any infinite/NaN eigenvalues anyway. More... | |
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) |
Solve the eigen problem. More... | |
LinearSolver *& | linear_solver_pt () |
Return a pointer to the linear solver object. More... | |
LinearSolver *const & | linear_solver_pt () const |
Return a pointer to the linear solver object (const version) More... | |
Public Member Functions inherited from oomph::EigenSolver | |
EigenSolver () | |
Empty constructor. More... | |
EigenSolver (const EigenSolver &) | |
Empty copy constructor. More... | |
virtual | ~EigenSolver () |
Empty destructor. More... | |
void | set_shift (const double &shift_value) |
Set the value of the (real) shift. More... | |
const double & | get_shift () const |
Return the value of the (real) shift (const version) More... | |
Public Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
DistributableLinearAlgebraObject () | |
Default constructor - create a distribution. More... | |
DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete | |
Broken copy constructor. More... | |
void | operator= (const DistributableLinearAlgebraObject &)=delete |
Broken assignment operator. More... | |
virtual | ~DistributableLinearAlgebraObject () |
Destructor. More... | |
LinearAlgebraDistribution * | distribution_pt () const |
access to the LinearAlgebraDistribution More... | |
unsigned | nrow () const |
access function to the number of global rows. More... | |
unsigned | nrow_local () const |
access function for the num of local rows on this processor. More... | |
unsigned | nrow_local (const unsigned &p) const |
access function for the num of local rows on this processor. More... | |
unsigned | first_row () const |
access function for the first row on this processor More... | |
unsigned | first_row (const unsigned &p) const |
access function for the first row on this processor More... | |
bool | distributed () const |
distribution is serial or distributed More... | |
bool | distribution_built () const |
if the communicator_pt is null then the distribution is not setup then false is returned, otherwise return true More... | |
void | build_distribution (const LinearAlgebraDistribution *const dist_pt) |
setup the distribution of this distributable linear algebra object More... | |
void | build_distribution (const LinearAlgebraDistribution &dist) |
setup the distribution of this distributable linear algebra object More... | |
Private Types | |
typedef double | ST |
typedef Teuchos::ScalarTraits< ST > | SCT |
typedef SCT::magnitudeType | MT |
typedef Anasazi::MultiVec< ST > | MV |
typedef Anasazi::Operator< ST > | OP |
typedef Anasazi::MultiVecTraits< ST, MV > | MVT |
typedef Anasazi::OperatorTraits< ST, MV, OP > | OPT |
Private Attributes | |
Anasazi::OutputManager< ST > * | Output_manager_pt |
Pointer to output manager. More... | |
LinearSolver * | Linear_solver_pt |
Pointer to a linear solver. More... | |
LinearSolver * | Default_linear_solver_pt |
Pointer to a default linear solver. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
void | clear_distribution () |
clear the distribution of this distributable linear algebra object More... | |
Protected Attributes inherited from oomph::EigenSolver | |
double | Sigma_real |
Double value that represents the real part of the shift in shifted eigensolvers. More... | |
Class for the Anasazi eigensolver.
Definition at line 662 of file trilinos_eigen_solver.h.
|
private |
Definition at line 667 of file trilinos_eigen_solver.h.
|
private |
Definition at line 668 of file trilinos_eigen_solver.h.
|
private |
Definition at line 670 of file trilinos_eigen_solver.h.
|
private |
Definition at line 669 of file trilinos_eigen_solver.h.
|
private |
Definition at line 671 of file trilinos_eigen_solver.h.
|
private |
Definition at line 666 of file trilinos_eigen_solver.h.
|
private |
Definition at line 665 of file trilinos_eigen_solver.h.
|
inline |
|
inline |
Empty copy constructor.
Definition at line 720 of file trilinos_eigen_solver.h.
|
inlinevirtual |
Destructor, delete the linear solver.
Definition at line 723 of file trilinos_eigen_solver.h.
|
inline |
Return a pointer to the linear solver object.
Definition at line 975 of file trilinos_eigen_solver.h.
References Linear_solver_pt.
Referenced by solve_eigenproblem().
|
inline |
Return a pointer to the linear solver object (const version)
Definition at line 981 of file trilinos_eigen_solver.h.
References Linear_solver_pt.
|
inlinevirtual |
Solve the real eigenproblem that is assembled by elements in a mesh in a Problem object. Note that the assembled matrices include the shift and are real. The eigenvalues and eigenvectors are, in general, complex. Eigenvalues may be infinite and are therefore returned as where is complex while is real. The actual eigenvalues may then be computed by doing the division, checking for zero betas to avoid NaNs. There's a convenience wrapper to this function that simply computes these eigenvalues regardless. That version may die in NaN checking is enabled (via the fenv.h header and the associated feenable function). NOTE: While the above statement is true, the implementation of this function is actually everse engineered – trilinos actually computes the eigenvalues directly (and being an Arnoldi method it wouldn't be able to obtain any infinite/NaN eigenvalues anyway.
Implements oomph::EigenSolver.
Definition at line 764 of file trilinos_eigen_solver.h.
References i.
|
inlinevirtual |
Solve the eigen problem.
Reimplemented from oomph::EigenSolver.
Definition at line 791 of file trilinos_eigen_solver.h.
References oomph::Problem::create_new_linear_algebra_distribution(), i, oomph::Problem::linear_solver_pt(), Linear_solver_pt, linear_solver_pt(), oomph::DistributableLinearAlgebraObject::nrow_local(), oomph::oomph_info, oomph::EigenSolver::Sigma_real, and oomph::Global_string_for_annotation::string().
|
private |
Pointer to a default linear solver.
Definition at line 680 of file trilinos_eigen_solver.h.
|
private |
Pointer to a linear solver.
Definition at line 677 of file trilinos_eigen_solver.h.
Referenced by linear_solver_pt(), and solve_eigenproblem().
|
private |
Pointer to output manager.
Definition at line 674 of file trilinos_eigen_solver.h.
Referenced by ANASAZI().