JDFTx  1.7.0
NonlinearPCMeval::Screening Struct Reference

Helper class for ionic screening portion of NonlinearPCM. More...

#include <PCM_internal.h>

Public Member Functions

 Screening (bool linear, double T, double Nion, double Zion, double VhsPlus, double VhsMinus, double epsBulk)
 
__hostanddev__ double fHS (double xIn, double &f_xIn) const
 Hard sphere free energy per particle and derivative, where x is total packing fraction.
 
__hostanddev__ double rootFunc (double x, double V) const
 Root function used for finding packing fraction x at a given dimensionless potential V = Z phi / T.
 
__hostanddev__ double x_from_V (double V) const
 Calculate self-consistent packing fraction x at given dimensionless potential V = Z phi / T using a bisection method.
 
__hostanddev__ void apply_calc (size_t i, const RadialFunctionG &ionEnergyLookup, const double *s, const double *phi, double *A, double *A_phi, double *A_s) const
 
void apply (size_t N, const RadialFunctionG &ionEnergyLookup, const double *s, const double *phi, double *A, double *A_phi, double *A_s) const
 
void apply_gpu (size_t N, const RadialFunctionG &ionEnergyLookup, const double *s, const double *phi, double *A, double *A_phi, double *A_s) const
 
void operator() (const RadialFunctionG &ionEnergyLookup, const ScalarField &s, const ScalarField &phi, ScalarField &A, ScalarField &A_phi, ScalarField &A_s) const
 

Public Attributes

bool linear
 whether ionic screening is linearized
 
double NT
 
double ZbyT
 
double NZ
 where T=temperature, N=bulk ionic concentration, Z=charge (all assumed +/- symmetric)
 
double x0plus
 
double x0minus
 
double x0
 anion, cation and total packing fractions
 

Detailed Description

Helper class for ionic screening portion of NonlinearPCM.

Member Function Documentation

◆ apply_calc()

__hostanddev__ void NonlinearPCMeval::Screening::apply_calc ( size_t  i,
const RadialFunctionG ionEnergyLookup,
const double *  s,
const double *  phi,
double *  A,
double *  A_phi,
double *  A_s 
) const
inline

Apply nonlinear screening and compute corresponding energy. Energy and its phi derivative are accumulated to A and A_phi. Note that A_phi contribution is effectively kappa^2(phi) phi. Optionally also accumulate cavity gradient to A_s.


The documentation for this struct was generated from the following file: