JDFTx  1.7.0
Coulomb_internal.h File Reference

Shared inline functions / internal declarations for Coulomb framework. More...

#include <core/matrix3.h>
#include <core/Spline.h>
#include <gsl/gsl_integration.h>

Classes

struct  CoulombPeriodic_calc
 Periodic coulomb interaction (4 pi/G^2) More...
 
struct  CoulombSlab_calc
 Slab-truncated coulomb interaction. More...
 
struct  CoulombSpherical_calc
 Sphere-truncated coulomb interaction. More...
 
struct  CoulombIonKernel_calc
 Lattice derivative calculation for ionKernel used in embedded mode. More...
 
struct  Cbar
 Compute Cbar_k^sigma - the gaussian convolved cylindrical coulomb kernel - by numerical quadrature. More...
 
struct  Cbar_k_sigma
 
struct  ExchangePeriodic_calc
 Periodic exchange. More...
 
struct  ExchangePeriodicScreened_calc
 Erfc-screened Periodic exchange. More...
 
struct  ExchangeSpherical_calc
 Spherical-truncated exchange. More...
 
struct  ExchangeSphericalScreened_calc
 Erfc-screened Spherical-truncated exchange. More...
 
struct  ExchangeSlab_calc
 Slab-truncated exchange. More...
 

Macros

#define wsTruncationPaper   "R. Sundararaman and T.A. Arias, Phys. Rev. B 87, 165122 (2013)"
 
#define ionMarginMessage   "Expand unit cell, or if absolutely sure, reduce coulomb-truncation-ion-margin.\n"
 

Functions

void coulombAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombPeriodic_calc &calc, complex *data)
 
void coulombAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombSlab_calc &calc, complex *data)
 
void coulombAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombSpherical_calc &calc, complex *data)
 
void coulombAnalyticStress_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombPeriodic_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombSlab_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombSpherical_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress_gpu (vector3< int > S, const matrix3<> &GGT, const CoulombIonKernel_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombNumericalStress_gpu (vector3< int > S, const matrix3<> &GGT, const symmetricMatrix3<> *Vc_RRT, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalytic (vector3< int > S, const matrix3<> &GGT, const CoulombPeriodic_calc &calc, complex *data)
 
void coulombAnalytic (vector3< int > S, const matrix3<> &GGT, const CoulombSlab_calc &calc, complex *data)
 
void coulombAnalytic (vector3< int > S, const matrix3<> &GGT, const CoulombSpherical_calc &calc, complex *data)
 
void coulombAnalyticStress (vector3< int > S, const matrix3<> &GGT, const CoulombPeriodic_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress (vector3< int > S, const matrix3<> &GGT, const CoulombSlab_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress (vector3< int > S, const matrix3<> &GGT, const CoulombSpherical_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombAnalyticStress (vector3< int > S, const matrix3<> &GGT, const CoulombIonKernel_calc &calc, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
void coulombNumericalStress (vector3< int > S, const matrix3<> &GGT, const symmetricMatrix3<> *Vc_RRT, const complex *X, const complex *Y, symmetricMatrix3<> *grad_RRT)
 
__hostanddev__ double erf_by_x (double x)
 Compute erf(x)/x (with x~0 handled properly)
 
__hostanddev__ double erf_by_xPrime_by_x (double x)
 Compute (1/x) d(erf(x)/x)/dx (with x~0 handled properly)
 
__hostanddev__ double erfcTilde (double Gsq, double omegaSq)
 Radial fourier transform of erfc(omega r)/r (not valid at G=0)
 
void exchangeAnalytic (vector3< int > S, const matrix3<> &GGT, const ExchangePeriodic_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic (vector3< int > S, const matrix3<> &GGT, const ExchangePeriodicScreened_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic (vector3< int > S, const matrix3<> &GGT, const ExchangeSpherical_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic (vector3< int > S, const matrix3<> &GGT, const ExchangeSphericalScreened_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic (vector3< int > S, const matrix3<> &GGT, const ExchangeSlab_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const ExchangePeriodic_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const ExchangePeriodicScreened_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const ExchangeSpherical_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const ExchangeSphericalScreened_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalytic_gpu (vector3< int > S, const matrix3<> &GGT, const ExchangeSlab_calc &calc, complex *data, const vector3<> &kDiff, double Vzero, double thresholdSq)
 
void exchangeAnalyticStress (vector3< int > S, const matrix3<> &G, const ExchangePeriodic_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress (vector3< int > S, const matrix3<> &G, const ExchangePeriodicScreened_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress (vector3< int > S, const matrix3<> &G, const ExchangeSpherical_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress (vector3< int > S, const matrix3<> &G, const ExchangeSphericalScreened_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress (vector3< int > S, const matrix3<> &G, const ExchangeSlab_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress_gpu (vector3< int > S, const matrix3<> &G, const ExchangePeriodic_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress_gpu (vector3< int > S, const matrix3<> &G, const ExchangePeriodicScreened_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress_gpu (vector3< int > S, const matrix3<> &G, const ExchangeSpherical_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress_gpu (vector3< int > S, const matrix3<> &G, const ExchangeSphericalScreened_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
void exchangeAnalyticStress_gpu (vector3< int > S, const matrix3<> &G, const ExchangeSlab_calc &calc, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3<> &kDiff, double thresholdSq)
 
__hostanddev__ void multRealKernel_calc (size_t i, const vector3< int > &iG, const vector3< int > &S, const double *kernel, complex *data)
 Multiply a complexScalarFieldTilde's data by a RealKernel (real-symmetry reduced)
 
void multRealKernel (vector3< int > S, const double *kernel, complex *data)
 
void multRealKernel_gpu (vector3< int > S, const double *kernel, complex *data)
 
__hostanddev__ void multTransformedKernel_calc (size_t i, const vector3< int > &iG, const vector3< int > &S, const double *kernel, complex *data, const vector3< int > &offset)
 Multiply a complexScalarFieldTilde's data by a kernel sampled with offset and rotation by rot.
 
void multTransformedKernel (vector3< int > S, const double *kernel, complex *data, const vector3< int > &offset)
 
void multTransformedKernel_gpu (vector3< int > S, const double *kernel, complex *data, const vector3< int > &offset)
 
__hostanddev__ void realKernelStress_calc (size_t i, const vector3< int > &iG, const vector3< int > &S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT)
 Compute stress corresponding to multRealKernel()
 
void realKernelStress (vector3< int > S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT)
 
void realKernelStress_gpu (vector3< int > S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT)
 
__hostanddev__ void transformedKernelStress_calc (size_t i, const vector3< int > &iG, const vector3< int > &S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3< int > &offset)
 Compute stress corresponding to multTransformedKernel()
 
void transformedKernelStress (vector3< int > S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3< int > &offset)
 
void transformedKernelStress_gpu (vector3< int > S, const symmetricMatrix3<> *kernel_RRT, const complex *X, symmetricMatrix3<> *grad_RRT, const vector3< int > &offset)
 

Detailed Description

Shared inline functions / internal declarations for Coulomb framework.