TBTK
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
 

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)
 
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

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

TBTK::BoundaryCondition::BoundaryCondition ( )
inline

Constructs a BoundaryCondition.

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

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

Add HoppingAmplitude to the boundary condition.

Parameters
hoppingAmplitudeHoppingAmplitude to add.
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.
const HoppingAmplitudeList & TBTK::BoundaryCondition::getHoppingAmplitudeList ( ) const
inline

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

Returns
HoppingAmplitudeList with all contained HoppingAmplitudes .
unsigned int TBTK::BoundaryCondition::getSizeInBytes ( ) const
inline

Get size in bytes.

Returns
Memory size required to store the BoundaryCondition.
const SourceAmplitude & TBTK::BoundaryCondition::getSourceAmplitude ( ) const
inline

Get the SourceAmplitude.

Returns
The SourceAmplitude.
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.

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

Set the SourceAmplitude.

Parameters
sourceAmplitudeSourceAmplitude to use.
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: