TBTK
LindhardSusceptibility.h
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_SOLVER_LINDHARD_SUSCEPTIBILITY
24 #define COM_DAFER45_TBTK_SOLVER_LINDHARD_SUSCEPTIBILITY
25 
27 #include "TBTK/Solver/Susceptibility.h"
28 
29 #include <complex>
30 
31 namespace TBTK{
32 namespace Solver{
33 
35 public:
38  const MomentumSpaceContext &momentumSpaceContext
39  );
40 
42  virtual ~LindhardSusceptibility();
43 
48 
50  virtual std::vector<std::complex<double>> calculateSusceptibility(
51  const Index &index,
52  const std::vector<std::complex<double>> &energies
53  );
54 private:
56  double *fermiDiracLookupTable;
57 
60  const MomentumSpaceContext &momentumSpaceContext,
61  int *kPlusQLookupTable,
62  double *fermiDiracLookupTable
63  );
64 
66  template<bool useKPlusQLookupTable/*, bool isSafeFromPoles*/>
67  std::vector<std::complex<double>> calculateSusceptibilityLindhard(
68  const Index &index,
69  const std::vector<std::complex<double>> &energies
70  );
71 
74  std::complex<double> getPoleTimesTwoFermi(
75  std::complex<double> energy,
76  double e2,
77  double e1,
78  double chemicalPotential,
79  double temperature,
80  int kPlusQLinearIndex,
81  unsigned int meshPoint,
82  unsigned int state2,
83  unsigned int state1,
84  unsigned int numOrbitals
85  ) const;
86 };
87 
88 }; //End of namespace Solver
89 }; //End of namespace TBTK
90 
91 #endif
LindhardSusceptibility(const MomentumSpaceContext &momentumSpaceContext)
Definition: LindhardSusceptibility.h:34
virtual LindhardSusceptibility * createSlave()
Property container for density.
Definition: Susceptibility.h:42
Definition: MomentumSpaceContext.h:32
Flexible physical index.
Definition: Index.h:69
Definition: ModelFactory.h:35
virtual std::vector< std::complex< double > > calculateSusceptibility(const Index &index, const std::vector< std::complex< double >> &energies)