JDFTx  1.7.0
MixedFMT_internal.h File Reference
#include <core/matrix3.h>
#include <core/tensor3.h>

Functions

__hostanddev__ void tensorKernel_calc (int i, const vector3< int > iG, bool nyq, const matrix3<> G, const complex *nTilde, tensor3< complex * > mTilde)
 Calculate tensor derivative.
 
__hostanddev__ void tensorKernel_grad_calc (int i, const vector3< int > iG, bool nyq, const matrix3<> G, tensor3< const complex * > grad_mTilde, complex *grad_nTilde)
 Propagate gradients with respect to tensor derivative.
 
__hostanddev__ double mul_vTmv (const tensor3<> &m, const vector3<> &v)
 Compute vT*m*v for a vector v and a symmetric traceless tensor m.
 
__hostanddev__ void mul_vTmv_grad (const double grad_mul, const tensor3<> &m, const vector3<> &v, tensor3<> &grad_m, vector3<> &grad_v)
 Accumulate gradient of above function.
 
__hostanddev__ double trace_cubed (const tensor3<> &m)
 Compute tr(m^3) for a symmetric traceless tensor m (See ~/Water1D/FMT_tensorWeights.m for expressions)
 
__hostanddev__ void trace_cubed_grad (const double grad_trace, const tensor3<> &m, tensor3<> &grad_m)
 Accumulate gradient of above function.
 
__hostanddev__ double WB_f2 (double x, double &f2_x)
 White-Bear mark II FMT scale function f2 (and derivative) [replace with f2(x)=f3(x)=1 for standard Tarazona FMT]:
 
__hostanddev__ double WB_f3 (double x, double &f3_x)
 White-Bear mark II FMT scale function f3 (and derivative) [replace with f2(x)=f3(x)=1 for standard Tarazona FMT]:
 
__hostanddev__ double phiFMT_calc (int i, const double *n0arr, const double *n1arr, const double *n2arr, const double *n3arr, vector3< const double * > n1vArr, vector3< const double * > n2vArr, tensor3< const double * > n2mArr, double *grad_n0arr, double *grad_n1arr, double *grad_n2arr, double *grad_n3arr, vector3< double * > grad_n1vArr, vector3< double * > grad_n2vArr, tensor3< double * > grad_n2mArr)
 Calculate FMT functional.
 
__hostanddev__ double phiBond_calc (int i, double Rhm, double scale, const double *n0arr, const double *n2arr, const double *n3arr, vector3< const double * > n2vArr, double *grad_n0arr, double *grad_n2arr, double *grad_n3arr, vector3< double * > grad_n2vArr)
 Calculate bonding term.
 

Detailed Description

Implementation of Mixed FMT (internals)