QMCPACK
LRBreakupParameters< T, 3 > Class Template Reference
+ Collaboration diagram for LRBreakupParameters< T, 3 >:

Public Member Functions

 LRBreakupParameters ()
 default constructor More...
 
void SetLRCutoffs (const TinyVector< TinyVector< T, 3 >, 3 > &a)
 Set LR_rc = radius of smallest sphere inside box and kc=dim/rc. More...
 
void printCutoffs (std::ostream &out)
 

Public Attributes

LR_dim_cutoff
 Dimensionless cutoff radius for G/R breakups. More...
 
LR_rc
 
LR_kc
 
LR_tol
 
unsigned ndim
 number of strictly enforced periodic spatial dimensions ewald_strict2d sets ndim=2, otherwise ndim=3 More...
 
unsigned num_ewald_grid_points
 

Detailed Description

template<typename T>
class qmcplusplus::LRBreakupParameters< T, 3 >

Definition at line 26 of file LRBreakupParameters.h.

Constructor & Destructor Documentation

◆ LRBreakupParameters()

LRBreakupParameters ( )
inline

default constructor

Definition at line 40 of file LRBreakupParameters.h.

41  : LR_dim_cutoff(15.0), LR_rc(1e6), LR_kc(0.0), LR_tol(3e-4), ndim(3), num_ewald_grid_points(1001)
42  {}
unsigned ndim
number of strictly enforced periodic spatial dimensions ewald_strict2d sets ndim=2, otherwise ndim=3
T LR_dim_cutoff
Dimensionless cutoff radius for G/R breakups.

Member Function Documentation

◆ printCutoffs()

void printCutoffs ( std::ostream &  out)
inline

Definition at line 70 of file LRBreakupParameters.h.

71  {
72  out << " Long-range breakup parameters:" << std::endl;
73  out << " rc*kc = " << LR_dim_cutoff << "; rc = " << LR_rc << "; kc = " << LR_kc << "; tol = " << LR_tol
74  << std::endl;
75  }
T LR_dim_cutoff
Dimensionless cutoff radius for G/R breakups.

◆ SetLRCutoffs()

void SetLRCutoffs ( const TinyVector< TinyVector< T, 3 >, 3 > &  a)
inline

Set LR_rc = radius of smallest sphere inside box and kc=dim/rc.

Definition at line 45 of file LRBreakupParameters.h.

References qmcplusplus::dot(), omptarget::min(), and qmcplusplus::sqrt().

46  {
47  //Compute rc as the real-space cutoff of 1/2 the unit-cell.
48  //Radius of maximum shere that fits in a...
49  TinyVector<T, 3> b, c, d, x; //Unit vector of each surface will be in here
50  //Compute the coordinate of the box center
51  c = 0.5 * (a[0] + a[1] + a[2]);
52  LR_rc = 1.e+6;
53  Tensor<int, 3> Cyclic(0, 1, 2, 1, 2, 0, 2, 0, 1);
54  for (int i = 0; i < 3; i++)
55  {
56  TinyVector<T, 3> v1 = a[Cyclic(i, 1)];
57  TinyVector<T, 3> v2 = a[Cyclic(i, 2)];
58  T beta1 = (dot(v2, v2) * dot(c, v1) - dot(v1, v2) * dot(c, v2)) /
59  (dot(v1, v1) * dot(v2, v2) - dot(v1, v2) * dot(v1, v2));
60  T beta2 = (dot(v1, v1) * dot(c, v2) - dot(v1, v2) * dot(c, v1)) /
61  (dot(v1, v1) * dot(v2, v2) - dot(v1, v2) * dot(v1, v2));
62  TinyVector<T, 3> p = beta1 * v1 + beta2 * v2;
63  T dist = sqrt(dot(p - c, p - c));
64  LR_rc = std::min(LR_rc, dist);
65  }
66  //Set KC for structure-factor and LRbreakups.
68  }
T min(T a, T b)
T LR_dim_cutoff
Dimensionless cutoff radius for G/R breakups.
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(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)

Member Data Documentation

◆ LR_dim_cutoff

T LR_dim_cutoff

Dimensionless cutoff radius for G/R breakups.

Definition at line 30 of file LRBreakupParameters.h.

◆ LR_kc

T LR_kc

Definition at line 32 of file LRBreakupParameters.h.

◆ LR_rc

T LR_rc

Definition at line 31 of file LRBreakupParameters.h.

◆ LR_tol

T LR_tol

Definition at line 33 of file LRBreakupParameters.h.

◆ ndim

unsigned ndim

number of strictly enforced periodic spatial dimensions ewald_strict2d sets ndim=2, otherwise ndim=3

Definition at line 36 of file LRBreakupParameters.h.

◆ num_ewald_grid_points

unsigned num_ewald_grid_points

Definition at line 37 of file LRBreakupParameters.h.


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