QMCPACK
SplineC2C< ST > Class Template Reference

class to match std::complex<ST> spline with BsplineSet::ValueType (complex) SPOs More...

+ Inheritance diagram for SplineC2C< ST >:
+ Collaboration diagram for SplineC2C< ST >:

Public Types

using SplineType = typename bspline_traits< ST, 3 >::SplineType
 
using BCType = typename bspline_traits< ST, 3 >::BCType
 
using DataType = ST
 
using PointType = TinyVector< ST, 3 >
 
using SingleSplineType = UBspline_3d_d
 
using ComplexT = typename BsplineSet::ValueType
 
using vContainer_type = Vector< ST, aligned_allocator< ST > >
 
using gContainer_type = VectorSoaContainer< ST, 3 >
 
using hContainer_type = VectorSoaContainer< ST, 6 >
 
using ghContainer_type = VectorSoaContainer< ST, 10 >
 
- Public Types inherited from SPOSet
using ValueVector = OrbitalSetTraits< ValueType >::ValueVector
 
using ValueMatrix = OrbitalSetTraits< ValueType >::ValueMatrix
 
using GradVector = OrbitalSetTraits< ValueType >::GradVector
 
using GradMatrix = OrbitalSetTraits< ValueType >::GradMatrix
 
using HessVector = OrbitalSetTraits< ValueType >::HessVector
 
using HessMatrix = OrbitalSetTraits< ValueType >::HessMatrix
 
using GGGVector = OrbitalSetTraits< ValueType >::GradHessVector
 
using GGGMatrix = OrbitalSetTraits< ValueType >::GradHessMatrix
 
using SPOMap = std::map< std::string, const std::unique_ptr< const SPOSet > >
 
using OffloadMWVGLArray = Array< ValueType, 3, OffloadPinnedAllocator< ValueType > >
 
using OffloadMWVArray = Array< ValueType, 2, OffloadPinnedAllocator< ValueType > >
 
template<typename DT >
using OffloadMatrix = Matrix< DT, OffloadPinnedAllocator< DT > >
 
- Public Types inherited from QMCTraits
enum  { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 }
 
using QTBase = QMCTypes< OHMMS_PRECISION, DIM >
 
using QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM >
 
using RealType = QTBase::RealType
 
using ComplexType = QTBase::ComplexType
 
using ValueType = QTBase::ValueType
 
using PosType = QTBase::PosType
 
using GradType = QTBase::GradType
 
using TensorType = QTBase::TensorType
 
using IndexType = OHMMS_INDEXTYPE
 define other types More...
 
using FullPrecRealType = QTFull::RealType
 
using FullPrecValueType = QTFull::ValueType
 
using PropertySetType = RecordNamedProperty< FullPrecRealType >
 define PropertyList_t More...
 
using PtclGrpIndexes = std::vector< std::pair< int, int > >
 

Public Member Functions

 SplineC2C (const std::string &my_name)
 
 SplineC2C (const SplineC2C &in)
 
virtual std::string getClassName () const override
 return class name More...
 
virtual std::string getKeyword () const override
 
bool isComplex () const override
 
std::unique_ptr< SPOSetmakeClone () const override
 make a clone of itself every derived class must implement this to have threading working correctly. More...
 
bool isRotationSupported () const override
 return true if this SPOSet can be wrappered by RotatedSPO More...
 
void storeParamsBeforeRotation () override
 Store an original copy of the spline coefficients for orbital rotation. More...
 
void applyRotation (const ValueMatrix &rot_mat, bool use_stored_copy) override
 apply rotation to all the orbitals More...
 
void resizeStorage (size_t n, size_t nvals)
 
void bcast_tables (Communicate *comm)
 
void gather_tables (Communicate *comm)
 
template<typename GT , typename BCT >
void create_spline (GT &xyz_g, BCT &xyz_bc)
 
void flush_zero ()
 
void resize_kpoints ()
 remap kPoints to pack the double copy More...
 
void set_spline (SingleSplineType *spline_r, SingleSplineType *spline_i, int twist, int ispline, int level)
 
bool read_splines (hdf_archive &h5f)
 
bool write_splines (hdf_archive &h5f)
 
void assign_v (const PointType &r, const vContainer_type &myV, ValueVector &psi, int first, int last) const
 
void evaluateValue (const ParticleSet &P, const int iat, ValueVector &psi) override
 evaluate the values of this single-particle orbital set More...
 
void evaluateDetRatios (const VirtualParticleSet &VP, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios) override
 evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP More...
 
void assign_vgl (const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, int first, int last) const
 assign_vgl More...
 
void assign_vgl_from_l (const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)
 assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian More...
 
void evaluateVGL (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) override
 evaluate the values, gradients and laplacians of this single-particle orbital set More...
 
void assign_vgh (const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, int first, int last) const
 
void evaluateVGH (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi) override
 evaluate the values, gradients and hessians of this single-particle orbital set More...
 
void assign_vghgh (const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi, int first=0, int last=-1) const
 
void evaluateVGHGH (const ParticleSet &P, const int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi) override
 evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set More...
 
- Public Member Functions inherited from BsplineSet
 BsplineSet (const std::string &my_name)
 
auto & getHalfG () const
 
void init_base (int n)
 
int remap_kpoints ()
 remap kpoints to group general kpoints & special kpoints More...
 
void setOrbitalSetSize (int norbs) override
 set the OrbitalSetSize More...
 
void evaluate_notranspose (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) override
 evaluate the values, gradients and laplacians of this single-particle orbital for [first,last) particles More...
 
void mw_evaluate_notranspose (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int first, int last, const RefVector< ValueMatrix > &logdet_list, const RefVector< GradMatrix > &dlogdet_list, const RefVector< ValueMatrix > &d2logdet_list) const override
 
void evaluate_notranspose (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, HessMatrix &grad_grad_logdet) override
 evaluate the values, gradients and hessians of this single-particle orbital for [first,last) particles More...
 
void evaluate_notranspose (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, HessMatrix &grad_grad_logdet, GGGMatrix &grad_grad_grad_logdet) override
 evaluate the values, gradients, hessians and third derivatives of this single-particle orbital for [first,last) particles More...
 
void evaluateGradSource (const ParticleSet &P, int first, int last, const ParticleSet &source, int iat_src, GradMatrix &gradphi) override
 evaluate the gradients of this single-particle orbital for [first,last) target particles with respect to the given source particle More...
 
void evaluateGradSource (const ParticleSet &P, int first, int last, const ParticleSet &source, int iat_src, GradMatrix &grad_phi, HessMatrix &grad_grad_phi, GradMatrix &grad_lapl_phi) override
 evaluate the gradients of values, gradients, laplacians of this single-particle orbital for [first,last) target particles with respect to the given source particle More...
 
virtual void evaluateDetRatios (const VirtualParticleSet &VP, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios)
 evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP More...
 
virtual void evaluateValue (const ParticleSet &P, int iat, ValueVector &psi)=0
 evaluate the values of this single-particle orbital set More...
 
virtual void evaluateVGH (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi)
 evaluate the values, gradients and hessians of this single-particle orbital set More...
 
virtual void evaluateVGHGH (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi)
 evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set More...
 
virtual void evaluateVGL (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)=0
 evaluate the values, gradients and laplacians of this single-particle orbital set More...
 
virtual void finalizeConstruction ()
 finalize the construction of SPOSet More...
 
virtual void mw_evaluateDetRatios (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, const RefVector< ValueVector > &psi_list, const std::vector< const ValueType * > &invRow_ptr_list, std::vector< std::vector< ValueType >> &ratios_list) const
 evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP, of multiple walkers More...
 
virtual void mw_evaluateVGL (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list, const RefVector< GradVector > &dpsi_v_list, const RefVector< ValueVector > &d2psi_v_list) const
 evaluate the values, gradients and laplacians of this single-particle orbital sets of multiple walkers More...
 
virtual void mw_evaluateVGLandDetRatioGrads (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const std::vector< const ValueType * > &invRow_ptr_list, OffloadMWVGLArray &phi_vgl_v, std::vector< ValueType > &ratios, std::vector< GradType > &grads) const
 evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More...
 
virtual void acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const
 acquire a shared resource from collection More...
 
virtual void createResource (ResourceCollection &collection) const
 initialize a shared resource and hand it to collection More...
 
virtual void releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const
 return a shared resource to collection More...
 
- Public Member Functions inherited from SPOSet
 SPOSet (const std::string &my_name)
 constructor More...
 
virtual ~SPOSet ()=default
 destructor More...
 
int size () const
 return the size of the orbital set Ye: this needs to be replaced by getOrbitalSetSize(); More...
 
void basic_report (const std::string &pad="") const
 print basic SPOSet information More...
 
virtual void report (const std::string &pad="") const
 print SPOSet information More...
 
int getOrbitalSetSize () const
 return the size of the orbitals More...
 
virtual bool isOptimizable () const
 Query if this SPOSet is optimizable. More...
 
virtual void extractOptimizableObjectRefs (UniqueOptObjRefs &opt_obj_refs)
 extract underlying OptimizableObject references More...
 
virtual void checkOutVariables (const opt_variables_type &active)
 check out variational optimizable variables More...
 
virtual bool isOMPoffload () const
 Query if this SPOSet uses OpenMP offload. More...
 
virtual bool hasIonDerivs () const
 Query if this SPOSet has an explicit ion dependence. More...
 
virtual void checkObject () const
 check a few key parameters before putting the SPO into a determinant More...
 
virtual void evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi, const int &FirstIndex, const int &LastIndex)
 Parameter derivatives of the wavefunction and the Laplacian of the wavefunction. More...
 
virtual void evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, int FirstIndex, int LastIndex)
 Parameter derivatives of the wavefunction. More...
 
virtual void evaluateDerivatives (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi, const ValueType &psiCurrent, const std::vector< ValueType > &Coeff, const std::vector< size_t > &C2node_up, const std::vector< size_t > &C2node_dn, const ValueVector &detValues_up, const ValueVector &detValues_dn, const GradMatrix &grads_up, const GradMatrix &grads_dn, const ValueMatrix &lapls_up, const ValueMatrix &lapls_dn, const ValueMatrix &M_up, const ValueMatrix &M_dn, const ValueMatrix &Minv_up, const ValueMatrix &Minv_dn, const GradMatrix &B_grad, const ValueMatrix &B_lapl, const std::vector< int > &detData_up, const size_t N1, const size_t N2, const size_t NP1, const size_t NP2, const std::vector< std::vector< int >> &lookup_tbl)
 Evaluate the derivative of the optimized orbitals with respect to the parameters this is used only for MSD, to be refined for better serving both single and multi SD. More...
 
virtual void evaluateDerivativesWF (ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, const QTFull::ValueType &psiCurrent, const std::vector< ValueType > &Coeff, const std::vector< size_t > &C2node_up, const std::vector< size_t > &C2node_dn, const ValueVector &detValues_up, const ValueVector &detValues_dn, const ValueMatrix &M_up, const ValueMatrix &M_dn, const ValueMatrix &Minv_up, const ValueMatrix &Minv_dn, const std::vector< int > &detData_up, const std::vector< std::vector< int >> &lookup_tbl)
 Evaluate the derivative of the optimized orbitals with respect to the parameters this is used only for MSD, to be refined for better serving both single and multi SD. More...
 
virtual void evaluateDetSpinorRatios (const VirtualParticleSet &VP, ValueVector &psi, const std::pair< ValueVector, ValueVector > &spinor_multiplier, const ValueVector &invrow, std::vector< ValueType > &ratios)
 evaluate determinant ratios for virtual moves, specifically for Spinor SPOSets More...
 
virtual void evaluateDerivRatios (const VirtualParticleSet &VP, const opt_variables_type &optvars, ValueVector &psi, const ValueVector &psiinv, std::vector< ValueType > &ratios, Matrix< ValueType > &dratios, int FirstIndex, int LastIndex)
 Determinant ratios and parameter derivatives of the wavefunction for virtual moves. More...
 
virtual void mw_evaluateDetRatios (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< const VirtualParticleSet > &vp_list, const RefVector< ValueVector > &psi_list, const std::vector< const ValueType *> &invRow_ptr_list, std::vector< std::vector< ValueType >> &ratios_list) const
 evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP, of multiple walkers More...
 
virtual void evaluateVGL_spin (const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, ValueVector &dspin)
 evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital set More...
 
virtual void mw_evaluateValue (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list) const
 evaluate the values this single-particle orbital sets of multiple walkers More...
 
virtual void mw_evaluateVGL (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list, const RefVector< GradVector > &dpsi_v_list, const RefVector< ValueVector > &d2psi_v_list) const
 evaluate the values, gradients and laplacians of this single-particle orbital sets of multiple walkers More...
 
virtual void mw_evaluateVGLWithSpin (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const RefVector< ValueVector > &psi_v_list, const RefVector< GradVector > &dpsi_v_list, const RefVector< ValueVector > &d2psi_v_list, OffloadMatrix< ComplexType > &mw_dspin) const
 evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital sets of multiple walkers More...
 
virtual void mw_evaluateVGLandDetRatioGrads (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const std::vector< const ValueType *> &invRow_ptr_list, OffloadMWVGLArray &phi_vgl_v, std::vector< ValueType > &ratios, std::vector< GradType > &grads) const
 evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More...
 
virtual void mw_evaluateVGLandDetRatioGradsWithSpin (const RefVectorWithLeader< SPOSet > &spo_list, const RefVectorWithLeader< ParticleSet > &P_list, int iat, const std::vector< const ValueType *> &invRow_ptr_list, OffloadMWVGLArray &phi_vgl_v, std::vector< ValueType > &ratios, std::vector< GradType > &grads, std::vector< ValueType > &spingrads) const
 evaluate the values, gradients and laplacians of this single-particle orbital sets and determinant ratio and grads of multiple walkers. More...
 
virtual void evaluate_spin (const ParticleSet &P, int iat, ValueVector &psi, ValueVector &dpsi)
 evaluate the values of this single-particle orbital set More...
 
virtual void evaluateThirdDeriv (const ParticleSet &P, int first, int last, GGGMatrix &grad_grad_grad_logdet)
 evaluate the third derivatives of this single-particle orbital set More...
 
virtual void evaluate_notranspose_spin (const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet, ValueMatrix &dspinlogdet)
 evaluate the values, gradients and laplacians of this single-particle orbital for [first,last) particles, including the spin gradient More...
 
virtual void evaluateGradSourceRow (const ParticleSet &P, int iel, const ParticleSet &source, int iat_src, GradVector &gradphi)
 Returns a row of d/dR_iat phi_j(r) evaluated at position r. More...
 
virtual PosType get_k (int orb)
 access the k point related to the given orbital More...
 
virtual void createResource (ResourceCollection &collection) const
 initialize a shared resource and hand it to collection More...
 
virtual void acquireResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const
 acquire a shared resource from collection More...
 
virtual void releaseResource (ResourceCollection &collection, const RefVectorWithLeader< SPOSet > &spo_list) const
 return a shared resource to collection More...
 
virtual bool transformSPOSet ()
 Used only by cusp correction in AOS LCAO. More...
 
virtual void finalizeConstruction ()
 finalize the construction of SPOSet More...
 
const std::string & getName () const
 return object name More...
 

Protected Attributes

vContainer_type myV
 intermediate result vectors More...
 
vContainer_type myL
 
gContainer_type myG
 
hContainer_type myH
 
ghContainer_type mygH
 
- Protected Attributes inherited from BsplineSet
size_t MyIndex
 Index of this adoptor, when multiple adoptors are used for NUMA or distributed cases. More...
 
size_t first_spo
 first index of the SPOs this Spline handles More...
 
size_t last_spo
 last index of the SPOs this Spline handles More...
 
TinyVector< int, DHalfG
 sign bits at the G/2 boundaries More...
 
std::vector< bool > MakeTwoCopies
 flags to unpack sin/cos More...
 
std::vector< SPOSet::PosTypekPoints
 kpoints for each unique orbitals. More...
 
aligned_vector< int > BandIndexMap
 remap splines to orbitals More...
 
std::vector< int > offset
 band offsets used for communication More...
 
- Protected Attributes inherited from SPOSet
const std::string my_name_
 name of the object, unique identifier More...
 
IndexType OrbitalSetSize
 number of Single-particle orbitals More...
 
opt_variables_type myVars
 Optimizable variables. More...
 

Private Attributes

CrystalLattice< ST, 3 > PrimLattice
 primitive cell More...
 
Tensor< ST, 3 > GGt
 $GGt=G^t G $, transformation for tensor in LatticeUnit to CartesianUnit, e.g. Hessian More...
 
std::shared_ptr< MultiBspline< ST > > SplineInst
 multi bspline set More...
 
std::shared_ptr< std::vector< ST > > coef_copy_
 Copy of original splines for orbital rotation. More...
 
vContainer_type mKK
 
VectorSoaContainer< ST, 3 > myKcart
 
Matrix< ComplexTratios_private
 thread private ratios for reduction when using nested threading, numVP x numThread More...
 

Friends

template<class BSPLINESPO >
class SplineSetReader
 
struct BsplineReader
 

Additional Inherited Members

- Static Protected Attributes inherited from BsplineSet
static const int D = DIM
 

Detailed Description

template<typename ST>
class qmcplusplus::SplineC2C< ST >

class to match std::complex<ST> spline with BsplineSet::ValueType (complex) SPOs

Template Parameters
STprecision of spline

Requires temporage storage and multiplication of phase vectors The internal storage of complex spline coefficients uses double sized real arrays of ST type, aligned and padded. All the output orbitals are complex.

Definition at line 37 of file SplineC2C.h.

Member Typedef Documentation

◆ BCType

using BCType = typename bspline_traits<ST, 3>::BCType

Definition at line 41 of file SplineC2C.h.

◆ ComplexT

using ComplexT = typename BsplineSet::ValueType

Definition at line 47 of file SplineC2C.h.

◆ DataType

using DataType = ST

Definition at line 42 of file SplineC2C.h.

◆ gContainer_type

Definition at line 54 of file SplineC2C.h.

◆ ghContainer_type

Definition at line 56 of file SplineC2C.h.

◆ hContainer_type

Definition at line 55 of file SplineC2C.h.

◆ PointType

using PointType = TinyVector<ST, 3>

Definition at line 43 of file SplineC2C.h.

◆ SingleSplineType

using SingleSplineType = UBspline_3d_d

Definition at line 44 of file SplineC2C.h.

◆ SplineType

using SplineType = typename bspline_traits<ST, 3>::SplineType

Definition at line 40 of file SplineC2C.h.

◆ vContainer_type

Definition at line 53 of file SplineC2C.h.

Constructor & Destructor Documentation

◆ SplineC2C() [1/2]

SplineC2C ( const std::string &  my_name)
inline

Definition at line 84 of file SplineC2C.h.

84 : BsplineSet(my_name) {}
BsplineSet(const std::string &my_name)
Definition: BsplineSet.h:59

◆ SplineC2C() [2/2]

SplineC2C ( const SplineC2C< ST > &  in)
default

Member Function Documentation

◆ applyRotation()

void applyRotation ( const ValueMatrix rot_mat,
bool  use_stored_copy 
)
overridevirtual

apply rotation to all the orbitals

Reimplemented from SPOSet.

Definition at line 107 of file SplineC2C.cpp.

References qmcplusplus::syclBLAS::copy_n(), and BLAS::gemm().

