Go to the documentation of this file.
23 #ifndef COM_DAFER45_TBTK_MODEL
24 #define COM_DAFER45_TBTK_MODEL
32 #include "TBTK/IndexBasedHoppingAmplitudeFilter.h"
34 #include "TBTK/ManyParticleContext.h"
69 Model(
const std::vector<unsigned int> &capacity);
88 Model(
const std::string &serialization,
Mode mode);
140 &hoppingAmplitudeCallback
149 &overlapAmplitudeCallback
264 const std::tuple<HoppingAmplitude, HoppingAmplitude> &hoppingAmplitudes
279 virtual std::string
toString()
const;
289 double chemicalPotential;
295 ManyParticleContext *manyParticleContext;
319 hoppingAmplitudeCallback
327 overlapAmplitudeCallback
340 this->temperature = temperature;
348 this->chemicalPotential = chemicalPotential;
352 return chemicalPotential;
388 manyParticleContext =
new ManyParticleContext(&singleParticleContext);
392 return manyParticleContext;
398 if(this->hoppingAmplitudeFilter !=
nullptr)
399 delete this->hoppingAmplitudeFilter;
401 this->hoppingAmplitudeFilter = hoppingAmplitudeFilter.
clone();
407 if(this->indexFilter !=
nullptr)
408 delete this->indexFilter;
409 this->indexFilter = indexFilter.
clone();
411 if(this->hoppingAmplitudeFilter !=
nullptr)
412 delete this->hoppingAmplitudeFilter;
427 hoppingAmplitudeFilter ==
nullptr
428 || hoppingAmplitudeFilter->
isIncluded(hoppingAmplitude)
430 add(hoppingAmplitude);
438 hoppingAmplitudeFilter ==
nullptr
440 add(std::get<0>(hoppingAmplitudes));
441 add(std::get<1>(hoppingAmplitudes));
446 std::get<0>(hoppingAmplitudes)
449 add(std::get<0>(hoppingAmplitudes));
453 std::get<1>(hoppingAmplitudes)
456 add(std::get<1>(hoppingAmplitudes));
464 for(
unsigned int n = 0; n < hoppingAmplitudeList.
getSize(); n++)
465 add(hoppingAmplitudeList[n]);
472 indexFilter ==
nullptr
485 indexFilter ==
nullptr
double getChemicalPotential() const
Definition: Model.h:351
const SourceAmplitudeSet & getSourceAmplitudeSet() const
Definition: Model.h:371
List of HoppingAmplitudes .
List of HoppingAmplitudes .
Definition: HoppingAmplitudeList.h:34
The context for the single particle part of a Model.
Overlap amplitude between state 'bra' and 'ket'.
Definition: OverlapAmplitude.h:37
Definition: Streamable.h:30
SourceAmplitude container.
Definition: SourceAmplitudeSet.h:40
Container of Model related information.
Definition: Model.h:57
OverlapAmplitudeSet & getOverlapAmplitudeSet()
Definition: SingleParticleContext.h:191
const Index & getBraIndex() const
Definition: OverlapAmplitude.h:186
Statistics
Definition: Statistics.h:29
void setStatistics(Statistics statistics)
Definition: Model.h:355
void add(const OverlapAmplitude &overlapAmplitude)
Definition: OverlapAmplitudeSet.h:234
ManyParticleContext * getManyParticleContext()
Definition: Model.h:391
HoppingAmplitudeSet & getHoppingAmplitudeSet()
Definition: SingleParticleContext.h:173
Abstract HoppingAmplitude filter.
int getBasisSize() const
Definition: Model.h:311
void generateOverlapAmplitudeSet(const OverlapAmplitude::AmplitudeCallback &overlapAmplitudeCallback)
Definition: Model.h:323
Contains geometric inforamtion about a Model.
void add(HoppingAmplitude ha)
std::string serialize(Mode mode) const
Definition: HoppingAmplitude.h:57
Geometry & getGeometry()
Definition: Model.h:379
HoppingAmplitude container.
int getBasisIndex(const Index &index) const
Definition: Model.h:331
Statistics getStatistics() const
Definition: SingleParticleContext.h:161
void add(HoppingAmplitude ha)
Definition: Model.h:307
Geometry & getGeometry()
Definition: SingleParticleContext.h:200
void setChemicalPotential(double chemicalPotential)
Definition: Model.h:347
void addModel(const Model &model, const Index &subsytemIndex)
Statistics getStatistics() const
Definition: Model.h:359
Model & operator<<(const AbstractState &basisState)
Definition: Model.h:419
void add(const SourceAmplitude &sourceAmplitude)
Definition: SourceAmplitudeSet.h:238
double getTemperature() const
Definition: Model.h:343
const Index & getKetIndex() const
Definition: OverlapAmplitude.h:190
HoppingAmplitude container.
Definition: HoppingAmplitudeSet.h:50
Definition: FileReader.h:50
const OverlapAmplitudeSet & getOverlapAmplitudeSet() const
Definition: Model.h:375
void generateHoppingAmplitudeSet(const HoppingAmplitude::AmplitudeCallback &hoppingAmplitudeCallback)
BasisStateSet & getBasisStateSet()
Definition: SingleParticleContext.h:165
Definition: OverlapAmplitude.h:41
void generateHoppingAmplitudeSet(const HoppingAmplitude::AmplitudeCallback &hoppingAmplitudeCallback)
Definition: Model.h:315
Definition: Serializable.h:43
int getBasisSize() const
Definition: HoppingAmplitudeTree.h:496
const HoppingAmplitudeSet & getHoppingAmplitudeSet() const
Definition: Model.h:367
virtual AbstractHoppingAmplitudeFilter * clone() const =0
Definition: AbstractIndexFilter.h:30
void setStatistics(Statistics statistics)
Definition: SingleParticleContext.h:157
virtual bool isIncluded(const Index &index) const =0
bool getIsConstructed() const
Definition: HoppingAmplitudeSet.h:382
Source amplitude for equations with a source term.
Definition: SourceAmplitude.h:40
virtual bool isIncluded(const HoppingAmplitude &hoppingAmplitude) const =0
Contains geometric information about a Model.
Definition: Geometry.h:34
virtual std::string toString() const
Abstract base class for serializable objects.
Abstract base class for classes that can be written to a stream.
void setTemperature(double temperature)
Definition: Model.h:339
int getBasisIndex(const Index &index) const
const BasisStateSet & getBasisStateSet() const
Definition: Model.h:363
void createManyParticleContext()
Definition: Model.h:387
Hopping amplitude from state 'from' to state 'to'.
Definition: HoppingAmplitude.h:53
SourceAmplitudeSet & getSourceAmplitudeSet()
Definition: SingleParticleContext.h:182
bool getIsConstructed()
Definition: Model.h:335
Enum class for Fermi-Dirac and Bose-Einstein statistics.
Base class for classes that can communicate their status during execution.
Definition: Communicator.h:56
Base class for classes that can communicate their status during execution.
void generateOverlapAmplitudeSet(const OverlapAmplitude::AmplitudeCallback &overlapAmplitudeCallback)
Model & operator=(const Model &rhs)
OverlapAmplitude container.
Definition: OverlapAmplitudeSet.h:37
The context for the single particle part of a Model.
Definition: SingleParticleContext.h:39
void setFilter(const AbstractHoppingAmplitudeFilter &hoppingAmplitudeFilter)
Definition: Model.h:395
Mode
Definition: Serializable.h:47
const Index & getIndex() const
Definition: SourceAmplitude.h:146
Definition: AbstractHoppingAmplitudeFilter.h:30
unsigned int getSize() const
Definition: HoppingAmplitudeList.h:91
Physical index.
Definition: Index.h:44
Definition: IndexBasedHoppingAmplitudeFilter.h:31
virtual AbstractIndexFilter * clone() const =0