TBTK
Need a break? Support the development by playing Polarity Puzzles
MatsubaraSusceptibility.h
1 /* Copyright 2018 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 
17 
24 #ifndef COM_DAFER45_TBTK_SOLVER_MATSUBARA_SUSCEPTIBILITY
25 #define COM_DAFER45_TBTK_SOLVER_MATSUBARA_SUSCEPTIBILITY
26 
27 #include "TBTK/Communicator.h"
29 #include "TBTK/MomentumSpaceContext.h"
30 #include "TBTK/Property/Susceptibility.h"
31 #include "TBTK/Solver/Solver.h"
32 
33 #include <complex>
34 
35 namespace TBTK{
36 namespace Solver{
37 
38 class MatsubaraSusceptibility : public Solver, public Communicator{
39 public:
41  MatsubaraSusceptibility(
42  const MomentumSpaceContext &momentumSpaceContext,
43  const Property::GreensFunction &greensFunction
44  );
45 
47  virtual MatsubaraSusceptibility* createSlave();
48 
51  virtual std::vector<std::complex<double>> calculateSusceptibility(
52  const Index &index,
53  const std::vector<std::complex<double>> &energies
54  );
55 
57  std::vector<std::complex<double>> calculateSusceptibility(
58  const Index &index,
59  int lowerMatsubaraEnergyIndex,
60  int upperMatsubaraEnergyIndex
61  );
62 
64  Property::Susceptibility calculateSusceptibilityAllBlocks(
65  const Index &index,
66  int lowerMatsubaraEnergyIndex,
67  int upperMatsubaraEnergyIndex
68  );
69 
71  const Property::GreensFunction& getGreensFunction() const;
72 private:
74  const Property::GreensFunction &greensFunction;
75 
77  const MomentumSpaceContext &momentumSpaceContext;
78 };
79 
80 inline const Property::GreensFunction&
81 MatsubaraSusceptibility::getGreensFunction() const{
82  return greensFunction;
83 }
84 
85 }; //End of namespace Solver
86 }; //End of namespace TBTK
87 
88 #endif
89 
Property container for the Green&#39;s function.
Base class for Solvers.
Definition: Boolean.h:32
Base class for classes that can communicate their status during execution.