CHROMA
Public Member Functions | Private Member Functions | Private Attributes | List of all members

Polynomial operator. More...

#include <polynomial_op.h>

Inheritance diagram for Chroma::lpoly< T, P, Q >:
Chroma::PolyLinearOperator< T, P, Q > Chroma::DiffLinearOperator< T, P, Q > Chroma::LinearOperator< T >

Public Member Functions

 lpoly (Handle< DiffLinearOperator< T, P, Q > > m_, int degree_, const Real &lower_bound_, const Real &upper_bound_, int ord)
 
 lpoly (Handle< DiffLinearOperator< T, P, Q > > m_, int degree_, const Real &lower_bound_, const Real &upper_bound_)
 
 ~lpoly ()
 
const FermBC< T, P, Q > & getFermBC () const
 Return the fermion BC object for this linear operator. More...
 
const Subset & subset () const
 Subset comes from underlying operator. More...
 
multi1d< DComplex > Roots () const
 Returns the roots. More...
 
multi1d< DComplex > MonomialNorm () const
 Returns the roots. More...
 
void Qsq (T &y, const T &x) const
 Apply the underlying (Mdagger M) operator. More...
 
void applyChebInv (T &x, const T &b) const
 
void operator() (T &chi, const T &b, PlusMinus isign) const
 Here is your apply function. More...
 
void applyA (T &chi, const T &b, PlusMinus isign) const
 Apply the A or A_dagger piece: P(Qsq) = A_dagger(Qsq) * A(Qsq) More...
 
void deriv (P &ds_u, const T &chi, const T &psi, PlusMinus isign) const
 Apply the derivative of the linop. More...
 
- Public Member Functions inherited from Chroma::PolyLinearOperator< T, P, Q >
virtual ~PolyLinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
- Public Member Functions inherited from Chroma::DiffLinearOperator< T, P, Q >
virtual ~DiffLinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign, const Real &epsilon) const
 Apply the derivative of the operator onto a source std::vector to some precision. More...
 
virtual void derivMultipole (P &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign) const
 Return the force for multiple poles. More...
 
- Public Member Functions inherited from Chroma::LinearOperator< T >
virtual ~LinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void operator() (T &chi, const T &psi, enum PlusMinus isign, Real epsilon) const
 Apply the operator onto a source std::vector to some precision. More...
 
virtual unsigned long nFlops () const
 

Private Member Functions

int bitrevers (int n, int maxBits)
 
void GetRoots (multi1d< DComplex > &r, multi1d< DComplex > &ic)
 

Private Attributes

Handle< DiffLinearOperator< T, P, Q > > M
 
Double LowerBound
 
Double UpperBound
 
int degree
 
multi1d< DComplex > root
 
multi1d< DComplex > inv_c
 
Real c_Zero
 

Detailed Description

template<typename T, typename P, typename Q>
class Chroma::lpoly< T, P, Q >

Polynomial operator.

Definition at line 26 of file polynomial_op.h.

Constructor & Destructor Documentation

◆ lpoly() [1/2]

template<typename T , typename P , typename Q >
Chroma::lpoly< T, P, Q >::lpoly ( Handle< DiffLinearOperator< T, P, Q > >  m_,
int  degree_,
const Real &  lower_bound_,
const Real &  upper_bound_,
int  ord 
)
inline

Definition at line 84 of file polynomial_op.h.

References i, j, Chroma::k, and r().

◆ lpoly() [2/2]

template<typename T , typename P , typename Q >
Chroma::lpoly< T, P, Q >::lpoly ( Handle< DiffLinearOperator< T, P, Q > >  m_,
int  degree_,
const Real &  lower_bound_,
const Real &  upper_bound_ 
)
inline

Definition at line 130 of file polynomial_op.h.

References i, and r().

◆ ~lpoly()

template<typename T , typename P , typename Q >
Chroma::lpoly< T, P, Q >::~lpoly ( )
inline

Definition at line 183 of file polynomial_op.h.

Member Function Documentation

◆ applyA()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::applyA ( T chi,
const T b,
PlusMinus  isign 
) const
inlinevirtual

Apply the A or A_dagger piece: P(Qsq) = A_dagger(Qsq) * A(Qsq)

Implements Chroma::PolyLinearOperator< T, P, Q >.

Definition at line 259 of file polynomial_op.h.

References Chroma::b, chi, i, Chroma::isign, Chroma::MINUS, and Chroma::PLUS.

◆ applyChebInv()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::applyChebInv ( T x,
const T b 
) const
inline

