JDFTx  1.2.0
CoulombKernel.h
1 /*-------------------------------------------------------------------
2 Copyright 2012 Ravishankar Sundararaman
3 
4 This file is part of JDFTx.
5 
6 JDFTx is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 JDFTx is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
18 -------------------------------------------------------------------*/
19 
20 #ifndef JDFTX_CORE_COULOMBKERNEL_H
21 #define JDFTX_CORE_COULOMBKERNEL_H
22 
23 #include <core/WignerSeitz.h>
24 #include <core/matrix3.h>
25 #include <core/string.h>
26 
29 { const matrix3<> R;
30  const vector3<int> S;
32  double omega;
33 
34  CoulombKernel(const matrix3<> R, const vector3<int> S, const vector3<bool> isTruncated, double omega=0.);
35 
41  void compute(double* data, const WignerSeitz& ws) const;
42 
43  static const double nSigmasPerWidth;
44 
45 private:
46  //Various indiviudally optimized cases of computeKernel:
47  void computeIsolated(double* data, const WignerSeitz& ws) const;
48  void computeWire(double* data, const WignerSeitz& ws) const;
49 };
50 
51 #endif // JDFTX_CORE_COULOMBKERNEL_H
Wigner-Seitz truncated coulomb kernel generator.
Definition: CoulombKernel.h:28
STL strings and streams with case insensitive comparison.
const vector3< bool > isTruncated
whether corresponding lattice direction is truncated
Definition: CoulombKernel.h:31
const vector3< int > S
sample count
Definition: CoulombKernel.h:30
void compute(double *data, const WignerSeitz &ws) const
const matrix3 R
lattice vectors
Definition: CoulombKernel.h:29
double omega
erf-screening parameter (used for screened exchange kernels)
Definition: CoulombKernel.h:32
Wigner-Seitz construction for a 3D lattice (2D lattice may be handled with orthogonal 3rd direction) ...
Definition: WignerSeitz.h:32
static const double nSigmasPerWidth
number of sigmas at which gaussian is negligible at working precision
Definition: CoulombKernel.h:43