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

specialization for a slab, orthorombic cell More...

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

Public Member Functions

 DTD_BConds (const CrystalLattice< T, 3 > &lat)
 
apply_bc (TinyVector< T, 3 > &displ) const
 evaluate |a| and apply boundary conditions on a 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
 

Detailed Description

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

specialization for a slab, orthorombic cell

Definition at line 330 of file ParticleBConds3D.h.

Constructor & Destructor Documentation

◆ DTD_BConds()

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

Definition at line 334 of file ParticleBConds3D.h.

Member Function Documentation

◆ apply_bc() [1/3]

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

evaluate |a| and apply boundary conditions on a

Definition at line 340 of file ParticleBConds3D.h.

341  {
342  T x = displ[0] * Linv0;
343  displ[0] = L0 * (x - round(x));
344  T y = displ[1] * Linv1;
345  displ[1] = L1 * (y - round(y));
346  return displ[0] * displ[0] + displ[1] * displ[1] + displ[2] * displ[2];
347  }

◆ 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 351 of file ParticleBConds3D.h.

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

352  {
353  const int n = r.size();
354  //use rinv as temporary rr
355  for (int i = 0; i < n; ++i)
356  rinv[i] = apply_bc(dr[i]);
357  simd::sqrt(&rinv[0], &r[0], n);
358  simd::inv(&r[0], &rinv[0], n);
359  }
T apply_bc(TinyVector< T, 3 > &displ) const
evaluate |a| and apply boundary conditions on a
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 361 of file ParticleBConds3D.h.

References qmcplusplus::dot().

362  {
363  for (int i = 0; i < dr.size(); ++i)
364  r[i] = dot(dr[i], dr[i]);
365  }
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 367 of file ParticleBConds3D.h.

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

368  {
369  for (int i = 0; i < n; ++i)
370  rr[i] = apply_bc(dr[i]);
371  }
T apply_bc(TinyVector< T, 3 > &displ) const
evaluate |a| and apply boundary conditions on a

Member Data Documentation

◆ L0

T L0

Definition at line 332 of file ParticleBConds3D.h.

◆ L1

T L1

Definition at line 332 of file ParticleBConds3D.h.

◆ Linv0

T Linv0

Definition at line 332 of file ParticleBConds3D.h.

◆ Linv1

T Linv1

Definition at line 332 of file ParticleBConds3D.h.


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