Definition at line 209 of file polynomial_op.h.

References Chroma::a, Chroma::b, Chroma::d, m, Chroma::p, r(), x, and y.

◆ bitrevers()

template<typename T , typename P , typename Q >
int Chroma::lpoly< T, P, Q >::bitrevers ( int  n,
int  maxBits 
)
inlineprivate

Definition at line 44 of file polynomial_op.h.

References i, and n.

◆ deriv()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::deriv ( P ds_u,
const T chi,
const T psi,
PlusMinus  isign 
) const
inlinevirtual

Apply the derivative of the linop.

QDPIO::cout<<"CheckProducts: "; QDPIO::cout<< innerProduct(psi_products[0],psi_products[degree])<<std::endl ; for(int n(0); n < degree+1; ++n){
QDPIO::cout<<"CheckProducts: "<<n<< ": " ; QDPIO::cout<< innerProduct(chi_products[n],psi_products[n])<<std::endl ;

}

Reimplemented from Chroma::DiffLinearOperator< T, P, Q >.

Definition at line 293 of file polynomial_op.h.

References chi, Chroma::d, Chroma::MINUS, n, Nd, Chroma::PLUS, psi, and Chroma::zero.

◆ getFermBC()

template<typename T , typename P , typename Q >
const FermBC<T,P,Q>& Chroma::lpoly< T, P, Q >::getFermBC ( ) const
inlinevirtual

Return the fermion BC object for this linear operator.

Implements Chroma::DiffLinearOperator< T, P, Q >.

Definition at line 186 of file polynomial_op.h.

◆ GetRoots()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::GetRoots ( multi1d< DComplex > &  r,
multi1d< DComplex > &  ic 
)
inlineprivate

◆ MonomialNorm()

template<typename T , typename P , typename Q >
multi1d<DComplex> Chroma::lpoly< T, P, Q >::MonomialNorm ( ) const
inline

Returns the roots.

Definition at line 197 of file polynomial_op.h.

◆ operator()()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::operator() ( T chi,
const T b,
PlusMinus  isign 
) const
inlinevirtual

Here is your apply function.

Implements Chroma::LinearOperator< T >.

Definition at line 251 of file polynomial_op.h.

References Chroma::b, chi, and Chroma::zero.

◆ Qsq()

template<typename T , typename P , typename Q >
void Chroma::lpoly< T, P, Q >::Qsq ( T y,
const T x 
) const
inline

Apply the underlying (Mdagger M) operator.

Definition at line 203 of file polynomial_op.h.

References Chroma::MINUS, Chroma::PLUS, t, x, and y.

◆ Roots()

template<typename T , typename P , typename Q >
multi1d<DComplex> Chroma::lpoly< T, P, Q >::Roots ( ) const
inline

Returns the roots.

Definition at line 192 of file polynomial_op.h.

◆ subset()

template<typename T , typename P , typename Q >
const Subset& Chroma::lpoly< T, P, Q >::subset ( void  ) const
inlinevirtual

Subset comes from underlying operator.

Implements Chroma::LinearOperator< T >.

Definition at line 189 of file polynomial_op.h.

Member Data Documentation

◆ c_Zero

template<typename T , typename P , typename Q >
Real Chroma::lpoly< T, P, Q >::c_Zero
private

Definition at line 41 of file polynomial_op.h.

◆ degree

template<typename T , typename P , typename Q >
int Chroma::lpoly< T, P, Q >::degree
private

Definition at line 34 of file polynomial_op.h.

◆ inv_c

template<typename T , typename P , typename Q >
multi1d<DComplex> Chroma::lpoly< T, P, Q >::inv_c
private

Definition at line 39 of file polynomial_op.h.

◆ LowerBound

template<typename T , typename P , typename Q >
Double Chroma::lpoly< T, P, Q >::LowerBound
private

Definition at line 31 of file polynomial_op.h.

◆ M

template<typename T , typename P , typename Q >
Handle< DiffLinearOperator<T,P,Q> > Chroma::lpoly< T, P, Q >::M
private

Definition at line 29 of file polynomial_op.h.

◆ root

template<typename T , typename P , typename Q >
multi1d<DComplex> Chroma::lpoly< T, P, Q >::root
private

Definition at line 38 of file polynomial_op.h.

◆ UpperBound

template<typename T , typename P , typename Q >
Double Chroma::lpoly< T, P, Q >::UpperBound
private

Definition at line 32 of file polynomial_op.h.


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