Commit 59eef36b by Martin Schlipf

implement nonlocal part of HSE functional for general case (not gamma-only)

add function pointer parameter to ExchangeOperator class
this function is used to evaluate the Fourier transform of the nonlocal potential
use "standard" Coulomb potential if void pointer is given

git-svn-id: http://qboxcode.org/svn/qb/branches/hse-dev@1386 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 71a39e17
......@@ -81,8 +81,8 @@ class ExchangeOperator
valarray<double> qpG22_;
valarray<double> qpG2i1_;
valarray<double> qpG2i2_;
valarray<double> G2_;
valarray<double> G2i_;
valarray<double> FT1_;
valarray<double> FT2_;
// numbers of states
int nLocalStates_;
......@@ -178,10 +178,16 @@ class ExchangeOperator
vector<DoubleMatrix*> uc_;
vector<long int> localization_;
// fourier transform of nonlocal potential
double (*interaction_potential_)(const double&);
// coulomb potential
bool coulomb_;
public:
// constructor
ExchangeOperator(Sample& s_, double HFCoeff);
ExchangeOperator(Sample& s_, double HFCoeff, double (*interaction_potential)(const double&) = 0);
// destructor
~ExchangeOperator();
......
......@@ -19,6 +19,7 @@
#include "ChargeDensity.h"
#include "XCPotential.h"
#include "ExchangeOperator.h"
#include "HSEFunctional.h"
using namespace std;
////////////////////////////////////////////////////////////////////////////////
......@@ -72,7 +73,7 @@ XCOperator::XCOperator(Sample& s, const ChargeDensity& cd) :cd_(cd)
xcp_ = new XCPotential(cd, functional_name);
// create the exchange operator with mixing coeff=0.25
xop_ = new ExchangeOperator(s, 0.25);
xop_ = new ExchangeOperator(s, 0.25, &(HSEFunctional::interaction_potential) );
hasPotential_ = true;
hasGGA_ = xcp_->isGGA();
hasHF_ = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment