QMCPACK
SCTFunctor< SCT, 2 > Struct Template Reference
+ Collaboration diagram for SCTFunctor< SCT, 2 >:

Public Types

using value_type = typename SCT::value_type
 
using pos_type = typename SCT::pos_type
 

Static Public Member Functions

static void apply (std::vector< value_type > &Ylm, std::vector< pos_type > &gYlm, const pos_type &p)
 

Detailed Description

template<class SCT>
struct SCTFunctor< SCT, 2 >

Definition at line 674 of file SphericalTensor.h.

Member Typedef Documentation

◆ pos_type

using pos_type = typename SCT::pos_type

Definition at line 677 of file SphericalTensor.h.

◆ value_type

using value_type = typename SCT::value_type

Definition at line 676 of file SphericalTensor.h.

Member Function Documentation

◆ apply()

static void apply ( std::vector< value_type > &  Ylm,
std::vector< pos_type > &  gYlm,
const pos_type p 
)
inlinestatic

Definition at line 678 of file SphericalTensor.h.

References SCTFunctor< SCT, L >::apply(), qmcplusplus::sqrt(), and Ylm().

679  {
680  SCTFunctor<SCT, 1>::apply(Ylm, gYlm, p);
681  value_type x = p[0], y = p[1], z = p[2];
682  value_type x2 = x * x, y2 = y * y, z2 = z * z;
683  value_type xy = x * y, xz = x * z, yz = y * z;
684  const value_type L0 = sqrt(1.25);
685  const value_type L1 = sqrt(15.0);
686  const value_type L2 = sqrt(3.75);
687  Ylm[4] = L1 * xy;
688  Ylm[5] = L1 * yz;
689  Ylm[6] = L0 * (2.0 * z2 - x2 - y2);
690  Ylm[7] = L1 * xz;
691  Ylm[8] = L2 * (x2 - y2);
692  gYlm[4] = pos_type(L1 * y, L1 * x, 0.0);
693  gYlm[5] = pos_type(0.0, L1 * z, L1 * y);
694  gYlm[6] = pos_type(-2.0 * L0 * x, -2.0 * L0 * y, 4.0 * L0 * z);
695  gYlm[7] = pos_type(L1 * z, 0.0, L1 * x);
696  gYlm[8] = pos_type(2.0 * L2 * x, -2.0 * L2 * y, 0.0);
697  }
typename SCT::value_type value_type
typename SCT::pos_type pos_type
static void apply(std::vector< value_type > &Ylm, std::vector< pos_type > &gYlm, const pos_type &p)
std::complex< double > Ylm(int l, int m, const std::vector< double > &sph)
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)

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