TBTK
Need a break? Support the development by playing Polarity Puzzles
TBTK::BoundaryCondition Class Reference

A set of HoppingAmplitudes , a SourceAmplitude, and an elimination Index, which together form a single linear equation that can be used to eliminate an Index from a larger set of linear equations. More...

#include <BoundaryCondition.h>

Inheritance diagram for TBTK::BoundaryCondition:
TBTK::Serializable

Public Member Functions

 BoundaryCondition ()
 
 BoundaryCondition (const std::string &serializeation, Serializable::Mode mode)
 
void add (const HoppingAmplitude &hoppingAmplitude)
 
const HoppingAmplitudeListgetHoppingAmplitudeList () const
 
void set (const SourceAmplitude &sourceAmplitude)
 
const SourceAmplitudegetSourceAmplitude () const
 
void setEliminationIndex (const Index &eliminationIndex)
 
const IndexgetEliminationIndex () const
 
std::string serialize (Serializable::Mode mode) const
 
unsigned int getSizeInBytes () const
 
- Public Member Functions inherited from TBTK::Serializable
template<>
std::string serialize (const bool &data, Mode mode)
 
template<>
std::string serialize (const double &data, Mode mode)
 
template<>
std::string serialize (const std::complex< double > &data, Mode mode)
 
template<>
std::string serialize (const int &data, Mode mode)
 
template<>
std::string serialize (const unsigned int &data, Mode mode)
 
template<>
std::string serialize (const SpinMatrix &data, Mode mode)
 
template<>
std::string serialize (const Statistics &data, Mode mode)
 
template<>
std::string serialize (const std::vector< std::complex< double >> &data, Mode mode)
 
template<>
int deserialize (const std::string &serialization, Mode mode)
 

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 std::string extractComponent (const std::string &serialization, const std::string &containerID, const std::string &componentID, const std::string &componentName, Mode mode)
 
- 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)
 
template<typename DataType >
static std::enable_if<!std::is_pointer< DataType >::value, std::string >::type serialize (const DataType &data, Mode mode)
 
template<typename DataType >
static std::enable_if< std::is_pointer< DataType >::value, std::string >::type serialize (const DataType &data, Mode mode)
 
template<typename DataType >
static DataType deserialize (const std::string &serialization, Mode mode)
 
static std::string extract (const std::string &serialization, Mode mode, std::string component)
 

Detailed Description

A set of HoppingAmplitudes , a SourceAmplitude, and an elimination Index, which together form a single linear equation that can be used to eliminate an Index from a larger set of linear equations.

A BoundaryCondition consists of a set of HoppingAmplitudes and a SourceAmplitude, which together form a linear equation. I.e., if a matrix is written down using these HoppingAmplitudes and the SourceAmplitude, they form a single line in a matrix equation. The BoundaryCondition also contains an Index which indicates which Index the BoundaryCondition is supposed to eliminate in a linnear equation system.

Constructor & Destructor Documentation

◆ BoundaryCondition() [1/2]

TBTK::BoundaryCondition::BoundaryCondition ( )
inline

Constructs a BoundaryCondition.

◆ BoundaryCondition() [2/2]

TBTK::BoundaryCondition::BoundaryCondition ( const std::string &  serializeation,
Serializable::Mode  mode 
)

Constructor. Constructs the BoundaryCondition from a serialization string.

Parameters
serializationSerialization string from which to construct the BoundaryCondition.
modeMode with which the string has been serialized.

Member Function Documentation

◆ add()

void TBTK::BoundaryCondition::add ( const HoppingAmplitude hoppingAmplitude)
inline

Add HoppingAmplitude to the boundary condition.

Parameters
hoppingAmplitudeHoppingAmplitude to add.

◆ getEliminationIndex()

const Index & TBTK::BoundaryCondition::getEliminationIndex ( ) const
inline

Get the Index that is to be eliminated by the boundary condition.

Returns
The Index that is to be eliminated by the boundary condition.

◆ getHoppingAmplitudeList()

const HoppingAmplitudeList & TBTK::BoundaryCondition::getHoppingAmplitudeList ( ) const
inline

Get a HoppingAmplitudeList containing all the HoppingAmplitudes contained in the BoundaryCondition.

Returns
HoppingAmplitudeList with all contained HoppingAmplitudes .

◆ getSizeInBytes()

unsigned int TBTK::BoundaryCondition::getSizeInBytes ( ) const
inline

Get size in bytes.

Returns
Memory size required to store the BoundaryCondition.

◆ getSourceAmplitude()

const SourceAmplitude & TBTK::BoundaryCondition::getSourceAmplitude ( ) const
inline

Get the SourceAmplitude.

Returns
The SourceAmplitude.

◆ serialize()

std::string TBTK::BoundaryCondition::serialize ( Serializable::Mode  mode) const
virtual

Serialize BoundaryCondition.

Parameters
modeSerialization mode to use.
Returns
Serialized string representation of the BoundaryCondition.

Implements TBTK::Serializable.

◆ set()

void TBTK::BoundaryCondition::set ( const SourceAmplitude sourceAmplitude)
inline

Set the SourceAmplitude.

Parameters
sourceAmplitudeSourceAmplitude to use.

◆ setEliminationIndex()

void TBTK::BoundaryCondition::setEliminationIndex ( const Index eliminationIndex)
inline

Set the Index that is to be eliminated by the boundary condition.

Parameters
eliminationIndexIndex that should be eliminated by the boundary condition.

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