QMCPACK
HEGGrid< T > Struct Template Reference
+ Collaboration diagram for HEGGrid< T >:

Public Types

using PL_t = CrystalLattice< T, OHMMS_DIM >
 

Public Member Functions

 HEGGrid (const PL_t &lat)
 
 ~HEGGrid ()=default
 
int getNC (int nup) const
 return the estimated number of grid in each direction More...
 
int getNumberOfKpoints (int nsh) const
 
int getShellIndex (int nkpt) const
 
getCellLength (int nptcl, T rs_in) const
 return the cell size for the number of particles and rs More...
 

Public Attributes

const PL_tLattice
 

Static Public Attributes

static constexpr std::array< int, 31 > n_within_shell
 

Detailed Description

template<class T>
struct qmcplusplus::HEGGrid< T >

Definition at line 27 of file HEGGrid.h.

Member Typedef Documentation

◆ PL_t

Definition at line 29 of file HEGGrid.h.

Constructor & Destructor Documentation

◆ HEGGrid()

HEGGrid ( const PL_t lat)
inline

Definition at line 36 of file HEGGrid.h.

36 : Lattice(lat) {}
const PL_t & Lattice
Definition: HEGGrid.h:31

◆ ~HEGGrid()

~HEGGrid ( )
default

Member Function Documentation

◆ getCellLength()

T getCellLength ( int  nptcl,
rs_in 
) const
inline

return the cell size for the number of particles and rs

Parameters
nptclnumber of particles
rs_inrs

Definition at line 66 of file HEGGrid.h.

References qmcplusplus::pow().

Referenced by LatticeParser::put().

66 { return std::pow(4.0 * M_PI * nptcl / 3.0, 1.0 / 3.0) * rs_in; }
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)

◆ getNC()

int getNC ( int  nup) const
inline

return the estimated number of grid in each direction

Definition at line 41 of file HEGGrid.h.

References qmcplusplus::pow().

Referenced by HEGGrid< T >::getShellIndex().

41 { return static_cast<int>(std::pow(static_cast<T>(nup), 1.0 / 3.0)) / 2 + 1; }
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)

◆ getNumberOfKpoints()

int getNumberOfKpoints ( int  nsh) const
inline

Definition at line 44 of file HEGGrid.h.

References HEGGrid< T >::n_within_shell.

Referenced by LatticeParser::put().

45  {
46  if (nsh < n_within_shell.size())
47  return n_within_shell[nsh];
48  else
49  return -1;
50  }
static constexpr std::array< int, 31 > n_within_shell
Definition: HEGGrid.h:32

◆ getShellIndex()

int getShellIndex ( int  nkpt) const
inline

Definition at line 53 of file HEGGrid.h.

References HEGGrid< T >::getNC(), HEGGrid< T >::n_within_shell, and qmcplusplus::upper_bound().

Referenced by LatticeParser::put().

54  {
55  auto loc = std::upper_bound(n_within_shell.begin(), n_within_shell.end(), nkpt);
56  if (loc < n_within_shell.end())
57  return loc - n_within_shell.begin() - 1;
58  else
59  return getNC(nkpt);
60  }
static constexpr std::array< int, 31 > n_within_shell
Definition: HEGGrid.h:32
int getNC(int nup) const
return the estimated number of grid in each direction
Definition: HEGGrid.h:41
TinyVector< T, 3 > upper_bound(const TinyVector< T, 3 > &a, const TinyVector< T, 3 > &b)
helper function to determine the upper bound of a domain (need to move up)

Member Data Documentation

◆ Lattice

const PL_t& Lattice

Definition at line 31 of file HEGGrid.h.

◆ n_within_shell

constexpr std::array<int, 31> n_within_shell
static
Initial value:
{1, 7, 19, 27, 33, 57, 81, 93, 123, 147, 171,
179, 203, 251, 257, 305, 341, 365, 389, 437, 461, 485,
515, 587, 619, 691, 739, 751, 799, 847, 895}

Definition at line 32 of file HEGGrid.h.

Referenced by HEGGrid< T >::getNumberOfKpoints(), and HEGGrid< T >::getShellIndex().


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