Public Member Functions | Private Types | Private Attributes | List of all members
oomph::ANASAZI Class Reference

Class for the Anasazi eigensolver. More...

#include <trilinos_eigen_solver.h>

+ Inheritance diagram for oomph::ANASAZI:

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 $ \lambda_i = \alpha_i / \beta_i $ where $ \alpha_i $ is complex while $ \beta_i $ 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...
 
LinearAlgebraDistributiondistribution_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< STSCT
 
typedef SCT::magnitudeType MT
 
typedef Anasazi::MultiVec< STMV
 
typedef Anasazi::Operator< STOP
 
typedef Anasazi::MultiVecTraits< ST, MVMVT
 
typedef Anasazi::OperatorTraits< ST, MV, OPOPT
 

Private Attributes

Anasazi::OutputManager< ST > * Output_manager_pt
 Pointer to output manager. More...
 
LinearSolverLinear_solver_pt
 Pointer to a linear solver. More...
 
LinearSolverDefault_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...
 

Detailed Description

Class for the Anasazi eigensolver.

Definition at line 662 of file trilinos_eigen_solver.h.

Member Typedef Documentation

◆ MT

typedef SCT::magnitudeType oomph::ANASAZI::MT
private

Definition at line 667 of file trilinos_eigen_solver.h.

◆ MV

typedef Anasazi::MultiVec<ST> oomph::ANASAZI::MV
private

Definition at line 668 of file trilinos_eigen_solver.h.

◆ MVT

typedef Anasazi::MultiVecTraits<ST, MV> oomph::ANASAZI::MVT
private

Definition at line 670 of file trilinos_eigen_solver.h.

◆ OP

typedef Anasazi::Operator<ST> oomph::ANASAZI::OP
private

Definition at line 669 of file trilinos_eigen_solver.h.

◆ OPT

typedef Anasazi::OperatorTraits<ST, MV, OP> oomph::ANASAZI::OPT
private

Definition at line 671 of file trilinos_eigen_solver.h.

◆ SCT

typedef Teuchos::ScalarTraits<ST> oomph::ANASAZI::SCT
private

Definition at line 666 of file trilinos_eigen_solver.h.

◆ ST

typedef double oomph::ANASAZI::ST
private

Definition at line 665 of file trilinos_eigen_solver.h.

Constructor & Destructor Documentation

◆ ANASAZI() [1/2]

oomph::ANASAZI::ANASAZI ( )
inline

Constructor.

Definition at line 700 of file trilinos_eigen_solver.h.

References Output_manager_pt.

◆ ANASAZI() [2/2]

oomph::ANASAZI::ANASAZI ( const ANASAZI )
inline

Empty copy constructor.

Definition at line 720 of file trilinos_eigen_solver.h.

◆ ~ANASAZI()

virtual oomph::ANASAZI::~ANASAZI ( )
inlinevirtual

Destructor, delete the linear solver.

Definition at line 723 of file trilinos_eigen_solver.h.

Member Function Documentation

◆ linear_solver_pt() [1/2]

LinearSolver*& oomph::ANASAZI::linear_solver_pt ( )
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().

◆ linear_solver_pt() [2/2]

LinearSolver* const& oomph::ANASAZI::linear_solver_pt ( ) const
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.

◆ solve_eigenproblem() [1/2]

void oomph::ANASAZI::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 
)
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 $ \lambda_i = \alpha_i / \beta_i $ where $ \alpha_i $ is complex while $ \beta_i $ 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.

◆ solve_eigenproblem() [2/2]

void oomph::ANASAZI::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 
)
inlinevirtual

Member Data Documentation

◆ Default_linear_solver_pt

LinearSolver* oomph::ANASAZI::Default_linear_solver_pt
private

Pointer to a default linear solver.

Definition at line 680 of file trilinos_eigen_solver.h.

◆ Linear_solver_pt

LinearSolver* oomph::ANASAZI::Linear_solver_pt
private

Pointer to a linear solver.

Definition at line 677 of file trilinos_eigen_solver.h.

Referenced by linear_solver_pt(), and solve_eigenproblem().

◆ Output_manager_pt

Anasazi::OutputManager<ST>* oomph::ANASAZI::Output_manager_pt
private

Pointer to output manager.

Definition at line 674 of file trilinos_eigen_solver.h.

Referenced by ANASAZI().


The documentation for this class was generated from the following file: