TBTK
TBTK::Model Class Reference

Container of Model related information. More...

#include <Model.h>

Inheritance diagram for TBTK::Model:
TBTK::Serializable TBTK::Communicator

Public Member Functions

 Model ()
 
 Model (const std::vector< unsigned int > &capacity)
 
 Model (const Model &model)
 
 Model (Model &&model)
 
 Model (const std::string &serialization, Mode mode)
 
virtual ~Model ()
 
Modeloperator= (const Model &model)
 
Modeloperator= (Model &&model)
 
void addHoppingAmplitude (HoppingAmplitude ha)
 
void addHoppingAmplitudeAndHermitianConjugate (HoppingAmplitude ha)
 
void addModel (const Model &model, const Index &subsytemIndex)
 
int getBasisIndex (const Index &index) const
 
int getBasisSize () const
 
void construct ()
 
bool getIsConstructed ()
 
void sortHoppingAmplitudes ()
 
void constructCOO ()
 
void destructCOO ()
 
void reconstructCOO ()
 
void setTemperature (double temperature)
 
double getTemperature () const
 
void setChemicalPotential (double chemicalPotential)
 
double getChemicalPotential () const
 
void setStatistics (Statistics statistics)
 
Statistics getStatistics () const
 
const HoppingAmplitudeSetgetHoppingAmplitudeSet () const
 
void createGeometry (int dimensions, int numSpecifiers=0)
 
GeometrygetGeometry ()
 
const GeometrygetGeometry () const
 
void createManyBodyContext ()
 
ManyBodyContextgetManyBodyContext ()
 
void setFilter (const AbstractHoppingAmplitudeFilter &hoppingAmplitudeFilter)
 
void setFilter (const AbstractIndexFilter &indexFilter)
 
Modeloperator<< (const HoppingAmplitude &hoppingAmplitude)
 
Modeloperator<< (const std::tuple< HoppingAmplitude, HoppingAmplitude > &hoppingAmplitudes)
 
Modeloperator<< (const HoppingAmplitudeList &hoppingAmplitudeList)
 
std::string serialize (Mode mode) const
 
- Public Member Functions inherited from TBTK::Communicator
 Communicator (bool verbose)
 
void setVerbose (bool verbose)
 
bool getVerbose () const
 

Friends

class FileReader
 

Additional Inherited Members

- Public Types inherited from TBTK::Serializable
enum  Mode { Debug, Binary, XML, JSON }
 
- Static Public Member Functions inherited from TBTK::Serializable
static bool hasID (const std::string &serialization, Mode mode)
 
static std::string getID (const std::string &serialization, Mode mode)
 
- Static Public Member Functions inherited from TBTK::Communicator
static void setGlobalVerbose (bool globalVerbose)
 
static bool getGlobalVerbose ()
 
- Static Protected Member Functions inherited from TBTK::Serializable
static bool validate (const std::string &serialization, const std::string &id, Mode mode)
 
static std::string getContent (const std::string &serialization, Mode mode)
 
static std::vector< std::string > split (const std::string &content, Mode mode)
 
static std::string serialize (bool b, Mode mode)
 
static void deserialize (const std::string &serialization, bool *b, Mode mode)
 
static std::string serialize (int i, Mode mode)
 
static void deserialize (const std::string &serialization, int *i, Mode mode)
 
static std::string serialize (unsigned int u, Mode mode)
 
static void deserialize (const std::string &serialization, unsigned int *u, Mode mode)
 
static std::string serialize (double d, Mode mode)
 
static void deserialize (const std::string &serialization, double *d, Mode mode)
 
static std::string serialize (std::complex< double > c, Mode mode)
 
static void deserialize (const std::string &serialization, std::complex< double > *c, Mode mode)
 
static std::string serialize (Statistics s, Mode mode)
 
static void deserialize (const std::string &serialization, Statistics *s, Mode mode)
 
static std::string extract (const std::string &serialization, Mode mode, std::string component)
 

Detailed Description

Container of Model related information.

The Model conatins all model related information such as the Hamiltonian, temperature, and chemical potential.

Constructor & Destructor Documentation

TBTK::Model::Model ( )

Constructor.

TBTK::Model::Model ( const std::vector< unsigned int > &  capacity)

