JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 and optionally its gradients for a subset of the basis space, and for multiple atomic positions.
 
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)
 
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)
 
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)
 
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)
 
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)
 
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, 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, 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, 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 wChargeball)
 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 wChargeball)
 
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 wChargeball)
 
__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 wChargeball)
 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 wChargeball)
 
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 wChargeball)
 
__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)
 

Detailed Description

Shared GPU/CPU code for ion/pseudopotential related calculations