108 {
109  // SplineInst is a MultiBspline. See src/spline2/MultiBspline.hpp
110  const auto spline_ptr = SplineInst->getSplinePtr();
111  assert(spline_ptr != nullptr);
112  const auto spl_coefs = spline_ptr->coefs;
113  const auto Nsplines = spline_ptr->num_splines; // May include padding
114  const auto coefs_tot_size = spline_ptr->coefs_size;
115  const auto basis_set_size = coefs_tot_size / Nsplines;
116  assert(OrbitalSetSize == rot_mat.rows());
117  assert(OrbitalSetSize == rot_mat.cols());
118 
119  if (!use_stored_copy)
120  {
121  assert(coef_copy_ != nullptr);
122  std::copy_n(spl_coefs, coefs_tot_size, coef_copy_->begin());
123  }
124 
125  if constexpr (std::is_same_v<ST, RealType>)
126  {
127  //if ST is double, go ahead and use blas to make things faster
128  //Note that Nsplines needs to be divided by 2 since spl_coefs and coef_copy_ are stored as reals.
129  //Also casting them as ValueType so they are complex to do the correct gemm
130  BLAS::gemm('N', 'N', OrbitalSetSize, basis_set_size, OrbitalSetSize, ValueType(1.0, 0.0), rot_mat.data(),
131  OrbitalSetSize, (ValueType*)coef_copy_->data(), Nsplines / 2, ValueType(0.0, 0.0), (ValueType*)spl_coefs,
132  Nsplines / 2);
133  }
134  else
135  {
136  // if ST is float, RealType is double and ValueType is std::complex<double> for C2C
137  // Just use naive matrix multiplication in order to avoid losing precision on rotation matrix
138  for (IndexType i = 0; i < basis_set_size; i++)
139  for (IndexType j = 0; j < OrbitalSetSize; j++)
140  {
141  // cur_elem points to the real componend of the coefficient.
142  // Imag component is adjacent in memory.
143  const auto cur_elem = Nsplines * i + 2 * j;
144  ST newval_r{0.};
145  ST newval_i{0.};
146  for (IndexType k = 0; k < OrbitalSetSize; k++)
147  {
148  const auto index = Nsplines * i + 2 * k;
149  ST zr = (*coef_copy_)[index];
150  ST zi = (*coef_copy_)[index + 1];
151  ST wr = rot_mat[k][j].real();
152  ST wi = rot_mat[k][j].imag();
153  newval_r += zr * wr - zi * wi;
154  newval_i += zr * wi + zi * wr;
155  }
156  spl_coefs[cur_elem] = newval_r;
157  spl_coefs[cur_elem + 1] = newval_i;
158  }
159  }
160 }
QTBase::ValueType ValueType
Definition: Configuration.h:60
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
IndexType OrbitalSetSize
number of Single-particle orbitals
Definition: SPOSet.h:566
OHMMS_INDEXTYPE IndexType
define other types
Definition: Configuration.h:65
std::shared_ptr< std::vector< ST > > coef_copy_
Copy of original splines for orbital rotation.
Definition: SplineC2C.h:67
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
Definition: syclBLAS.cpp:548
static void gemm(char Atrans, char Btrans, int M, int N, int K, double alpha, const double *A, int lda, const double *restrict B, int ldb, double beta, double *restrict C, int ldc)
Definition: BLAS.hpp:235

◆ assign_v()

void assign_v ( const PointType r,
const vContainer_type myV,
ValueVector psi,
int  first,
int  last 
) const
inline

Definition at line 163 of file SplineC2C.cpp.

References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, and qmcplusplus::sincos().

168 {
169  // protect last
170  const size_t last_cplx = std::min(kPoints.size(), psi.size());
171  last = last > last_cplx ? last_cplx : last;
172 
173  const ST x = r[0], y = r[1], z = r[2];
174  const ST* restrict kx = myKcart.data(0);
175  const ST* restrict ky = myKcart.data(1);
176  const ST* restrict kz = myKcart.data(2);
177 #pragma omp simd
178  for (size_t j = first; j < last; ++j)
179  {
180  ST s, c;
181  const ST val_r = myV[2 * j];
182  const ST val_i = myV[2 * j + 1];
183  qmcplusplus::sincos(-(x * kx[j] + y * ky[j] + z * kz[j]), &s, &c);
184  psi[j + first_spo] = ComplexT(val_r * c - val_i * s, val_i * c + val_r * s);
185  }
186 }
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
T min(T a, T b)
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
Definition: math.hpp:62
size_t first_spo
first index of the SPOs this Spline handles
Definition: BsplineSet.h:41
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ assign_vgh()

void assign_vgh ( const PointType r,
ValueVector psi,
GradVector dpsi,
HessVector grad_grad_psi,
int  first,
int  last 
) const

Definition at line 416 of file SplineC2C.cpp.

References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), and qmcplusplus::v_m_v().

422 {
423  // protect last
424  const size_t last_cplx = std::min(kPoints.size(), psi.size());
425  last = last > last_cplx ? last_cplx : last;
426 
427  const ST g00 = PrimLattice.G(0), g01 = PrimLattice.G(1), g02 = PrimLattice.G(2), g10 = PrimLattice.G(3),
428  g11 = PrimLattice.G(4), g12 = PrimLattice.G(5), g20 = PrimLattice.G(6), g21 = PrimLattice.G(7),
429  g22 = PrimLattice.G(8);
430  const ST x = r[0], y = r[1], z = r[2];
431 
432  const ST* restrict k0 = myKcart.data(0);
433  const ST* restrict k1 = myKcart.data(1);
434  const ST* restrict k2 = myKcart.data(2);
435 
436  const ST* restrict g0 = myG.data(0);
437  const ST* restrict g1 = myG.data(1);
438  const ST* restrict g2 = myG.data(2);
439  const ST* restrict h00 = myH.data(0);
440  const ST* restrict h01 = myH.data(1);
441  const ST* restrict h02 = myH.data(2);
442  const ST* restrict h11 = myH.data(3);
443  const ST* restrict h12 = myH.data(4);
444  const ST* restrict h22 = myH.data(5);
445 
446 #pragma omp simd
447  for (size_t j = first; j < last; ++j)
448  {
449  int jr = j << 1;
450  int ji = jr + 1;
451 
452  const ST kX = k0[j];
453  const ST kY = k1[j];
454  const ST kZ = k2[j];
455  const ST val_r = myV[jr];
456  const ST val_i = myV[ji];
457 
458  //phase
459  ST s, c;
460  qmcplusplus::sincos(-(x * kX + y * kY + z * kZ), &s, &c);
461 
462  //dot(PrimLattice.G,myG[j])
463  const ST dX_r = g00 * g0[jr] + g01 * g1[jr] + g02 * g2[jr];
464  const ST dY_r = g10 * g0[jr] + g11 * g1[jr] + g12 * g2[jr];
465  const ST dZ_r = g20 * g0[jr] + g21 * g1[jr] + g22 * g2[jr];
466 
467  const ST dX_i = g00 * g0[ji] + g01 * g1[ji] + g02 * g2[ji];
468  const ST dY_i = g10 * g0[ji] + g11 * g1[ji] + g12 * g2[ji];
469  const ST dZ_i = g20 * g0[ji] + g21 * g1[ji] + g22 * g2[ji];
470 
471  // \f$\nabla \psi_r + {\bf k}\psi_i\f$
472  const ST gX_r = dX_r + val_i * kX;
473  const ST gY_r = dY_r + val_i * kY;
474  const ST gZ_r = dZ_r + val_i * kZ;
475  const ST gX_i = dX_i - val_r * kX;
476  const ST gY_i = dY_i - val_r * kY;
477  const ST gZ_i = dZ_i - val_r * kZ;
478 
479  const size_t psiIndex = j + first_spo;
480  psi[psiIndex] = ComplexT(c * val_r - s * val_i, c * val_i + s * val_r);
481  dpsi[psiIndex][0] = ComplexT(c * gX_r - s * gX_i, c * gX_i + s * gX_r);
482  dpsi[psiIndex][1] = ComplexT(c * gY_r - s * gY_i, c * gY_i + s * gY_r);
483  dpsi[psiIndex][2] = ComplexT(c * gZ_r - s * gZ_i, c * gZ_i + s * gZ_r);
484 
485  const ST h_xx_r =
486  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g00, g01, g02) + kX * (gX_i + dX_i);
487  const ST h_xy_r =
488  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g10, g11, g12) + kX * (gY_i + dY_i);
489  const ST h_xz_r =
490  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g20, g21, g22) + kX * (gZ_i + dZ_i);
491  const ST h_yx_r =
492  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g10, g11, g12, g00, g01, g02) + kY * (gX_i + dX_i);
493  const ST h_yy_r =
494  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g10, g11, g12, g10, g11, g12) + kY * (gY_i + dY_i);
495  const ST h_yz_r =
496  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g10, g11, g12, g20, g21, g22) + kY * (gZ_i + dZ_i);
497  const ST h_zx_r =
498  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g20, g21, g22, g00, g01, g02) + kZ * (gX_i + dX_i);
499  const ST h_zy_r =
500  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g20, g21, g22, g10, g11, g12) + kZ * (gY_i + dY_i);
501  const ST h_zz_r =
502  v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g20, g21, g22, g20, g21, g22) + kZ * (gZ_i + dZ_i);
503 
504  const ST h_xx_i =
505  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g00, g01, g02) - kX * (gX_r + dX_r);
506  const ST h_xy_i =
507  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g10, g11, g12) - kX * (gY_r + dY_r);
508  const ST h_xz_i =
509  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g20, g21, g22) - kX * (gZ_r + dZ_r);
510  const ST h_yx_i =
511  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g10, g11, g12, g00, g01, g02) - kY * (gX_r + dX_r);
512  const ST h_yy_i =
513  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g10, g11, g12, g10, g11, g12) - kY * (gY_r + dY_r);
514  const ST h_yz_i =
515  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g10, g11, g12, g20, g21, g22) - kY * (gZ_r + dZ_r);
516  const ST h_zx_i =
517  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g20, g21, g22, g00, g01, g02) - kZ * (gX_r + dX_r);
518  const ST h_zy_i =
519  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g20, g21, g22, g10, g11, g12) - kZ * (gY_r + dY_r);
520  const ST h_zz_i =
521  v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g20, g21, g22, g20, g21, g22) - kZ * (gZ_r + dZ_r);
522 
523  grad_grad_psi[psiIndex][0] = ComplexT(c * h_xx_r - s * h_xx_i, c * h_xx_i + s * h_xx_r);
524  grad_grad_psi[psiIndex][1] = ComplexT(c * h_xy_r - s * h_xy_i, c * h_xy_i + s * h_xy_r);
525  grad_grad_psi[psiIndex][2] = ComplexT(c * h_xz_r - s * h_xz_i, c * h_xz_i + s * h_xz_r);
526  grad_grad_psi[psiIndex][3] = ComplexT(c * h_yx_r - s * h_yx_i, c * h_yx_i + s * h_yx_r);
527  grad_grad_psi[psiIndex][4] = ComplexT(c * h_yy_r - s * h_yy_i, c * h_yy_i + s * h_yy_r);
528  grad_grad_psi[psiIndex][5] = ComplexT(c * h_yz_r - s * h_yz_i, c * h_yz_i + s * h_yz_r);
529  grad_grad_psi[psiIndex][6] = ComplexT(c * h_zx_r - s * h_zx_i, c * h_zx_i + s * h_zx_r);
530  grad_grad_psi[psiIndex][7] = ComplexT(c * h_zy_r - s * h_zy_i, c * h_zy_i + s * h_zy_r);
531  grad_grad_psi[psiIndex][8] = ComplexT(c * h_zz_r - s * h_zz_i, c * h_zz_i + s * h_zz_r);
532  }
533 }
T v_m_v(T h00, T h01, T h02, T h11, T h12, T h22, T g1x, T g1y, T g1z, T g2x, T g2y, T g2z)
compute vector[3]^T x matrix[3][3] x vector[3]
Tensor_t G
Reciprocal unit vectors. G(j,i) i=vector and j=x,y,z.
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
T min(T a, T b)
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
Definition: math.hpp:62
gContainer_type myG
Definition: SplineC2C.h:79
size_t first_spo
first index of the SPOs this Spline handles
Definition: BsplineSet.h:41
hContainer_type myH
Definition: SplineC2C.h:80
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ assign_vghgh()

void assign_vghgh ( const PointType r,
ValueVector psi,
GradVector dpsi,
HessVector grad_grad_psi,
GGGVector grad_grad_grad_psi,
int  first = 0,
int  last = -1 
) const

Definition at line 557 of file SplineC2C.cpp.

References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), qmcplusplus::t3_contract(), and qmcplusplus::v_m_v().

564 {
565  // protect last
566  const size_t last_cplx = std::min(kPoints.size(), psi.size());
567  last = last < 0 ? last_cplx : (last > last_cplx ? last_cplx : last);
568 
569  const ST g00 = PrimLattice.G(0), g01 = PrimLattice.G(1), g02 = PrimLattice.G(2), g10 = PrimLattice.G(3),
570  g11 = PrimLattice.G(4), g12 = PrimLattice.G(5), g20 = PrimLattice.G(6), g21 = PrimLattice.G(7),
571  g22 = PrimLattice.G(8);
572  const ST x = r[0], y = r[1], z = r[2];
573 
574  const ST* restrict k0 = myKcart.data(0);
575  const ST* restrict k1 = myKcart.data(1);
576  const ST* restrict k2 = myKcart.data(2);
577 
578  const ST* restrict g0 = myG.data(0);
579  const ST* restrict g1 = myG.data(1);
580  const ST* restrict g2 = myG.data(2);
581  const ST* restrict h00 = myH.data(0);
582  const ST* restrict h01 = myH.data(1);
583  const ST* restrict h02 = myH.data(2);
584  const ST* restrict h11 = myH.data(3);
585  const ST* restrict h12 = myH.data(4);
586  const ST* restrict h22 = myH.data(5);
587 
588  const ST* restrict gh000 = mygH.data(0);
589  const ST* restrict gh001 = mygH.data(1);
590  const ST* restrict gh002 = mygH.data(2);
591  const ST* restrict gh011 = mygH.data(3);
592  const ST* restrict gh012 = mygH.data(4);
593  const ST* restrict gh022 = mygH.data(5);
594  const ST* restrict gh111 = mygH.data(6);
595  const ST* restrict gh112 = mygH.data(7);
596  const ST* restrict gh122 = mygH.data(8);
597  const ST* restrict gh222 = mygH.data(9);
598 
599 //SIMD doesn't work quite right yet. Comment out until further debugging.
600 #pragma omp simd
601  for (size_t j = first; j < last; ++j)
602  {
603  int jr = j << 1;
604  int ji = jr + 1;
605 
606  const ST kX = k0[j];
607  const ST kY = k1[j];
608  const ST kZ = k2[j];
609  const ST val_r = myV[jr];
610  const ST val_i = myV[ji];
611 
612  //phase
613  ST s, c;
614  qmcplusplus::sincos(-(x * kX + y * kY + z * kZ), &s, &c);
615 
616  //dot(PrimLattice.G,myG[j])
617  const ST dX_r = g00 * g0[jr] + g01 * g1[jr] + g02 * g2[jr];
618  const ST dY_r = g10 * g0[jr] + g11 * g1[jr] + g12 * g2[jr];
619  const ST dZ_r = g20 * g0[jr] + g21 * g1[jr] + g22 * g2[jr];
620 
621  const ST dX_i = g00 * g0[ji] + g01 * g1[ji] + g02 * g2[ji];
622  const ST dY_i = g10 * g0[ji] + g11 * g1[ji] + g12 * g2[ji];
623  const ST dZ_i = g20 * g0[ji] + g21 * g1[ji] + g22 * g2[ji];
624 
625  // \f$\nabla \psi_r + {\bf k}\psi_i\f$
626  const ST gX_r = dX_r + val_i * kX;
627  const ST gY_r = dY_r + val_i * kY;
628  const ST gZ_r = dZ_r + val_i * kZ;
629  const ST gX_i = dX_i - val_r * kX;
630  const ST gY_i = dY_i - val_r * kY;
631  const ST gZ_i = dZ_i - val_r * kZ;
632 
633  const size_t psiIndex = j + first_spo;
634  psi[psiIndex] = ComplexT(c * val_r - s * val_i, c * val_i + s * val_r);
635  dpsi[psiIndex][0] = ComplexT(c * gX_r - s * gX_i, c * gX_i + s * gX_r);
636  dpsi[psiIndex][1] = ComplexT(c * gY_r - s * gY_i, c * gY_i + s * gY_r);
637  dpsi[psiIndex][2] = ComplexT(c * gZ_r - s * gZ_i, c * gZ_i + s * gZ_r);
638 
639  //intermediates for computation of hessian. \partial_i \partial_j phi in cartesian coordinates.
640  const ST f_xx_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g00, g01, g02);
641  const ST f_xy_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g10, g11, g12);
642  const ST f_xz_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g00, g01, g02, g20, g21, g22);
643  const ST f_yy_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g10, g11, g12, g10, g11, g12);
644  const ST f_yz_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g10, g11, g12, g20, g21, g22);
645  const ST f_zz_r = v_m_v(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], g20, g21, g22, g20, g21, g22);
646 
647  const ST f_xx_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g00, g01, g02);
648  const ST f_xy_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g10, g11, g12);
649  const ST f_xz_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g00, g01, g02, g20, g21, g22);
650  const ST f_yy_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g10, g11, g12, g10, g11, g12);
651  const ST f_yz_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g10, g11, g12, g20, g21, g22);
652  const ST f_zz_i = v_m_v(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], g20, g21, g22, g20, g21, g22);
653 
654  const ST h_xx_r = f_xx_r + 2 * kX * dX_i - kX * kX * val_r;
655  const ST h_xy_r = f_xy_r + (kX * dY_i + kY * dX_i) - kX * kY * val_r;
656  const ST h_xz_r = f_xz_r + (kX * dZ_i + kZ * dX_i) - kX * kZ * val_r;
657  const ST h_yy_r = f_yy_r + 2 * kY * dY_i - kY * kY * val_r;
658  const ST h_yz_r = f_yz_r + (kY * dZ_i + kZ * dY_i) - kY * kZ * val_r;
659  const ST h_zz_r = f_zz_r + 2 * kZ * dZ_i - kZ * kZ * val_r;
660 
661  const ST h_xx_i = f_xx_i - 2 * kX * dX_r - kX * kX * val_i;
662  const ST h_xy_i = f_xy_i - (kX * dY_r + kY * dX_r) - kX * kY * val_i;
663  const ST h_xz_i = f_xz_i - (kX * dZ_r + kZ * dX_r) - kX * kZ * val_i;
664  const ST h_yy_i = f_yy_i - 2 * kY * dY_r - kY * kY * val_i;
665  const ST h_yz_i = f_yz_i - (kZ * dY_r + kY * dZ_r) - kZ * kY * val_i;
666  const ST h_zz_i = f_zz_i - 2 * kZ * dZ_r - kZ * kZ * val_i;
667 
668  grad_grad_psi[psiIndex][0] = ComplexT(c * h_xx_r - s * h_xx_i, c * h_xx_i + s * h_xx_r);
669  grad_grad_psi[psiIndex][1] = ComplexT(c * h_xy_r - s * h_xy_i, c * h_xy_i + s * h_xy_r);
670  grad_grad_psi[psiIndex][2] = ComplexT(c * h_xz_r - s * h_xz_i, c * h_xz_i + s * h_xz_r);
671  grad_grad_psi[psiIndex][3] = ComplexT(c * h_xy_r - s * h_xy_i, c * h_xy_i + s * h_xy_r);
672  grad_grad_psi[psiIndex][4] = ComplexT(c * h_yy_r - s * h_yy_i, c * h_yy_i + s * h_yy_r);
673  grad_grad_psi[psiIndex][5] = ComplexT(c * h_yz_r - s * h_yz_i, c * h_yz_i + s * h_yz_r);
674  grad_grad_psi[psiIndex][6] = ComplexT(c * h_xz_r - s * h_xz_i, c * h_xz_i + s * h_xz_r);
675  grad_grad_psi[psiIndex][7] = ComplexT(c * h_yz_r - s * h_yz_i, c * h_yz_i + s * h_yz_r);
676  grad_grad_psi[psiIndex][8] = ComplexT(c * h_zz_r - s * h_zz_i, c * h_zz_i + s * h_zz_r);
677 
678  //These are the real and imaginary components of the third SPO derivative. _xxx denotes
679  // third derivative w.r.t. x, _xyz, a derivative with resepect to x,y, and z, and so on.
680 
681  const ST f3_xxx_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
682  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g00, g01, g02, g00, g01, g02);
683  const ST f3_xxy_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
684  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g00, g01, g02, g10, g11, g12);
685  const ST f3_xxz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
686  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g00, g01, g02, g20, g21, g22);
687  const ST f3_xyy_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
688  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g10, g11, g12, g10, g11, g12);
689  const ST f3_xyz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
690  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g10, g11, g12, g20, g21, g22);
691  const ST f3_xzz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
692  gh112[jr], gh122[jr], gh222[jr], g00, g01, g02, g20, g21, g22, g20, g21, g22);
693  const ST f3_yyy_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
694  gh112[jr], gh122[jr], gh222[jr], g10, g11, g12, g10, g11, g12, g10, g11, g12);
695  const ST f3_yyz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
696  gh112[jr], gh122[jr], gh222[jr], g10, g11, g12, g10, g11, g12, g20, g21, g22);
697  const ST f3_yzz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
698  gh112[jr], gh122[jr], gh222[jr], g10, g11, g12, g20, g21, g22, g20, g21, g22);
699  const ST f3_zzz_r = t3_contract(gh000[jr], gh001[jr], gh002[jr], gh011[jr], gh012[jr], gh022[jr], gh111[jr],
700  gh112[jr], gh122[jr], gh222[jr], g20, g21, g22, g20, g21, g22, g20, g21, g22);
701 
702  const ST f3_xxx_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
703  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g00, g01, g02, g00, g01, g02);
704  const ST f3_xxy_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
705  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g00, g01, g02, g10, g11, g12);
706  const ST f3_xxz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
707  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g00, g01, g02, g20, g21, g22);
708  const ST f3_xyy_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
709  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g10, g11, g12, g10, g11, g12);
710  const ST f3_xyz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
711  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g10, g11, g12, g20, g21, g22);
712  const ST f3_xzz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
713  gh112[ji], gh122[ji], gh222[ji], g00, g01, g02, g20, g21, g22, g20, g21, g22);
714  const ST f3_yyy_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
715  gh112[ji], gh122[ji], gh222[ji], g10, g11, g12, g10, g11, g12, g10, g11, g12);
716  const ST f3_yyz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
717  gh112[ji], gh122[ji], gh222[ji], g10, g11, g12, g10, g11, g12, g20, g21, g22);
718  const ST f3_yzz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
719  gh112[ji], gh122[ji], gh222[ji], g10, g11, g12, g20, g21, g22, g20, g21, g22);
720  const ST f3_zzz_i = t3_contract(gh000[ji], gh001[ji], gh002[ji], gh011[ji], gh012[ji], gh022[ji], gh111[ji],
721  gh112[ji], gh122[ji], gh222[ji], g20, g21, g22, g20, g21, g22, g20, g21, g22);
722 
723  //Here is where we build up the components of the physical hessian gradient, namely, d^3/dx^3(e^{-ik*r}\phi(r)
724  const ST gh_xxx_r = f3_xxx_r + 3 * kX * f_xx_i - 3 * kX * kX * dX_r - kX * kX * kX * val_i;
725  const ST gh_xxx_i = f3_xxx_i - 3 * kX * f_xx_r - 3 * kX * kX * dX_i + kX * kX * kX * val_r;
726  const ST gh_xxy_r =
727  f3_xxy_r + (kY * f_xx_i + 2 * kX * f_xy_i) - (kX * kX * dY_r + 2 * kX * kY * dX_r) - kX * kX * kY * val_i;
728  const ST gh_xxy_i =
729  f3_xxy_i - (kY * f_xx_r + 2 * kX * f_xy_r) - (kX * kX * dY_i + 2 * kX * kY * dX_i) + kX * kX * kY * val_r;
730  const ST gh_xxz_r =
731  f3_xxz_r + (kZ * f_xx_i + 2 * kX * f_xz_i) - (kX * kX * dZ_r + 2 * kX * kZ * dX_r) - kX * kX * kZ * val_i;
732  const ST gh_xxz_i =
733  f3_xxz_i - (kZ * f_xx_r + 2 * kX * f_xz_r) - (kX * kX * dZ_i + 2 * kX * kZ * dX_i) + kX * kX * kZ * val_r;
734  const ST gh_xyy_r =
735  f3_xyy_r + (2 * kY * f_xy_i + kX * f_yy_i) - (2 * kX * kY * dY_r + kY * kY * dX_r) - kX * kY * kY * val_i;
736  const ST gh_xyy_i =
737  f3_xyy_i - (2 * kY * f_xy_r + kX * f_yy_r) - (2 * kX * kY * dY_i + kY * kY * dX_i) + kX * kY * kY * val_r;
738  const ST gh_xyz_r = f3_xyz_r + (kX * f_yz_i + kY * f_xz_i + kZ * f_xy_i) -
739  (kX * kY * dZ_r + kY * kZ * dX_r + kZ * kX * dY_r) - kX * kY * kZ * val_i;
740  const ST gh_xyz_i = f3_xyz_i - (kX * f_yz_r + kY * f_xz_r + kZ * f_xy_r) -
741  (kX * kY * dZ_i + kY * kZ * dX_i + kZ * kX * dY_i) + kX * kY * kZ * val_r;
742  const ST gh_xzz_r =
743  f3_xzz_r + (2 * kZ * f_xz_i + kX * f_zz_i) - (2 * kX * kZ * dZ_r + kZ * kZ * dX_r) - kX * kZ * kZ * val_i;
744  const ST gh_xzz_i =
745  f3_xzz_i - (2 * kZ * f_xz_r + kX * f_zz_r) - (2 * kX * kZ * dZ_i + kZ * kZ * dX_i) + kX * kZ * kZ * val_r;
746  const ST gh_yyy_r = f3_yyy_r + 3 * kY * f_yy_i - 3 * kY * kY * dY_r - kY * kY * kY * val_i;
747  const ST gh_yyy_i = f3_yyy_i - 3 * kY * f_yy_r - 3 * kY * kY * dY_i + kY * kY * kY * val_r;
748  const ST gh_yyz_r =
749  f3_yyz_r + (kZ * f_yy_i + 2 * kY * f_yz_i) - (kY * kY * dZ_r + 2 * kY * kZ * dY_r) - kY * kY * kZ * val_i;
750  const ST gh_yyz_i =
751  f3_yyz_i - (kZ * f_yy_r + 2 * kY * f_yz_r) - (kY * kY * dZ_i + 2 * kY * kZ * dY_i) + kY * kY * kZ * val_r;
752  const ST gh_yzz_r =
753  f3_yzz_r + (2 * kZ * f_yz_i + kY * f_zz_i) - (2 * kY * kZ * dZ_r + kZ * kZ * dY_r) - kY * kZ * kZ * val_i;
754  const ST gh_yzz_i =
755  f3_yzz_i - (2 * kZ * f_yz_r + kY * f_zz_r) - (2 * kY * kZ * dZ_i + kZ * kZ * dY_i) + kY * kZ * kZ * val_r;
756  const ST gh_zzz_r = f3_zzz_r + 3 * kZ * f_zz_i - 3 * kZ * kZ * dZ_r - kZ * kZ * kZ * val_i;
757  const ST gh_zzz_i = f3_zzz_i - 3 * kZ * f_zz_r - 3 * kZ * kZ * dZ_i + kZ * kZ * kZ * val_r;
758 
759  grad_grad_grad_psi[psiIndex][0][0] = ComplexT(c * gh_xxx_r - s * gh_xxx_i, c * gh_xxx_i + s * gh_xxx_r);
760  grad_grad_grad_psi[psiIndex][0][1] = ComplexT(c * gh_xxy_r - s * gh_xxy_i, c * gh_xxy_i + s * gh_xxy_r);
761  grad_grad_grad_psi[psiIndex][0][2] = ComplexT(c * gh_xxz_r - s * gh_xxz_i, c * gh_xxz_i + s * gh_xxz_r);
762  grad_grad_grad_psi[psiIndex][0][3] = ComplexT(c * gh_xxy_r - s * gh_xxy_i, c * gh_xxy_i + s * gh_xxy_r);
763  grad_grad_grad_psi[psiIndex][0][4] = ComplexT(c * gh_xyy_r - s * gh_xyy_i, c * gh_xyy_i + s * gh_xyy_r);
764  grad_grad_grad_psi[psiIndex][0][5] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
765  grad_grad_grad_psi[psiIndex][0][6] = ComplexT(c * gh_xxz_r - s * gh_xxz_i, c * gh_xxz_i + s * gh_xxz_r);
766  grad_grad_grad_psi[psiIndex][0][7] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
767  grad_grad_grad_psi[psiIndex][0][8] = ComplexT(c * gh_xzz_r - s * gh_xzz_i, c * gh_xzz_i + s * gh_xzz_r);
768 
769  grad_grad_grad_psi[psiIndex][1][0] = ComplexT(c * gh_xxy_r - s * gh_xxy_i, c * gh_xxy_i + s * gh_xxy_r);
770  grad_grad_grad_psi[psiIndex][1][1] = ComplexT(c * gh_xyy_r - s * gh_xyy_i, c * gh_xyy_i + s * gh_xyy_r);
771  grad_grad_grad_psi[psiIndex][1][2] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
772  grad_grad_grad_psi[psiIndex][1][3] = ComplexT(c * gh_xyy_r - s * gh_xyy_i, c * gh_xyy_i + s * gh_xyy_r);
773  grad_grad_grad_psi[psiIndex][1][4] = ComplexT(c * gh_yyy_r - s * gh_yyy_i, c * gh_yyy_i + s * gh_yyy_r);
774  grad_grad_grad_psi[psiIndex][1][5] = ComplexT(c * gh_yyz_r - s * gh_yyz_i, c * gh_yyz_i + s * gh_yyz_r);
775  grad_grad_grad_psi[psiIndex][1][6] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
776  grad_grad_grad_psi[psiIndex][1][7] = ComplexT(c * gh_yyz_r - s * gh_yyz_i, c * gh_yyz_i + s * gh_yyz_r);
777  grad_grad_grad_psi[psiIndex][1][8] = ComplexT(c * gh_yzz_r - s * gh_yzz_i, c * gh_yzz_i + s * gh_yzz_r);
778 
779 
780  grad_grad_grad_psi[psiIndex][2][0] = ComplexT(c * gh_xxz_r - s * gh_xxz_i, c * gh_xxz_i + s * gh_xxz_r);
781  grad_grad_grad_psi[psiIndex][2][1] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
782  grad_grad_grad_psi[psiIndex][2][2] = ComplexT(c * gh_xzz_r - s * gh_xzz_i, c * gh_xzz_i + s * gh_xzz_r);
783  grad_grad_grad_psi[psiIndex][2][3] = ComplexT(c * gh_xyz_r - s * gh_xyz_i, c * gh_xyz_i + s * gh_xyz_r);
784  grad_grad_grad_psi[psiIndex][2][4] = ComplexT(c * gh_yyz_r - s * gh_yyz_i, c * gh_yyz_i + s * gh_yyz_r);
785  grad_grad_grad_psi[psiIndex][2][5] = ComplexT(c * gh_yzz_r - s * gh_yzz_i, c * gh_yzz_i + s * gh_yzz_r);
786  grad_grad_grad_psi[psiIndex][2][6] = ComplexT(c * gh_xzz_r - s * gh_xzz_i, c * gh_xzz_i + s * gh_xzz_r);
787  grad_grad_grad_psi[psiIndex][2][7] = ComplexT(c * gh_yzz_r - s * gh_yzz_i, c * gh_yzz_i + s * gh_yzz_r);
788  grad_grad_grad_psi[psiIndex][2][8] = ComplexT(c * gh_zzz_r - s * gh_zzz_i, c * gh_zzz_i + s * gh_zzz_r);
789  }
790 }
T v_m_v(T h00, T h01, T h02, T h11, T h12, T h22, T g1x, T g1y, T g1z, T g2x, T g2y, T g2z)
compute vector[3]^T x matrix[3][3] x vector[3]
T t3_contract(T h000, T h001, T h002, T h011, T h012, T h022, T h111, T h112, T h122, T h222, T g1x, T g1y, T g1z, T g2x, T g2y, T g2z, T g3x, T g3y, T g3z)
Coordinate transform for a 3rd rank symmetric tensor representing coordinate derivatives (hence t3_co...
Tensor_t G
Reciprocal unit vectors. G(j,i) i=vector and j=x,y,z.
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
T min(T a, T b)
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
Definition: math.hpp:62
gContainer_type myG
Definition: SplineC2C.h:79
size_t first_spo
first index of the SPOs this Spline handles
Definition: BsplineSet.h:41
hContainer_type myH
Definition: SplineC2C.h:80
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52
ghContainer_type mygH
Definition: SplineC2C.h:81

◆ assign_vgl()

void assign_vgl ( const PointType r,
ValueVector psi,
GradVector dpsi,
ValueVector d2psi,
int  first,
int  last 
) const
inline

assign_vgl

Definition at line 252 of file SplineC2C.cpp.

References TinyVector< T, D >::data(), omptarget::min(), qmcplusplus::Units::time::s, qmcplusplus::sincos(), and qmcplusplus::SymTrace().

258 {
259  // protect last
260  const int last_cplx = std::min(kPoints.size(), psi.size());
261  last = last > last_cplx ? last_cplx : last;
262 
263  constexpr ST zero(0);
264  constexpr ST two(2);
265  const ST g00 = PrimLattice.G(0), g01 = PrimLattice.G(1), g02 = PrimLattice.G(2), g10 = PrimLattice.G(3),
266  g11 = PrimLattice.G(4), g12 = PrimLattice.G(5), g20 = PrimLattice.G(6), g21 = PrimLattice.G(7),
267  g22 = PrimLattice.G(8);
268  const ST x = r[0], y = r[1], z = r[2];
269  const ST symGG[6] = {GGt[0], GGt[1] + GGt[3], GGt[2] + GGt[6], GGt[4], GGt[5] + GGt[7], GGt[8]};
270 
271  const ST* restrict k0 = myKcart.data(0);
272  const ST* restrict k1 = myKcart.data(1);
273  const ST* restrict k2 = myKcart.data(2);
274 
275  const ST* restrict g0 = myG.data(0);
276  const ST* restrict g1 = myG.data(1);
277  const ST* restrict g2 = myG.data(2);
278  const ST* restrict h00 = myH.data(0);
279  const ST* restrict h01 = myH.data(1);
280  const ST* restrict h02 = myH.data(2);
281  const ST* restrict h11 = myH.data(3);
282  const ST* restrict h12 = myH.data(4);
283  const ST* restrict h22 = myH.data(5);
284 
285 #pragma omp simd
286  for (size_t j = first; j < last; ++j)
287  {
288  const size_t jr = j << 1;
289  const size_t ji = jr + 1;
290 
291  const ST kX = k0[j];
292  const ST kY = k1[j];
293  const ST kZ = k2[j];
294  const ST val_r = myV[jr];
295  const ST val_i = myV[ji];
296 
297  //phase
298  ST s, c;
299  qmcplusplus::sincos(-(x * kX + y * kY + z * kZ), &s, &c);
300 
301  //dot(PrimLattice.G,myG[j])
302  const ST dX_r = g00 * g0[jr] + g01 * g1[jr] + g02 * g2[jr];
303  const ST dY_r = g10 * g0[jr] + g11 * g1[jr] + g12 * g2[jr];
304  const ST dZ_r = g20 * g0[jr] + g21 * g1[jr] + g22 * g2[jr];
305 
306  const ST dX_i = g00 * g0[ji] + g01 * g1[ji] + g02 * g2[ji];
307  const ST dY_i = g10 * g0[ji] + g11 * g1[ji] + g12 * g2[ji];
308  const ST dZ_i = g20 * g0[ji] + g21 * g1[ji] + g22 * g2[ji];
309 
310  // \f$\nabla \psi_r + {\bf k}\psi_i\f$
311  const ST gX_r = dX_r + val_i * kX;
312  const ST gY_r = dY_r + val_i * kY;
313  const ST gZ_r = dZ_r + val_i * kZ;
314  const ST gX_i = dX_i - val_r * kX;
315  const ST gY_i = dY_i - val_r * kY;
316  const ST gZ_i = dZ_i - val_r * kZ;
317 
318  const ST lcart_r = SymTrace(h00[jr], h01[jr], h02[jr], h11[jr], h12[jr], h22[jr], symGG);
319  const ST lcart_i = SymTrace(h00[ji], h01[ji], h02[ji], h11[ji], h12[ji], h22[ji], symGG);
320  const ST lap_r = lcart_r + mKK[j] * val_r + two * (kX * dX_i + kY * dY_i + kZ * dZ_i);
321  const ST lap_i = lcart_i + mKK[j] * val_i - two * (kX * dX_r + kY * dY_r + kZ * dZ_r);
322  const size_t psiIndex = j + first_spo;
323  psi[psiIndex] = ComplexT(c * val_r - s * val_i, c * val_i + s * val_r);
324  dpsi[psiIndex][0] = ComplexT(c * gX_r - s * gX_i, c * gX_i + s * gX_r);
325  dpsi[psiIndex][1] = ComplexT(c * gY_r - s * gY_i, c * gY_i + s * gY_r);
326  dpsi[psiIndex][2] = ComplexT(c * gZ_r - s * gZ_i, c * gZ_i + s * gZ_r);
327  d2psi[psiIndex] = ComplexT(c * lap_r - s * lap_i, c * lap_i + s * lap_r);
328  }
329 }
T SymTrace(T h00, T h01, T h02, T h11, T h12, T h22, const T gg[6])
compute Trace(H*G)
Tensor< ST, 3 > GGt
, transformation for tensor in LatticeUnit to CartesianUnit, e.g. Hessian
Definition: SplineC2C.h:62
Tensor_t G
Reciprocal unit vectors. G(j,i) i=vector and j=x,y,z.
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
T min(T a, T b)
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
Definition: math.hpp:62
gContainer_type myG
Definition: SplineC2C.h:79
size_t first_spo
first index of the SPOs this Spline handles
Definition: BsplineSet.h:41
vContainer_type mKK
Definition: SplineC2C.h:69
hContainer_type myH
Definition: SplineC2C.h:80
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ assign_vgl_from_l()

void assign_vgl_from_l ( const PointType r,
ValueVector psi,
GradVector dpsi,
ValueVector d2psi 
)
inline

assign_vgl_from_l can be used when myL is precomputed and myV,myG,myL in cartesian

Definition at line 334 of file SplineC2C.cpp.

References TinyVector< T, D >::data(), qmcplusplus::Units::force::N, qmcplusplus::Units::time::s, and qmcplusplus::sincos().

335 {
336  constexpr ST two(2);
337  const ST x = r[0], y = r[1], z = r[2];
338 
339  const ST* restrict k0 = myKcart.data(0);
340  const ST* restrict k1 = myKcart.data(1);
341  const ST* restrict k2 = myKcart.data(2);
342 
343  const ST* restrict g0 = myG.data(0);
344  const ST* restrict g1 = myG.data(1);
345  const ST* restrict g2 = myG.data(2);
346 
347  const size_t last_cplx = last_spo > psi.size() ? psi.size() : last_spo;
348  const size_t N = last_cplx - first_spo;
349 #pragma omp simd
350  for (size_t j = 0; j < N; ++j)
351  {
352  const size_t jr = j << 1;
353  const size_t ji = jr + 1;
354 
355  const ST kX = k0[j];
356  const ST kY = k1[j];
357  const ST kZ = k2[j];
358  const ST val_r = myV[jr];
359  const ST val_i = myV[ji];
360 
361  //phase
362  ST s, c;
363  qmcplusplus::sincos(-(x * kX + y * kY + z * kZ), &s, &c);
364 
365  //dot(PrimLattice.G,myG[j])
366  const ST dX_r = g0[jr];
367  const ST dY_r = g1[jr];
368  const ST dZ_r = g2[jr];
369 
370  const ST dX_i = g0[ji];
371  const ST dY_i = g1[ji];
372  const ST dZ_i = g2[ji];
373 
374  // \f$\nabla \psi_r + {\bf k}\psi_i\f$
375  const ST gX_r = dX_r + val_i * kX;
376  const ST gY_r = dY_r + val_i * kY;
377  const ST gZ_r = dZ_r + val_i * kZ;
378  const ST gX_i = dX_i - val_r * kX;
379  const ST gY_i = dY_i - val_r * kY;
380  const ST gZ_i = dZ_i - val_r * kZ;
381 
382  const ST lap_r = myL[jr] + mKK[j] * val_r + two * (kX * dX_i + kY * dY_i + kZ * dZ_i);
383  const ST lap_i = myL[ji] + mKK[j] * val_i - two * (kX * dX_r + kY * dY_r + kZ * dZ_r);
384 
385  const size_t psiIndex = j + first_spo;
386  psi[psiIndex] = ComplexT(c * val_r - s * val_i, c * val_i + s * val_r);
387  dpsi[psiIndex][0] = ComplexT(c * gX_r - s * gX_i, c * gX_i + s * gX_r);
388  dpsi[psiIndex][1] = ComplexT(c * gY_r - s * gY_i, c * gY_i + s * gY_r);
389  dpsi[psiIndex][2] = ComplexT(c * gZ_r - s * gZ_i, c * gZ_i + s * gZ_r);
390  d2psi[psiIndex] = ComplexT(c * lap_r - s * lap_i, c * lap_i + s * lap_r);
391  }
392 }
vContainer_type myL
Definition: SplineC2C.h:78
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
Definition: math.hpp:62
gContainer_type myG
Definition: SplineC2C.h:79
size_t first_spo
first index of the SPOs this Spline handles
Definition: BsplineSet.h:41
vContainer_type mKK
Definition: SplineC2C.h:69
size_t last_spo
last index of the SPOs this Spline handles
Definition: BsplineSet.h:43

◆ bcast_tables()

void bcast_tables ( Communicate comm)
inline

Definition at line 122 of file SplineC2C.h.

References qmcplusplus::comm, and SplineC2C< ST >::SplineInst.

122 { chunked_bcast(comm, SplineInst->getSplinePtr()); }
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64

◆ create_spline()

void create_spline ( GT &  xyz_g,
BCT &  xyz_bc 
)
inline

Definition at line 138 of file SplineC2C.h.

References qmcplusplus::app_log(), SplineC2C< ST >::myV, SplineC2C< ST >::resize_kpoints(), Vector< T, Alloc >::size(), and SplineC2C< ST >::SplineInst.

139  {
140  resize_kpoints();
141  SplineInst = std::make_shared<MultiBspline<ST>>();
142  SplineInst->create(xyz_g, xyz_bc, myV.size());
143  app_log() << "MEMORY " << SplineInst->sizeInByte() / (1 << 20) << " MB allocated "
144  << "for the coefficients in 3D spline orbital representation" << std::endl;
145  }
std::ostream & app_log()
Definition: OutputManager.h:65
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
size_type size() const
return the current size
Definition: OhmmsVector.h:162
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void resize_kpoints()
remap kPoints to pack the double copy
Definition: SplineC2C.h:150

◆ evaluateDetRatios()

void evaluateDetRatios ( const VirtualParticleSet VP,
ValueVector psi,
const ValueVector psiinv,
std::vector< ValueType > &  ratios 
)
overridevirtual

evaluate determinant ratios for virtual moves, e.g., sphere move for nonlocalPP

Parameters
VPvirtual particle set
psivalues of the SPO, used as a scratch space if needed
psiinvthe row of inverse slater matrix corresponding to the particle moved virtually
ratiosreturn determinant ratios

Reimplemented from SPOSet.

Definition at line 206 of file SplineC2C.cpp.

References ParticleSet::activeR(), qmcplusplus::C2C::assign_v(), qmcplusplus::simd::dot(), FairDivideAligned(), VirtualParticleSet::getTotalNum(), omp_get_num_threads(), and omp_get_thread_num().

210 {
211  const bool need_resize = ratios_private.rows() < VP.getTotalNum();
212 
213 #pragma omp parallel
214  {
215  int tid = omp_get_thread_num();
216  // initialize thread private ratios
217  if (need_resize)
218  {
219  if (tid == 0) // just like #pragma omp master, but one fewer call to the runtime
220  ratios_private.resize(VP.getTotalNum(), omp_get_num_threads());
221 #pragma omp barrier
222  }
223  int first, last;
224  // Factor of 2 because psi is complex and the spline storage and evaluation uses a real type
225  FairDivideAligned(2 * psi.size(), getAlignment<ST>(), omp_get_num_threads(), tid, first, last);
226  const int first_cplx = first / 2;
227  const int last_cplx = kPoints.size() < last / 2 ? kPoints.size() : last / 2;
228 
229  for (int iat = 0; iat < VP.getTotalNum(); ++iat)
230  {
231  const PointType& r = VP.activeR(iat);
233 
234  spline2::evaluate3d(SplineInst->getSplinePtr(), ru, myV, first, last);
235  assign_v(r, myV, psi, first_cplx, last_cplx);
236  ratios_private[iat][tid] = simd::dot(psi.data() + first_cplx, psiinv.data() + first_cplx, last_cplx - first_cplx);
237  }
238  }
239 
240  // do the reduction manually
241  for (int iat = 0; iat < VP.getTotalNum(); ++iat)
242  {
243  ratios[iat] = ComplexT(0);
244  for (int tid = 0; tid < ratios_private.cols(); tid++)
245  ratios[iat] += ratios_private[iat][tid];
246  }
247 }
T dot(const T *restrict a, const T *restrict b, int n, TRES res=TRES())
dot product
void resize(size_type n, size_type m)
Resize the container.
Definition: OhmmsMatrix.h:99
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
size_type cols() const
Definition: OhmmsMatrix.h:78
omp_int_t omp_get_thread_num()
Definition: OpenMP.h:25
TinyVector< ST, 3 > PointType
Definition: SplineC2C.h:43
SingleParticlePos toUnit_floor(const TinyVector< T1, D > &r) const
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void FairDivideAligned(const int ntot, const int base, const int npart, const int me, int &first, int &last)
Partition ntot over npart and the size of each partition is a multiple of base size.
Definition: FairDivide.h:96
Matrix< ComplexT > ratios_private
thread private ratios for reduction when using nested threading, numVP x numThread ...
Definition: SplineC2C.h:73
typename BsplineSet::ValueType ComplexT
Definition: SplineC2C.h:47
void assign_v(const PointType &r, const vContainer_type &myV, ValueVector &psi, int first, int last) const
Definition: SplineC2C.cpp:163
omp_int_t omp_get_num_threads()
Definition: OpenMP.h:27
size_type rows() const
Definition: OhmmsMatrix.h:77
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ evaluateValue()

void evaluateValue ( const ParticleSet P,
const int  iat,
ValueVector psi 
)
overridevirtual

evaluate the values of this single-particle orbital set

Parameters
Pcurrent ParticleSet
iatactive particle
psivalues of the SPO

Implements SPOSet.

Definition at line 189 of file SplineC2C.cpp.

References ParticleSet::activeR(), qmcplusplus::C2C::assign_v(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().

190 {
191  const PointType& r = P.activeR(iat);
193 
194 #pragma omp parallel
195  {
196  int first, last;
197  // Factor of 2 because psi is complex and the spline storage and evaluation uses a real type
198  FairDivideAligned(2 * psi.size(), getAlignment<ST>(), omp_get_num_threads(), omp_get_thread_num(), first, last);
199 
200  spline2::evaluate3d(SplineInst->getSplinePtr(), ru, myV, first, last);
201  assign_v(r, myV, psi, first / 2, last / 2);
202  }
203 }
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
omp_int_t omp_get_thread_num()
Definition: OpenMP.h:25
TinyVector< ST, 3 > PointType
Definition: SplineC2C.h:43
SingleParticlePos toUnit_floor(const TinyVector< T1, D > &r) const
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void FairDivideAligned(const int ntot, const int base, const int npart, const int me, int &first, int &last)
Partition ntot over npart and the size of each partition is a multiple of base size.
Definition: FairDivide.h:96
void assign_v(const PointType &r, const vContainer_type &myV, ValueVector &psi, int first, int last) const
Definition: SplineC2C.cpp:163
omp_int_t omp_get_num_threads()
Definition: OpenMP.h:27
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60

◆ evaluateVGH()

void evaluateVGH ( const ParticleSet P,
const int  iat,
ValueVector psi,
GradVector dpsi,
HessVector grad_grad_psi 
)
overridevirtual

evaluate the values, gradients and hessians of this single-particle orbital set

Parameters
Pcurrent ParticleSet
iatactive particle
psivalues of the SPO
dpsigradients of the SPO
grad_grad_psihessians of the SPO

Reimplemented from SPOSet.

Definition at line 536 of file SplineC2C.cpp.

References ParticleSet::activeR(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().

541 {
542  const PointType& r = P.activeR(iat);
544 
545 #pragma omp parallel
546  {
547  int first, last;
548  // Factor of 2 because psi is complex and the spline storage and evaluation uses a real type
549  FairDivideAligned(2 * psi.size(), getAlignment<ST>(), omp_get_num_threads(), omp_get_thread_num(), first, last);
550 
551  spline2::evaluate3d_vgh(SplineInst->getSplinePtr(), ru, myV, myG, myH, first, last);
552  assign_vgh(r, psi, dpsi, grad_grad_psi, first / 2, last / 2);
553  }
554 }
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
omp_int_t omp_get_thread_num()
Definition: OpenMP.h:25
TinyVector< ST, 3 > PointType
Definition: SplineC2C.h:43
void assign_vgh(const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, int first, int last) const
Definition: SplineC2C.cpp:416
SingleParticlePos toUnit_floor(const TinyVector< T1, D > &r) const
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void FairDivideAligned(const int ntot, const int base, const int npart, const int me, int &first, int &last)
Partition ntot over npart and the size of each partition is a multiple of base size.
Definition: FairDivide.h:96
omp_int_t omp_get_num_threads()
Definition: OpenMP.h:27
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
gContainer_type myG
Definition: SplineC2C.h:79
hContainer_type myH
Definition: SplineC2C.h:80

◆ evaluateVGHGH()

void evaluateVGHGH ( const ParticleSet P,
const int  iat,
ValueVector psi,
GradVector dpsi,
HessVector grad_grad_psi,
GGGVector grad_grad_grad_psi 
)
overridevirtual

evaluate the values, gradients, hessians, and grad hessians of this single-particle orbital set

Parameters
Pcurrent ParticleSet
iatactive particle
psivalues of the SPO
dpsigradients of the SPO
grad_grad_psihessians of the SPO
grad_grad_grad_psigrad hessians of the SPO

Reimplemented from SPOSet.

Definition at line 793 of file SplineC2C.cpp.

References ParticleSet::activeR(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().

799 {
800  const PointType& r = P.activeR(iat);
802 #pragma omp parallel
803  {
804  int first, last;
805  // Factor of 2 because psi is complex and the spline storage and evaluation uses a real type
806  FairDivideAligned(2 * psi.size(), getAlignment<ST>(), omp_get_num_threads(), omp_get_thread_num(), first, last);
807 
808  spline2::evaluate3d_vghgh(SplineInst->getSplinePtr(), ru, myV, myG, myH, mygH, first, last);
809  assign_vghgh(r, psi, dpsi, grad_grad_psi, grad_grad_grad_psi, first / 2, last / 2);
810  }
811 }
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
omp_int_t omp_get_thread_num()
Definition: OpenMP.h:25
TinyVector< ST, 3 > PointType
Definition: SplineC2C.h:43
SingleParticlePos toUnit_floor(const TinyVector< T1, D > &r) const
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void FairDivideAligned(const int ntot, const int base, const int npart, const int me, int &first, int &last)
Partition ntot over npart and the size of each partition is a multiple of base size.
Definition: FairDivide.h:96
omp_int_t omp_get_num_threads()
Definition: OpenMP.h:27
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
gContainer_type myG
Definition: SplineC2C.h:79
hContainer_type myH
Definition: SplineC2C.h:80
void assign_vghgh(const PointType &r, ValueVector &psi, GradVector &dpsi, HessVector &grad_grad_psi, GGGVector &grad_grad_grad_psi, int first=0, int last=-1) const
Definition: SplineC2C.cpp:557
ghContainer_type mygH
Definition: SplineC2C.h:81

◆ evaluateVGL()

void evaluateVGL ( const ParticleSet P,
const int  iat,
ValueVector psi,
GradVector dpsi,
ValueVector d2psi 
)
overridevirtual

evaluate the values, gradients and laplacians of this single-particle orbital set

Parameters
Pcurrent ParticleSet
iatactive particle
psivalues of the SPO
dpsigradients of the SPO
d2psilaplacians of the SPO

Implements SPOSet.

Definition at line 395 of file SplineC2C.cpp.

References ParticleSet::activeR(), qmcplusplus::C2C::assign_vgl(), FairDivideAligned(), omp_get_num_threads(), and omp_get_thread_num().

400 {
401  const PointType& r = P.activeR(iat);
403 
404 #pragma omp parallel
405  {
406  int first, last;
407  // Factor of 2 because psi is complex and the spline storage and evaluation uses a real type
408  FairDivideAligned(2 * psi.size(), getAlignment<ST>(), omp_get_num_threads(), omp_get_thread_num(), first, last);
409 
410  spline2::evaluate3d_vgh(SplineInst->getSplinePtr(), ru, myV, myG, myH, first, last);
411  assign_vgl(r, psi, dpsi, d2psi, first / 2, last / 2);
412  }
413 }
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
omp_int_t omp_get_thread_num()
Definition: OpenMP.h:25
TinyVector< ST, 3 > PointType
Definition: SplineC2C.h:43
SingleParticlePos toUnit_floor(const TinyVector< T1, D > &r) const
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void FairDivideAligned(const int ntot, const int base, const int npart, const int me, int &first, int &last)
Partition ntot over npart and the size of each partition is a multiple of base size.
Definition: FairDivide.h:96
omp_int_t omp_get_num_threads()
Definition: OpenMP.h:27
CrystalLattice< ST, 3 > PrimLattice
primitive cell
Definition: SplineC2C.h:60
void assign_vgl(const PointType &r, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, int first, int last) const
assign_vgl
Definition: SplineC2C.cpp:252
gContainer_type myG
Definition: SplineC2C.h:79
hContainer_type myH
Definition: SplineC2C.h:80

◆ flush_zero()

void flush_zero ( )
inline

Definition at line 147 of file SplineC2C.h.

References SplineC2C< ST >::SplineInst.

147 { SplineInst->flush_zero(); }
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64

◆ gather_tables()

void gather_tables ( Communicate comm)
inline

Definition at line 124 of file SplineC2C.h.

References qmcplusplus::comm, FairDivideLow(), gatherv(), BsplineSet::kPoints, BsplineSet::offset, Communicate::size(), and SplineC2C< ST >::SplineInst.

125  {
126  if (comm->size() == 1)
127  return;
128  const int Nbands = kPoints.size();
129  const int Nbandgroups = comm->size();
130  offset.resize(Nbandgroups + 1, 0);
131  FairDivideLow(Nbands, Nbandgroups, offset);
132  for (size_t ib = 0; ib < offset.size(); ib++)
133  offset[ib] *= 2;
134  gatherv(comm, SplineInst->getSplinePtr(), SplineInst->getSplinePtr()->z_stride, offset);
135  }
int size() const
return the number of tasks
Definition: Communicate.h:118
void FairDivideLow(int ntot, int npart, IV &adist)
partition ntot elements among npart
Definition: FairDivide.h:114
std::vector< int > offset
band offsets used for communication
Definition: BsplineSet.h:56
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
void gatherv(T *sb, T *rb, int n, IT &counts, IT &displ, int dest)
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ getClassName()

virtual std::string getClassName ( ) const
inlineoverridevirtual

return class name

Implements SPOSet.

Definition at line 87 of file SplineC2C.h.

87 { return "SplineC2C"; }

◆ getKeyword()

virtual std::string getKeyword ( ) const
inlineoverridevirtual

Implements BsplineSet.

Definition at line 88 of file SplineC2C.h.

88 { return "SplineC2C"; }

◆ isComplex()

bool isComplex ( ) const
inlineoverridevirtual

Implements BsplineSet.

Definition at line 89 of file SplineC2C.h.

89 { return true; };

◆ isRotationSupported()

bool isRotationSupported ( ) const
inlineoverridevirtual

return true if this SPOSet can be wrappered by RotatedSPO

Reimplemented from SPOSet.

Definition at line 94 of file SplineC2C.h.

94 { return true; }

◆ makeClone()

std::unique_ptr<SPOSet> makeClone ( ) const
inlineoverridevirtual

make a clone of itself every derived class must implement this to have threading working correctly.

Implements BsplineSet.

Definition at line 92 of file SplineC2C.h.

92 { return std::make_unique<SplineC2C>(*this); }

◆ read_splines()

bool read_splines ( hdf_archive h5f)

Definition at line 40 of file SplineC2C.cpp.

References hdf_archive::readEntry().

41 {
42  std::ostringstream o;
43  o << "spline_" << MyIndex;
44  einspline_engine<SplineType> bigtable(SplineInst->getSplinePtr());
45  return h5f.readEntry(bigtable, o.str().c_str()); //"spline_0");
46 }
size_t MyIndex
Index of this adoptor, when multiple adoptors are used for NUMA or distributed cases.
Definition: BsplineSet.h:39
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64

◆ resize_kpoints()

void resize_kpoints ( )
inline

remap kPoints to pack the double copy

Definition at line 150 of file SplineC2C.h.

References qmcplusplus::dot(), BsplineSet::kPoints, SplineC2C< ST >::mKK, SplineC2C< ST >::myKcart, VectorSoaContainer< T, D, Alloc >::resize(), and Vector< T, Alloc >::resize().

Referenced by SplineC2C< ST >::create_spline().

151  {
152  const size_t nk = kPoints.size();
153  mKK.resize(nk);
154  myKcart.resize(nk);
155  for (size_t i = 0; i < nk; ++i)
156  {
157  mKK[i] = -dot(kPoints[i], kPoints[i]);
158  myKcart(i) = kPoints[i];
159  }
160  }
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Definition: OhmmsVector.h:166
VectorSoaContainer< ST, 3 > myKcart
Definition: SplineC2C.h:70
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void resize(size_type n)
resize myData
vContainer_type mKK
Definition: SplineC2C.h:69
std::vector< SPOSet::PosType > kPoints
kpoints for each unique orbitals.
Definition: BsplineSet.h:52

◆ resizeStorage()

void resizeStorage ( size_t  n,
size_t  nvals 
)
inline

Definition at line 111 of file SplineC2C.h.

References BsplineSet::init_base(), SplineC2C< ST >::myG, SplineC2C< ST >::mygH, SplineC2C< ST >::myH, SplineC2C< ST >::myL, SplineC2C< ST >::myV, qmcplusplus::n, VectorSoaContainer< T, D, Alloc >::resize(), and Vector< T, Alloc >::resize().

112  {
113  init_base(n);
114  size_t npad = getAlignedSize<ST>(2 * n);
115  myV.resize(npad);
116  myG.resize(npad);
117  myL.resize(npad);
118  myH.resize(npad);
119  mygH.resize(npad);
120  }
vContainer_type myL
Definition: SplineC2C.h:78
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Definition: OhmmsVector.h:166
vContainer_type myV
intermediate result vectors
Definition: SplineC2C.h:77
void init_base(int n)
Definition: BsplineSet.h:66
void resize(size_type n)
resize myData
gContainer_type myG
Definition: SplineC2C.h:79
hContainer_type myH
Definition: SplineC2C.h:80
ghContainer_type mygH
Definition: SplineC2C.h:81

◆ set_spline()

void set_spline ( SingleSplineType spline_r,
SingleSplineType spline_i,
int  twist,
int  ispline,
int  level 
)
inline

Definition at line 29 of file SplineC2C.cpp.

34 {
35  SplineInst->copy_spline(spline_r, 2 * ispline);
36  SplineInst->copy_spline(spline_i, 2 * ispline + 1);
37 }
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64

◆ storeParamsBeforeRotation()

void storeParamsBeforeRotation ( )
overridevirtual

Store an original copy of the spline coefficients for orbital rotation.

Reimplemented from SPOSet.

Definition at line 58 of file SplineC2C.cpp.

References qmcplusplus::syclBLAS::copy_n().

59 {
60  const auto spline_ptr = SplineInst->getSplinePtr();
61  const auto coefs_tot_size = spline_ptr->coefs_size;
62  coef_copy_ = std::make_shared<std::vector<ST>>(coefs_tot_size);
63 
64  std::copy_n(spline_ptr->coefs, coefs_tot_size, coef_copy_->begin());
65 }
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64
std::shared_ptr< std::vector< ST > > coef_copy_
Copy of original splines for orbital rotation.
Definition: SplineC2C.h:67
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
Definition: syclBLAS.cpp:548

◆ write_splines()

bool write_splines ( hdf_archive h5f)

Definition at line 49 of file SplineC2C.cpp.

References hdf_archive::writeEntry().

50 {
51  std::ostringstream o;
52  o << "spline_" << MyIndex;
53  einspline_engine<SplineType> bigtable(SplineInst->getSplinePtr());
54  return h5f.writeEntry(bigtable, o.str().c_str()); //"spline_0");
55 }
size_t MyIndex
Index of this adoptor, when multiple adoptors are used for NUMA or distributed cases.
Definition: BsplineSet.h:39
std::shared_ptr< MultiBspline< ST > > SplineInst
multi bspline set
Definition: SplineC2C.h:64

Friends And Related Function Documentation

◆ BsplineReader

friend struct BsplineReader
friend

Definition at line 222 of file SplineC2C.h.

◆ SplineSetReader

friend class SplineSetReader
friend

Definition at line 221 of file SplineC2C.h.

Member Data Documentation

◆ coef_copy_

std::shared_ptr<std::vector<ST> > coef_copy_
private

Copy of original splines for orbital rotation.

Definition at line 67 of file SplineC2C.h.

◆ GGt

Tensor<ST, 3> GGt
private

$GGt=G^t G $, transformation for tensor in LatticeUnit to CartesianUnit, e.g. Hessian

Definition at line 62 of file SplineC2C.h.

◆ mKK

vContainer_type mKK
private

Definition at line 69 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resize_kpoints().

◆ myG

gContainer_type myG
protected

Definition at line 79 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resizeStorage().

◆ mygH

ghContainer_type mygH
protected

Definition at line 81 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resizeStorage().

◆ myH

hContainer_type myH
protected

Definition at line 80 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resizeStorage().

◆ myKcart

VectorSoaContainer<ST, 3> myKcart
private

Definition at line 70 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resize_kpoints().

◆ myL

vContainer_type myL
protected

Definition at line 78 of file SplineC2C.h.

Referenced by SplineC2C< ST >::resizeStorage().

◆ myV

vContainer_type myV
protected

intermediate result vectors

Definition at line 77 of file SplineC2C.h.

Referenced by SplineC2C< ST >::create_spline(), and SplineC2C< ST >::resizeStorage().

◆ PrimLattice

CrystalLattice<ST, 3> PrimLattice
private

primitive cell

Definition at line 60 of file SplineC2C.h.

◆ ratios_private

Matrix<ComplexT> ratios_private
private

thread private ratios for reduction when using nested threading, numVP x numThread

Definition at line 73 of file SplineC2C.h.

◆ SplineInst

std::shared_ptr<MultiBspline<ST> > SplineInst
private

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