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 
204 inline const Geometry& SingleParticleContext::getGeometry() const{
205  return geometry;
206 }
207 
208 }; //End of namespace TBTK
209 
210 #endif
TBTK::SourceAmplitudeSet
SourceAmplitude container.
Definition: SourceAmplitudeSet.h:40
OverlapAmplitudeSet.h
OverlapAmplitude container.
TBTK::SingleParticleContext::getOverlapAmplitudeSet
OverlapAmplitudeSet & getOverlapAmplitudeSet()
Definition: SingleParticleContext.h:191
TBTK::SingleParticleContext::SingleParticleContext
SingleParticleContext()
TBTK::Statistics
Statistics
Definition: Statistics.h:29
TBTK::SingleParticleContext::getHoppingAmplitudeSet
HoppingAmplitudeSet & getHoppingAmplitudeSet()
Definition: SingleParticleContext.h:173
Geometry.h
Contains geometric inforamtion about a Model.
TBTK::HoppingAmplitude::AmplitudeCallback
Definition: HoppingAmplitude.h:57
HoppingAmplitudeSet.h
HoppingAmplitude container.
TBTK::SingleParticleContext::getStatistics
Statistics getStatistics() const
Definition: SingleParticleContext.h:161
TBTK::SingleParticleContext::getGeometry
Geometry & getGeometry()
Definition: SingleParticleContext.h:200
SourceAmplitudeSet.h
SourceAmplitude container.
TBTK::HoppingAmplitudeSet
HoppingAmplitude container.
Definition: HoppingAmplitudeSet.h:50
TBTK::FileReader
Definition: FileReader.h:50
TBTK::SingleParticleContext::generateHoppingAmplitudeSet
void generateHoppingAmplitudeSet(const HoppingAmplitude::AmplitudeCallback &hoppingAmplitudeCallback)
TBTK::SingleParticleContext::getBasisStateSet
BasisStateSet & getBasisStateSet()
Definition: SingleParticleContext.h:165
TBTK::OverlapAmplitude::AmplitudeCallback
Definition: OverlapAmplitude.h:41
TBTK::Serializable
Definition: Serializable.h:43
TBTK::SingleParticleContext::setStatistics
void setStatistics(Statistics statistics)
Definition: SingleParticleContext.h:157
TBTK::Geometry
Contains geometric information about a Model.
Definition: Geometry.h:34
Serializable.h
Abstract base class for serializable objects.
TBTK::SingleParticleContext::serialize
std::string serialize(Mode mode) const
TBTK::SingleParticleContext::getSourceAmplitudeSet
SourceAmplitudeSet & getSourceAmplitudeSet()
Definition: SingleParticleContext.h:182
Statistics.h
Enum class for Fermi-Dirac and Bose-Einstein statistics.
TBTK::SingleParticleContext::generateOverlapAmplitudeSet
void generateOverlapAmplitudeSet(const OverlapAmplitude::AmplitudeCallback &overlapAmplitudeCallback)
TBTK::OverlapAmplitudeSet
OverlapAmplitude container.
Definition: OverlapAmplitudeSet.h:37
TBTK::SingleParticleContext
The context for the single particle part of a Model.
Definition: SingleParticleContext.h:39
TBTK::Serializable::Mode
Mode
Definition: Serializable.h:47