JDFTx  1.2.0
CoulombIsolated.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_COULOMBISOLATED_H
21 #define JDFTX_CORE_COULOMBISOLATED_H
22 
23 #include <core/Coulomb.h>
24 #include <core/WignerSeitz.h>
25 
27 class CoulombIsolated : public Coulomb
28 {
29 public:
30  CoulombIsolated(const GridInfo& gInfoOrig, const CoulombParams& params);
31 protected:
33  std::shared_ptr<Ewald> createEwald(matrix3<> R, size_t nAtoms) const;
34 private:
35  WignerSeitz ws;
36  RealKernel Vc;
37  friend struct ExchangeEval;
38 };
39 
41 class CoulombSpherical : public Coulomb
42 {
43 public:
44  CoulombSpherical(const GridInfo& gInfoOrig, const CoulombParams& params);
45 protected:
47  std::shared_ptr<Ewald> createEwald(matrix3<> R, size_t nAtoms) const;
48 private:
49  WignerSeitz ws;
50  double Rc;
51  friend struct ExchangeEval;
52 };
53 
54 #endif // JDFTX_CORE_COULOMBISOLATED_H
Simulation grid descriptor.
Definition: GridInfo.h:45
ScalarFieldTilde apply(ScalarFieldTilde &&) const
Helper class for evaluating regularized Coulomb kernel for exchange.
Definition: Coulomb_ExchangeEval.h:27
std::shared_ptr< ScalarFieldTildeData > ScalarFieldTilde
A smart reference-counting pointer to ScalarFieldTildeData.
Definition: ScalarField.h:45
Definition: Coulomb.h:29
Abstract base class for the (optionally truncated) Coulomb interaction.
Definition: Coulomb.h:101
std::shared_ptr< Ewald > createEwald(matrix3<> R, size_t nAtoms) const
Wigner-Seitz construction for a 3D lattice (2D lattice may be handled with orthogonal 3rd direction) ...
Definition: WignerSeitz.h:32
Coulomb interaction for an isolated system (no periodicity), truncated on the Wigner-Seitz cell...
Definition: CoulombIsolated.h:27
Coulomb interaction for an isolated system (no periodicity), truncated on a sphere.
Definition: CoulombIsolated.h:41
Special class for storing real reciprocal-space kernels encountered ever so often for convolutions...
Definition: ScalarField.h:180