QMCPACK
LRCoulombSingleton.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 // Raymond Clay III, j.k.rofling@gmail.com, Lawrence Livermore National Laboratory
11 //
12 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 /** @file LRCoulombSingleton.h
17  * @brief Define a LRHandler with two template parameters
18  */
19 #ifndef QMCPLUSPLUS_LRCOULOMBSINGLETON_H
20 #define QMCPLUSPLUS_LRCOULOMBSINGLETON_H
21 
22 #include <memory>
23 #include <config.h>
29 
30 namespace qmcplusplus
31 {
33 {
35 
39 
40  enum lr_type
41  {
42  ESLER = 0,
47  };
49  ///Stores the energ optimized LR handler.
50  static std::unique_ptr<LRHandlerType> CoulombHandler;
51  ///Stores the force/stress optimized LR handler.
52  static std::unique_ptr<LRHandlerType> CoulombDerivHandler;
53  ///This returns an energy optimized LR handler. If non existent, it creates one.
54  static std::unique_ptr<LRHandlerType> getHandler(ParticleSet& ref);
55  ///This returns a force/stress optimized LR handler. If non existent, it creates one.
56  static std::unique_ptr<LRHandlerType> getDerivHandler(ParticleSet& ref);
57  /// return true if quasi 2D is selected
59 
60  //The following two helper functions are provided to spline the short-range component
61  //of the coulomb potential and its derivative. This is much faster than evaluating
62  //via a sum over basis functions, which is typical in Ceperley/Esler style breakups.
63 
64  /** create a linear spline function
65  * @param aLR LRHandler
66  * @param rcut cutoff radius
67  * @param agrid pointer to a grid
68  * @return a RadFunctorType
69  *
70  * The spline function is the short-range term after breaking up
71  * \f$r V_{S} = r \times (V(r)-V_{L})\f$
72  */
73  static std::unique_ptr<RadFunctorType> createSpline4RbyVs(const LRHandlerType* aLR,
74  mRealType rcut,
75  const GridType& agrid);
76  /** create a linear spline of the derivative of short-range potential
77  * @param aLR LRHandler
78  * @param rcut cutoff radius
79  * @param agrid pointer to a grid
80  * @return a RadFunctorType
81  *
82  * The spline function is the short-range term after breaking up
83  * \f$r \frac{d}{dr} V_{S} = \frac{d}{dr}\left(r \times (V(r)-V_{L})\right)\f$
84  */
85  static std::unique_ptr<RadFunctorType> createSpline4RbyVsDeriv(const LRHandlerType* aLR,
86  mRealType rcut,
87  const GridType& agrid);
88 };
89 
90 } // namespace qmcplusplus
91 #endif
static std::unique_ptr< LRHandlerType > getDerivHandler(ParticleSet &ref)
This returns a force/stress optimized LR handler. If non existent, it creates one.
One-Dimensional linear-grid.
static std::unique_ptr< LRHandlerType > CoulombDerivHandler
Stores the force/stress optimized LR handler.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
static std::unique_ptr< RadFunctorType > createSpline4RbyVs(const LRHandlerType *aLR, mRealType rcut, const GridType &agrid)
create a linear spline function
EwaldHandler3D::mRealType mRealType
static std::unique_ptr< LRHandlerType > CoulombHandler
Stores the energ optimized LR handler.
Decalaration of One-Dimesional grids.
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
static std::unique_ptr< RadFunctorType > createSpline4RbyVsDeriv(const LRHandlerType *aLR, mRealType rcut, const GridType &agrid)
create a linear spline of the derivative of short-range potential
#define DECLARE_COULOMB_TYPES
Definition: coulomb_types.h:18
static std::unique_ptr< LRHandlerType > getHandler(ParticleSet &ref)
This returns an energy optimized LR handler. If non existent, it creates one.
base class for LRHandlerTemp<FUNC,BASIS> and DummyLRHanlder<typename Func>
Definition: LRHandlerBase.h:30
Define LRHandlerBase and DummyLRHandler<typename Func>
static bool isQuasi2D()
return true if quasi 2D is selected