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

specialization for a wire More...

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

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
 

Detailed Description

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

specialization for a wire

Definition at line 434 of file ParticleBConds3D.h.

Constructor & Destructor Documentation

◆ DTD_BConds()

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

Member Function Documentation

◆ apply_bc() [1/3]

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

evaluate |a| and apply boundary conditions on a

Parameters
latlattice
aCartesian vector
Returns
|a|^2

Definition at line 445 of file ParticleBConds3D.h.

446  {
447  T x = displ[0] * Linv0;
448  displ[0] = L0 * (x - round(x));
449  return displ[0] * displ[0] + displ[1] * displ[1] + displ[2] * displ[2];
450  }

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

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

455  {
456  const int n = r.size();
457  //use rinv as temporary rr
458  for (int i = 0; i < n; ++i)
459  rinv[i] = apply_bc(dr[i]);
460  simd::sqrt(&rinv[0], &r[0], n);
461  simd::inv(&r[0], &rinv[0], n);
462  }
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
T apply_bc(TinyVector< T, 3 > &displ) const
evaluate |a| and apply boundary conditions on a

◆ apply_bc() [3/3]

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

Definition at line 464 of file ParticleBConds3D.h.

References qmcplusplus::dot().

465  {
466  for (int i = 0; i < dr.size(); ++i)
467  r[i] = dot(dr[i], dr[i]);
468  }
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 470 of file ParticleBConds3D.h.

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

471  {
472  for (int i = 0; i < n; ++i)
473  rr[i] = apply_bc(dr[i]);
474  }
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 436 of file ParticleBConds3D.h.

◆ Linv0

T Linv0

Definition at line 436 of file ParticleBConds3D.h.


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