TBTK
Need a break? Support the development by playing Polarity Puzzles
SingleParticleContext.h
Go to the documentation of this file.
1 /* Copyright 2016 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_SINGLE_PARTICLE_CONTEXT
24 #define COM_DAFER45_TBTK_SINGLE_PARTICLE_CONTEXT
25 
26 #include "TBTK/BasisStateSet.h"
27 #include "TBTK/Geometry.h"
30 #include "TBTK/Serializable.h"
32 #include "TBTK/Statistics.h"
33 
34 namespace TBTK{
35 
36 class FileReader;
37 
40 public:
43 
45  SingleParticleContext(const std::vector<unsigned int> &capacity);
46 
55  SingleParticleContext(const std::string &serialization, Mode mode);
56 
60  void setStatistics(Statistics statistics);
61 
65  Statistics getStatistics() const;
66 
73  &hoppingAmplitudeCallback
74  );
75 
82  &overlapAmplitudeCallback
83  );
84 
88  BasisStateSet& getBasisStateSet();
89 
93  const BasisStateSet& getBasisStateSet() const;
94 
99 
104 
109 
114 
119 
124 
127 
129  const Geometry& getGeometry() const;
130 
133  std::string serialize(Mode mode) const;
134 private:
136  BasisStateSet basisStateSet;
137 
139  HoppingAmplitudeSet hoppingAmplitudeSet;
140 
142  SourceAmplitudeSet sourceAmplitudeSet;
143 
145  OverlapAmplitudeSet overlapAmplitudeSet;
146 
148  Statistics statistics;
149 
151  Geometry geometry;
152 
154  friend class FileReader;
155 };
156 
158  this->statistics = statistics;
159 }
160 
162  return statistics;
163 }
164 
166  return basisStateSet;
167 }
168 
169 inline const BasisStateSet& SingleParticleContext::getBasisStateSet() const{
170  return basisStateSet;
171 }
172 
174  return hoppingAmplitudeSet;
175 }
176 
177 inline const HoppingAmplitudeSet&
179  return hoppingAmplitudeSet;
180 }
181 
183  return sourceAmplitudeSet;
184 }
185 
186 inline const SourceAmplitudeSet&
188  return sourceAmplitudeSet;
189 }
190 
192  return overlapAmplitudeSet;
193 }
194 
195 inline const OverlapAmplitudeSet&
197  return overlapAmplitudeSet;
198 }
199 
201  return geometry;
202 }
203 
205  return geometry;
206 }
207 
208 }; //End of namespace TBTK
209 
210 #endif
The context for the single particle part of a Model.
Definition: SingleParticleContext.h:39
OverlapAmplitudeSet & getOverlapAmplitudeSet()
Definition: SingleParticleContext.h:191
HoppingAmplitude container.
Definition: HoppingAmplitudeSet.h:50
OverlapAmplitude container.
Definition: OverlapAmplitudeSet.h:37
Definition: OverlapAmplitude.h:41
Definition: Serializable.h:43
Enum class for Fermi-Dirac and Bose-Einstein statistics.
Definition: HoppingAmplitude.h:57
Statistics getStatistics() const
Definition: SingleParticleContext.h:161
Geometry & getGeometry()
Definition: SingleParticleContext.h:200
BasisStateSet & getBasisStateSet()
Definition: SingleParticleContext.h:165
HoppingAmplitude container.
Definition: FileReader.h:50
void setStatistics(Statistics statistics)
Definition: SingleParticleContext.h:157
SourceAmplitude container.
OverlapAmplitude container.
void generateHoppingAmplitudeSet(const HoppingAmplitude::AmplitudeCallback &hoppingAmplitudeCallback)
SourceAmplitudeSet & getSourceAmplitudeSet()
Definition: SingleParticleContext.h:182
HoppingAmplitudeSet & getHoppingAmplitudeSet()
Definition: SingleParticleContext.h:173
SourceAmplitude container.
Definition: SourceAmplitudeSet.h:40
std::string serialize(Mode mode) const
Definition: Boolean.h:32
void generateOverlapAmplitudeSet(const OverlapAmplitude::AmplitudeCallback &overlapAmplitudeCallback)
Contains geometric information about a Model.
Definition: Geometry.h:34
Mode
Definition: Serializable.h:47
Abstract base class for serializable objects.
Contains geometric inforamtion about a Model.
Statistics
Definition: Statistics.h:29