Constructor.

TBTK::Model::Model ( const Model model)

Copy constructor.

TBTK::Model::Model ( Model &&  model)

Move constructor.

TBTK::Model::Model ( const std::string &  serialization,
Mode  mode 
)

Constructor. Constructs the Model from a serialization string. Note that the ManyBodyContext is not yet serialized.

virtual TBTK::Model::~Model ( )
virtual

Destructor.

Member Function Documentation

void TBTK::Model::addHoppingAmplitude ( HoppingAmplitude  ha)
inline
void TBTK::Model::addHoppingAmplitudeAndHermitianConjugate ( HoppingAmplitude  ha)
inline

Add a HoppingAmplitude and its Hermitian conjugate.

void TBTK::Model::addModel ( const Model model,
const Index subsytemIndex 
)

Add a Model as a subsystem.

void TBTK::Model::construct ( )

Construct Hilbert space. No more HoppingAmplitudes should be added after this call.

void TBTK::Model::constructCOO ( )
inline

Construct Hamiltonian on COO format.

void TBTK::Model::createGeometry ( int  dimensions,
int  numSpecifiers = 0 
)
inline

Create geometry.

void TBTK::Model::createManyBodyContext ( )
inline

Create ManyBodyContext.

void TBTK::Model::destructCOO ( )
inline

Destruct Hamiltonian on COO format.

int TBTK::Model::getBasisIndex ( const Index index) const
inline

Get Hilbert space index corresponding to given 'from'-index.

Parameters
index'From'-index to get Hilbert space index for.
int TBTK::Model::getBasisSize ( ) const
inline

Get size of Hilbert space.

double TBTK::Model::getChemicalPotential ( ) const
inline

Get chemical potential.

Geometry * TBTK::Model::getGeometry ( )
inline

Get geometry.

const Geometry * TBTK::Model::getGeometry ( ) const
inline

Get geometry.

const HoppingAmplitudeSet * TBTK::Model::getHoppingAmplitudeSet ( ) const
inline

Get amplitude set.

bool TBTK::Model::getIsConstructed ( )
inline

Returns true if the Hilbert space basis has been constructed.

ManyBodyContext * TBTK::Model::getManyBodyContext ( )
inline
Statistics TBTK::Model::getStatistics ( ) const
inline

Get statistics.

double TBTK::Model::getTemperature ( ) const
inline

Get temperature.

Model & TBTK::Model::operator<< ( const HoppingAmplitude hoppingAmplitude)
inline

Operator<<.

Model & TBTK::Model::operator<< ( const std::tuple< HoppingAmplitude, HoppingAmplitude > &  hoppingAmplitudes)
inline

Operator<<.

Model & TBTK::Model::operator<< ( const HoppingAmplitudeList hoppingAmplitudeList)
inline

Operator<<.

Model& TBTK::Model::operator= ( const Model model)

Assignment operator.

Model& TBTK::Model::operator= ( Model &&  model)

Move assignment operator.

void TBTK::Model::reconstructCOO ( )
inline

To be called when HoppingAmplitudes need to be reevaluated. This is required if the HoppingAmplitudeSet in addition to its standard storage format also utilizes a more effective format such as COO format and some HoppingAmplitudes are evaluated through the use of callbacks.

std::string TBTK::Model::serialize ( Mode  mode) const
virtual

Implements Serializable::serialize(). Note that the ManyBodyContext is not yet serialized.

Implements TBTK::Serializable.

void TBTK::Model::setChemicalPotential ( double  chemicalPotential)
inline

Set chemical potential.

void TBTK::Model::setFilter ( const AbstractHoppingAmplitudeFilter hoppingAmplitudeFilter)
inline

Set HoppingAmplitude filter.

void TBTK::Model::setFilter ( const AbstractIndexFilter indexFilter)
inline

Set Index filter.

void TBTK::Model::setStatistics ( Statistics  statistics)
inline

Set statistics.

void TBTK::Model::setTemperature ( double  temperature)
inline

Set temperature.

void TBTK::Model::sortHoppingAmplitudes ( )
inline

Sort HoppingAmplitudes.

Friends And Related Function Documentation

friend class FileReader
friend

FileReader is a friend class to allow it to write Model data.


The documentation for this class was generated from the following file: