QMCPACK
DTD_BConds< T, 3, PPPO > Struct Template Reference

specialization for a periodic 3D, orthorombic cell More...

+ Collaboration diagram for DTD_BConds< T, 3, PPPO >:

Public Member Functions

 DTD_BConds (const CrystalLattice< T, 3 > &lat)
 
apply_bc (TinyVector< T, 3 > &displ) const
 apply BC on a displacement vector More...
 
void apply_bc (std::vector< TinyVector< T, 3 >> &dr, std::vector< T > &r, std::vector< T > &rinv) const
 evaluate displacement data for a vector More...
 
void apply_bc (std::vector< TinyVector< T, 3 >> &dr, std::vector< T > &r) const
 
void evaluate_rsquared (TinyVector< T, 3 > *restrict dr, T *restrict rr, int n)
 

Public Attributes

Linv0
 
L0
 
Linv1
 
L1
 
Linv2
 
L2
 
r2max
 
dummy
 

Detailed Description

template<class T>
struct qmcplusplus::DTD_BConds< T, 3, PPPO >

specialization for a periodic 3D, orthorombic cell

Definition at line 26 of file ParticleBConds3D.h.

Constructor & Destructor Documentation

◆ DTD_BConds()

DTD_BConds ( const CrystalLattice< T, 3 > &  lat)
inline

Definition at line 30 of file ParticleBConds3D.h.

Member Function Documentation

◆ apply_bc() [1/3]

T apply_bc ( TinyVector< T, 3 > &  displ) const
inline

apply BC on a displacement vector

Parameters
displ

Definition at line 44 of file ParticleBConds3D.h.

45  {
46  T x = displ[0] * Linv0;
47  displ[0] = L0 * (x - round(x));
48  T y = displ[1] * Linv1;
49  displ[1] = L1 * (y - round(y));
50  T z = displ[2] * Linv2;
51  displ[2] = L2 * (z - round(z));
52  return displ[0] * displ[0] + displ[1] * displ[1] + displ[2] * displ[2];
53  }

◆ apply_bc() [2/3]

void apply_bc ( std::vector< TinyVector< T, 3 >> &  dr,
std::vector< T > &  r,
std::vector< T > &  rinv 
) const
inline

evaluate displacement data for a vector

Definition at line 57 of file ParticleBConds3D.h.

References DTD_BConds< T, D, SC >::apply_bc(), qmcplusplus::simd::inv(), qmcplusplus::n, and qmcplusplus::simd::sqrt().

58  {
59  const int n = r.size();
60  //use rinv as temporary rr
61  for (int i = 0; i < n; ++i)
62  rinv[i] = apply_bc(dr[i]);
63  simd::sqrt(&rinv[0], &r[0], n);
64  simd::inv(&r[0], &rinv[0], n);
65  }
T apply_bc(TinyVector< T, 3 > &displ) const
apply BC on a displacement vector
void inv(const T *restrict in, T *restrict out, int n)
Definition: vmath.hpp:65
void sqrt(T *restrict inout, SIZET n)
Definition: vmath.hpp:52

◆ apply_bc() [3/3]

void apply_bc ( std::vector< TinyVector< T, 3 >> &  dr,
std::vector< T > &  r 
) const
inline

Definition at line 67 of file ParticleBConds3D.h.

References qmcplusplus::dot().

68  {
69  for (int i = 0; i < dr.size(); ++i)
70  r[i] = dot(dr[i], dr[i]);
71  }
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)

◆ evaluate_rsquared()

void evaluate_rsquared ( TinyVector< T, 3 > *restrict  dr,
T *restrict  rr,
int  n 
)
inline

Definition at line 73 of file ParticleBConds3D.h.

References DTD_BConds< T, D, SC >::apply_bc(), and qmcplusplus::n.

74  {
75  for (int i = 0; i < n; ++i)
76  rr[i] = apply_bc(dr[i]);
77  }
T apply_bc(TinyVector< T, 3 > &displ) const
apply BC on a displacement vector

Member Data Documentation

◆ dummy

T dummy

Definition at line 28 of file ParticleBConds3D.h.

◆ L0

T L0

Definition at line 28 of file ParticleBConds3D.h.

◆ L1

T L1

Definition at line 28 of file ParticleBConds3D.h.

◆ L2

T L2

Definition at line 28 of file ParticleBConds3D.h.

◆ Linv0

T Linv0

Definition at line 28 of file ParticleBConds3D.h.

◆ Linv1

T Linv1

Definition at line 28 of file ParticleBConds3D.h.

◆ Linv2

T Linv2

Definition at line 28 of file ParticleBConds3D.h.

◆ r2max

T r2max

Definition at line 28 of file ParticleBConds3D.h.


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