QMCPACK
KspaceMadelungTerm Class Reference

Functor for term within the k-space sum in Drummond 2008 formula 7. More...

+ Collaboration diagram for KspaceMadelungTerm:

Public Member Functions

 KspaceMadelungTerm (const RealMat &b_in, real_t kconst_in, real_t kfactor_in)
 
real_t operator() (const IntVec &i) const
 

Private Attributes

const RealMat b
 The k-space cell axes. More...
 
const real_t kconst
 The constant 1/(4^2) in Drummond 2008 formula 7. More...
 
const real_t kfactor
 The constant 4/ in Drummond 2008 formula 7. More...
 

Detailed Description

Functor for term within the k-space sum in Drummond 2008 formula 7.

Definition at line 46 of file EwaldRef.cpp.

Constructor & Destructor Documentation

◆ KspaceMadelungTerm()

KspaceMadelungTerm ( const RealMat b_in,
real_t  kconst_in,
real_t  kfactor_in 
)
inline

Definition at line 57 of file EwaldRef.cpp.

58  : b(b_in), kconst(kconst_in), kfactor(kfactor_in)
59  {}
const real_t kfactor
The constant 4/ in Drummond 2008 formula 7.
Definition: EwaldRef.cpp:54
const RealMat b
The k-space cell axes.
Definition: EwaldRef.cpp:50
const real_t kconst
The constant 1/(4^2) in Drummond 2008 formula 7.
Definition: EwaldRef.cpp:52

Member Function Documentation

◆ operator()()

real_t operator() ( const IntVec i) const
inline

Definition at line 61 of file EwaldRef.cpp.

References KspaceMadelungTerm::b, qmcplusplus::dot(), qmcplusplus::exp(), KspaceMadelungTerm::kconst, and KspaceMadelungTerm::kfactor.

62  {
63  RealVec Kv = dot(i, b);
64  real_t K2 = dot(Kv, Kv);
65  real_t km = kfactor * std::exp(kconst * K2) / K2;
66  return km;
67  }
TinyVector< real_t, DIM > RealVec
Type for floating point vectors of length DIM.
Definition: EwaldRef.h:48
const real_t kfactor
The constant 4/ in Drummond 2008 formula 7.
Definition: EwaldRef.cpp:54
const RealMat b
The k-space cell axes.
Definition: EwaldRef.cpp:50
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
double real_t
Type for floating point numbers.
Definition: EwaldRef.h:44
const real_t kconst
The constant 1/(4^2) in Drummond 2008 formula 7.
Definition: EwaldRef.cpp:52

Member Data Documentation

◆ b

const RealMat b
private

The k-space cell axes.

Definition at line 50 of file EwaldRef.cpp.

Referenced by KspaceMadelungTerm::operator()().

◆ kconst

const real_t kconst
private

The constant 1/(4^2) in Drummond 2008 formula 7.

Definition at line 52 of file EwaldRef.cpp.

Referenced by KspaceMadelungTerm::operator()().

◆ kfactor

const real_t kfactor
private

The constant 4/ in Drummond 2008 formula 7.

Definition at line 54 of file EwaldRef.cpp.

Referenced by KspaceMadelungTerm::operator()().


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