JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 
double neutralityConstraint (const ScalarField &muPlus, const ScalarField &muMinus, const ScalarField &shape, double Qexp, ScalarField *mu0_muPlus=0, ScalarField *mu0_muMinus=0, ScalarField *mu0_shape=0, double *mu0_Qexp=0)
 Compute the neutrality Lagrange multiplier mu0 and optionally its derivatives.
 
__hostanddev__ double fHS (double xIn, double &f_xIn) const
 Hard sphere free energy per particle and derivative, where x is total packing fraction.
 
__hostanddev__ void compute (double muPlus, double muMinus, double &F, double &F_muPlus, double &F_muMinus, double &Rho, double &Rho_muPlus, double &Rho_muMinus) const
 
__hostanddev__ void freeEnergy_calc (size_t i, double mu0, const double *muPlus, const double *muMinus, const double *s, double *rho, double *A, double *A_muPlus, double *A_muMinus, double *A_s) const
 Given shape function s and potential mu, compute induced charge rho, free energy density A and accumulate its derivatives.
 
void freeEnergy (size_t N, double mu0, const double *muPlus, const double *muMinus, const double *s, double *rho, double *A, double *A_muPlus, double *A_muMinus, double *A_s) const
 
void freeEnergy_gpu (size_t N, double mu0, const double *muPlus, const double *muMinus, const double *s, double *rho, double *A, double *A_muPlus, double *A_muMinus, double *A_s) const
 
__hostanddev__ void convertDerivative_calc (size_t i, double mu0, const double *muPlus, const double *muMinus, const double *s, const double *A_rho, double *A_muPlus, double *A_muMinus, double *A_s) const
 Propagate derivative A_rho and accumulate to A_mu and A_s.
 
void convertDerivative (size_t N, double mu0, const double *muPlus, const double *muMinus, const double *s, const double *A_rho, double *A_muPlus, double *A_muMinus, double *A_s) const
 
void convertDerivative_gpu (size_t N, double mu0, const double *muPlus, const double *muMinus, const double *s, const double *A_rho, double *A_muPlus, double *A_muMinus, double *A_s) const
 
__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 phiToState_calc (size_t i, const double *phi, const double *s, const RadialFunctionG &xLookup, bool setState, double *muPlus, double *muMinus, double *kappaSq) const
 Given shape function s and phi, calculate state mu's if setState=true or effective kappaSq if setState=false.
 
void phiToState (size_t N, const double *phi, const double *s, const RadialFunctionG &xLookup, bool setState, double *muPlus, double *muMinus, double *kappaSq) const
 
void phiToState_gpu (size_t N, const double *phi, const double *s, const RadialFunctionG &xLookup, bool setState, double *muPlus, double *muMinus, double *kappaSq) 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

__hostanddev__ void NonlinearPCMeval::Screening::compute ( double  muPlus,
double  muMinus,
double &  F,
double &  F_muPlus,
double &  F_muMinus,
double &  Rho,
double &  Rho_muPlus,
double &  Rho_muMinus 
) const
inline

Compute the nonlinear functions in the free energy and charge density prior to scaling by shape function Note that each mu here is mu(r) + mu0, i.e. after imposing charge neutrality constraint


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