QMCPACK
LRBasis Struct Referenceabstract

Base-class for long-range breakups. More...

+ Inheritance diagram for LRBasis:
+ Collaboration diagram for LRBasis:

Public Types

using ParticleLayout = ParticleSet::ParticleLayout
 Typedef for the lattice-type. We don't need the full particle-set. More...
 

Public Member Functions

 LRBasis (const ParticleLayout &ref)
 
virtual ~LRBasis ()=default
 
int NumBasisElem () const
 
virtual mRealType h (int n, mRealType r) const =0
 
virtual mRealType hintr2 (int n) const =0
 
virtual mRealType dh_dr (int n, mRealType r) const
 
virtual mRealType c (int m, mRealType k) const =0
 
virtual mRealType dc_dk (int m, mRealType k) const
 
mRealType df (int m, mRealType r) const
 
mRealType f (mRealType r, const std::vector< mRealType > &coefs) const
 $f(r,{tn})$ returns the value of $ t_n*h_{ n}(r)$ r is radial position (scalar) std::vector<RealType> coefs are the {tn} optimized breakup coefficients. More...
 
mRealType df_dr (mRealType r, const std::vector< mRealType > &coefs) const
 
mRealType fk (mRealType k, const std::vector< mRealType > coefs) const
 
mRealType dfk_dk (mRealType k, const std::vector< mRealType > coefs) const
 
virtual void set_rc (mRealType rc)=0
 
mRealType get_rc () const
 
mRealType get_CellVolume () const
 
void set_Lattice (const ParticleLayout &ref)
 
const ParticleLayoutget_Lattice () const
 

Public Attributes

DECLARE_COULOMB_TYPES int BasisSize
 size of the basis elements More...
 
mRealType m_rc
 Real-space cutoff for short-range part. More...
 
ParticleLayout Lattice
 

Detailed Description

Base-class for long-range breakups.

Contains 3 important functions: c(n,k), h(n,r), hintr2(r) which evaluate the n'th basis function at k or r.

\[ hintr2_n = \int dr h_n(r) r^2, \]

Definition at line 33 of file LRBasis.h.

Member Typedef Documentation

◆ ParticleLayout

Typedef for the lattice-type. We don't need the full particle-set.

Definition at line 43 of file LRBasis.h.

Constructor & Destructor Documentation

◆ LRBasis()

LRBasis ( const ParticleLayout ref)
inline

Definition at line 50 of file LRBasis.h.

50  : m_rc(0.0), Lattice(ref)
51  { /*Do nothing*/
52  }
ParticleLayout Lattice
Definition: LRBasis.h:46
mRealType m_rc
Real-space cutoff for short-range part.
Definition: LRBasis.h:40

◆ ~LRBasis()

virtual ~LRBasis ( )
virtualdefault

Member Function Documentation

◆ c()

virtual mRealType c ( int  m,
mRealType  k 
) const
pure virtual

Implemented in LPQHISRCoulombBasis, and LPQHIBasis.

Referenced by LRBasis::fk().

◆ dc_dk()

virtual mRealType dc_dk ( int  m,
mRealType  k 
) const
inlinevirtual

Reimplemented in LPQHISRCoulombBasis.

Definition at line 65 of file LRBasis.h.

Referenced by LRBasis::dfk_dk().

65 { return 0.0; };

◆ df()

mRealType df ( int  m,
mRealType  r 
) const
inline

Definition at line 71 of file LRBasis.h.

References LRBasis::dh_dr(), and qmcplusplus::Units::distance::m.

Referenced by LRBasis::df_dr().

71 { return dh_dr(m, r); };
virtual mRealType dh_dr(int n, mRealType r) const
Definition: LRBasis.h:61

◆ df_dr()

mRealType df_dr ( mRealType  r,
const std::vector< mRealType > &  coefs 
) const
inline

Definition at line 104 of file LRBasis.h.

References LRBasis::df(), LRBasis::dh_dr(), and qmcplusplus::n.

105  {
106  mRealType df = 0.0;
107  //RealType df = myFunc.df(r, rinv);
108  for (int n = 0; n < coefs.size(); n++)
109  df += coefs[n] * dh_dr(n, r);
110  return df;
111  }
EwaldHandler3D::mRealType mRealType
virtual mRealType dh_dr(int n, mRealType r) const
Definition: LRBasis.h:61
mRealType df(int m, mRealType r) const
Definition: LRBasis.h:71

◆ dfk_dk()

mRealType dfk_dk ( mRealType  k,
const std::vector< mRealType coefs 
) const
inline

Definition at line 140 of file LRBasis.h.

References LRBasis::dc_dk(), and qmcplusplus::n.

141  {
142  mRealType dfk = 0.0;
143  for (int n = 0; n < coefs.size(); n++)
144  dfk += coefs[n] * dc_dk(n, k);
145  return dfk;
146  }
virtual mRealType dc_dk(int m, mRealType k) const
Definition: LRBasis.h:65
EwaldHandler3D::mRealType mRealType

◆ dh_dr()

virtual mRealType dh_dr ( int  n,
mRealType  r 
) const
inlinevirtual

Reimplemented in LPQHISRCoulombBasis, and LPQHIBasis.

Definition at line 61 of file LRBasis.h.

Referenced by LRBasis::df(), and LRBasis::df_dr().

61 { return 0.0; };

◆ f()

mRealType f ( mRealType  r,
const std::vector< mRealType > &  coefs 
) const
inline

$f(r,{tn})$ returns the value of $ t_n*h_{ n}(r)$ r is radial position (scalar) std::vector<RealType> coefs are the {tn} optimized breakup coefficients.

Definition at line 86 of file LRBasis.h.

References LRBasis::h(), and qmcplusplus::n.

87  {
88  mRealType f = 0.0;
89  //RealType df = myFunc.df(r, rinv);
90  for (int n = 0; n < coefs.size(); n++)
91  f += coefs[n] * h(n, r);
92  return f;
93  }
EwaldHandler3D::mRealType mRealType
virtual mRealType h(int n, mRealType r) const =0
mRealType f(mRealType r, const std::vector< mRealType > &coefs) const
$f(r,{tn})$ returns the value of $ t_n*h_{ n}(r)$ r is radial position (scalar) std::vector<RealType>...
Definition: LRBasis.h:86

◆ fk()

mRealType fk ( mRealType  k,
const std::vector< mRealType coefs 
) const
inline

Definition at line 123 of file LRBasis.h.

References LRBasis::c(), and qmcplusplus::n.

124  {
125  mRealType fk = 0.0;
126  for (int n = 0; n < coefs.size(); n++)
127  fk += coefs[n] * c(n, k);
128  return fk;
129  }
EwaldHandler3D::mRealType mRealType
mRealType fk(mRealType k, const std::vector< mRealType > coefs) const
Definition: LRBasis.h:123
virtual mRealType c(int m, mRealType k) const =0

◆ get_CellVolume()

mRealType get_CellVolume ( ) const
inline

Definition at line 151 of file LRBasis.h.

References CrystalLattice< T, D >::Volume.

151 { return Lattice.Volume; }
ParticleLayout Lattice
Definition: LRBasis.h:46
Scalar_t Volume
Physical properties of a supercell.

◆ get_Lattice()

const ParticleLayout& get_Lattice ( ) const
inline

Definition at line 153 of file LRBasis.h.

References LRBasis::Lattice.

153 { return Lattice; }
ParticleLayout Lattice
Definition: LRBasis.h:46

◆ get_rc()

mRealType get_rc ( ) const
inline

Definition at line 150 of file LRBasis.h.

References LRBasis::m_rc.

150 { return m_rc; }
mRealType m_rc
Real-space cutoff for short-range part.
Definition: LRBasis.h:40

◆ h()

virtual mRealType h ( int  n,
mRealType  r 
) const
pure virtual

Implemented in LPQHISRCoulombBasis, and LPQHIBasis.

Referenced by LRBasis::f().

◆ hintr2()

virtual mRealType hintr2 ( int  n) const
pure virtual

Implemented in LPQHISRCoulombBasis, and LPQHIBasis.

◆ NumBasisElem()

int NumBasisElem ( ) const
inline

Definition at line 56 of file LRBasis.h.

References LRBasis::BasisSize.

56 { return BasisSize; }
DECLARE_COULOMB_TYPES int BasisSize
size of the basis elements
Definition: LRBasis.h:38

◆ set_Lattice()

void set_Lattice ( const ParticleLayout ref)
inline

Definition at line 152 of file LRBasis.h.

152 { Lattice = ref; }
ParticleLayout Lattice
Definition: LRBasis.h:46

◆ set_rc()

virtual void set_rc ( mRealType  rc)
pure virtual

Implemented in LPQHISRCoulombBasis, and LPQHIBasis.

Member Data Documentation

◆ BasisSize

◆ Lattice

Definition at line 46 of file LRBasis.h.

Referenced by LRBasis::get_Lattice().

◆ m_rc


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