JDFTx  1.7.0
SpeciesInfo_internal.h File Reference
#include <core/matrix3.h>
#include <core/RadialFunction.h>
#include <core/SphericalHarmonics.h>
#include <stdint.h>

Classes

struct  StaticLoopYlmTag< lm >
 
struct  StaticLoopYlm< Nlm, Functor, lmInv >
 
struct  StaticLoopYlm< Nlm, Functor, 0 >
 
struct  nAugmentFunctor
 
struct  nAugmentGradFunctor
 

Macros

#define SwitchTemplate_Nlm(Nlm, func, args)
 

Functions

template<int l, int m>
__hostanddev__ void Vnl_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl)
 Compute Vnl at specific l and m for several atomic positions.
 
template<int l, int m>
__hostanddev__ void VnlPrime_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, const vector3<> &dir, const vector3<> &RTdir, complex *Vprime)
 Derivative of Vnl with respect to cartesian direction dir.
 
template<int l, int m>
__hostanddev__ void VnlStress_calc (int n, int atomStride, int nAtoms, const vector3<> &k, const vector3< int > *iGarr, const matrix3<> &G, const vector3<> *pos, const RadialFunctionG &VnlRadial, int iDir, int jDir, complex *V_RRT_ij)
 Derivative of Vnl with respect to lattice vectors (V_RRT) for specified iDir,jDir Cartesian components.
 
void Vnl (int nbasis, int atomStride, int nAtoms, int l, int m, const vector3<> k, const vector3< int > *iGarr, const matrix3<> G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl, const vector3<> *derivDir=0, const int stressDir=-1)
 
void Vnl_gpu (int nbasis, int atomStride, int nAtoms, int l, int m, const vector3<> k, const vector3< int > *iGarr, const matrix3<> G, const vector3<> *pos, const RadialFunctionG &VnlRadial, complex *Vnl, const vector3<> *derivDir=0, const int stressDir=-1)
 
template<int Nlm, typename Functor >
__hostanddev__ void staticLoopYlm (Functor *f)
 
template<int Nlm>
__hostanddev__ void nAugment_calc (int i, const vector3< int > &iG, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void nAugment (int Nlm, const vector3< int > S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void nAugment_gpu (int Nlm, const vector3< int > S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, complex *n, const vector3<> *atposDeriv)
 
void setNagIndex (const vector3< int > &S, const matrix3<> &G, int iGstart, int iGstop, int nCoeff, double dGinv, uint64_t *nagIndex, size_t *nagIndexPtr)
 (In MPI mode, only a subset of G-vectors are indexed on each process (to correspond to nAUgment))
 
template<int Nlm>
__hostanddev__ void nAugmentGrad_calc (uint64_t key, const vector3< int > &S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv=0, bool dummyGpuThread=false)
 
void nAugmentGrad (int Nlm, const vector3< int > S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv, const uint64_t *nagIndex, const size_t *nagIndexPtr)
 
void nAugmentGrad_gpu (int Nlm, const vector3< int > S, const matrix3<> &G, int nCoeff, double dGinv, const double *nRadial, const vector3<> &atpos, const complex *ccE_n, double *E_nRadial, vector3< complex * > E_atpos, array< complex *, 6 > E_RRT, const vector3<> *atposDeriv, const uint64_t *nagIndex, const size_t *nagIndexPtr)
 
__hostanddev__ complex getSG_calc (const vector3< int > &iG, const int &nAtoms, const vector3<> *atpos)
 Get structure factor for a specific iG, given a list of atoms.
 
void getSG (const vector3< int > S, int nAtoms, const vector3<> *atpos, double invVol, complex *SG)
 Get structure factor in a ScalarFieldTilde's data/dataGpu (with 1/vol normalization factor)
 
void getSG_gpu (const vector3< int > S, int nAtoms, const vector3<> *atpos, double invVol, complex *SG)
 
__hostanddev__ void updateLocal_calc (int i, const vector3< int > &iG, const matrix3<> &GGT, complex *Vlocps, complex *rhoIon, complex *nChargeball, complex *nCore, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Calculate local pseudopotential, ionic density and chargeball due to one species at a given G-vector.
 
void updateLocal (const vector3< int > S, const matrix3<> GGT, complex *Vlocps, complex *rhoIon, complex *n_chargeball, complex *n_core, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void updateLocal_gpu (const vector3< int > S, const matrix3<> GGT, complex *Vlocps, complex *rhoIon, complex *n_chargeball, complex *n_core, complex *tauCore, int nAtoms, const vector3<> *atpos, double invVol, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
__hostanddev__ void gradLocalToSG_calc (int i, const vector3< int > iG, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Propagate (complex conjugates of) gradients w.r.t Vlocps, rhoIon etc to complex conjugate gradient w.r.t SG (the strutcure factor)
 
void gradLocalToSG (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void gradLocalToSG_gpu (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, complex *ccgrad_SG, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
__hostanddev__ void gradSGtoAtpos_calc (int i, const vector3< int > iG, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
void gradSGtoAtpos (const vector3< int > S, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
void gradSGtoAtpos_gpu (const vector3< int > S, const vector3<> atpos, const complex *ccgrad_SG, vector3< complex * > grad_atpos)
 
__hostanddev__ void gradLocalToStress_calc (int i, const vector3< int > iG, const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 Propagate (complex conjugates of) gradients w.r.t Vlocps, rhoIon etc to symmetric gradient w.r.t lattice vectors.
 
void gradLocalToStress (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 
void gradLocalToStress_gpu (const vector3< int > S, const matrix3<> GGT, const complex *ccgrad_Vlocps, const complex *ccgrad_rhoIon, const complex *ccgrad_nChargeball, const complex *ccgrad_nCore, const complex *ccgrad_tauCore, symmetricMatrix3<> *grad_RRT, int nAtoms, const vector3<> *atpos, const RadialFunctionG &VlocRadial, double Z, const RadialFunctionG &nCoreRadial, const RadialFunctionG &tauCoreRadial, double Zchargeball, double wChargeballSq)
 

Detailed Description

Shared GPU/CPU code for ion/pseudopotential related calculations