JDFTx  1.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExCorr_internal_LDA.h File Reference

Classes

class  FunctionalLDA
 Common interface to the compute kernels shared by all LDA functionals. More...
 
struct  LDA_calc< variant, nCount >
 
struct  LDA_calc< LDA_KE_TF, nCount >
 Specialization of LDA_calc for Thomas-Fermi kinetic energy (compute directly in n[s]) More...
 
struct  LDA_calc< LDA_X_Slater, nCount >
 Specialization of LDA_calc for Slater exchange (compute directly in n[s]; zeta not required) More...
 
struct  LDA_eval_C_PZ< para >
 
struct  LDA_eval_C_PW< spinID, prec >
 
struct  LDA_eval_C_VWN< spinID >
 

Macros

#define SwitchTemplate_LDA(variant, nCount, fTemplate, argList)
 

Enumerations

enum  LDA_Variant {
  LDA_X_Slater, LDA_C_PZ, LDA_C_PW, LDA_C_PW_prec,
  LDA_C_VWN, LDA_XC_Teter, LDA_KE_TF
}
 Available LDA functionals. More...
 

Functions

template<LDA_Variant variant>
__hostanddev__ double LDA_eval (double rs, double zeta, double &e_rs, double &e_zeta)
 
template<>
__hostanddev__ double LDA_eval< LDA_C_PZ > (double rs, double zeta, double &e_rs, double &e_zeta)
 Perdew-Zunger correlation.
 
template<>
__hostanddev__ double LDA_eval< LDA_C_PW > (double rs, double zeta, double &e_rs, double &e_zeta)
 Perdew-Wang correlation (original version, for numerical compatibility with LibXC's PW91)
 
template<>
__hostanddev__ double LDA_eval< LDA_C_PW_prec > (double rs, double zeta, double &e_rs, double &e_zeta)
 Perdew-Wang correlation (extended precision version, for numerical compatibility with LibXC's PBE)
 
template<>
__hostanddev__ double LDA_eval< LDA_C_VWN > (double rs, double zeta, double &e_rs, double &e_zeta)
 Vosko-Wilk-Nusair correlation.
 
template<>
__hostanddev__ double LDA_eval< LDA_XC_Teter > (double rs, double zeta, double &e_rs, double &e_zeta)
 Teter LSD exchange & correlation [Phys. Rev. B 54, 1703 (1996)].
 

Detailed Description

Shared CPU-GPU implementation of LDA functionals

Macro Definition Documentation

#define SwitchTemplate_LDA (   variant,
  nCount,
  fTemplate,
  argList 
)
Value:
switch(variant) \
{ case LDA_X_Slater: fTemplate< LDA_X_Slater, nCount> argList; break; \
case LDA_C_PZ: fTemplate< LDA_C_PZ, nCount> argList; break; \
case LDA_C_PW: fTemplate< LDA_C_PW, nCount> argList; break; \
case LDA_C_PW_prec: fTemplate< LDA_C_PW_prec, nCount> argList; break; \
case LDA_C_VWN: fTemplate< LDA_C_VWN, nCount> argList; break; \
case LDA_XC_Teter: fTemplate< LDA_XC_Teter, nCount> argList; break; \
case LDA_KE_TF: fTemplate< LDA_KE_TF, nCount> argList; break; \
default: break; \
}
Vosko-Wilk-Nusair LDA correlation.
Definition: ExCorr_internal_LDA.h:34
Perdew-Wang LDA correlation.
Definition: ExCorr_internal_LDA.h:32
LDA exchange (Slater functional)
Definition: ExCorr_internal_LDA.h:30
Perdew-Wang LDA correlation (with higher precision constants used in PBE)
Definition: ExCorr_internal_LDA.h:33
Perdew-Zunger LDA correlation.
Definition: ExCorr_internal_LDA.h:31
Teter LDA exchange and correlation.
Definition: ExCorr_internal_LDA.h:35
Thomas-Fermi kinetic energy functional.
Definition: ExCorr_internal_LDA.h:36

Switch a function fTemplate templated over LDA variant and spin count, over all supported functionals with nCount being a compile-time constant (Used by the thread and gpu launchers of FunctionalLDA::evaluate) (This is needed to switch from a run-time variant to a compile-time template argument)

Enumeration Type Documentation

Available LDA functionals.

Enumerator
LDA_X_Slater 

LDA exchange (Slater functional)

LDA_C_PZ 

Perdew-Zunger LDA correlation.

LDA_C_PW 

Perdew-Wang LDA correlation.

LDA_C_PW_prec 

Perdew-Wang LDA correlation (with higher precision constants used in PBE)

LDA_C_VWN 

Vosko-Wilk-Nusair LDA correlation.

LDA_XC_Teter 

Teter LDA exchange and correlation.

LDA_KE_TF 

Thomas-Fermi kinetic energy functional.

Function Documentation

template<LDA_Variant variant>
__hostanddev__ double LDA_eval ( double  rs,
double  zeta,
double &  e_rs,
double &  e_zeta 
)

LDA interface inner layer (specialize for each functional): Return energy density given rs and zeta and set gradients w.r.t rs and zeta