|
| Magnetization (const std::vector< int > &ranges) |
|
| Magnetization (const std::vector< int > &ranges, const SpinMatrix *data) |
|
| Magnetization (const IndexTree &indexTree) |
|
| Magnetization (const IndexTree &indexTree, const SpinMatrix *data) |
|
| Magnetization (const std::string &serialization, Mode mode) |
|
std::string | serialize (Mode mode) const |
|
unsigned int | getBlockSize () const |
|
unsigned int | getSize () const |
|
const std::vector< SpinMatrix > & | getData () const |
|
std::vector< SpinMatrix > & | getDataRW () |
|
unsigned int | getDimensions () const |
|
std::vector< int > | getRanges () const |
|
int | getOffset (const Index &index) const |
|
const IndexDescriptor & | getIndexDescriptor () const |
|
bool | contains (const Index &index) const |
|
void | reduce (const std::vector< Index > &targetPatterns, const std::vector< Index > &newPatterns) |
|
void | hermitianConjugate () |
|
std::vector< SparseMatrix< SpinMatrix > > | toSparseMatrices (const Model &model) const |
|
virtual const SpinMatrix & | operator() (const Index &index, unsigned int offset=0) const |
|
virtual SpinMatrix & | operator() (const Index &index, unsigned int offset=0) |
|
SpinMatrix & | operator() (const std::initializer_list< Subindex > &index) |
|
const SpinMatrix & | operator() (const std::initializer_list< Subindex > &index) const |
|
virtual const SpinMatrix & | operator() (unsigned int offset) const |
|
virtual SpinMatrix & | operator() (unsigned int offset) |
|
void | setAllowIndexOutOfBoundsAccess (bool allowIndexOutOfBoundsAccess) |
|
void | setDefaultValue (const SpinMatrix &defaultValue) |
|
void | replaceValues (const SpinMatrix &targetValue, const SpinMatrix &replacementValue) |
|
virtual std::string | toString () const |
|
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) |
|
virtual std::string | toString () const =0 |
|
|
enum | Mode { Debug,
Binary,
XML,
JSON
} |
|
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) |
|
| AbstractProperty () |
|
| AbstractProperty (unsigned int blockSize) |
|
| AbstractProperty (unsigned int blockSize, const SpinMatrix *data) |
|
| AbstractProperty (const std::vector< int > &ranges, unsigned int blockSize) |
|
| AbstractProperty (const std::vector< int > &ranges, unsigned int blockSize, const SpinMatrix *data) |
|
| AbstractProperty (const IndexTree &indexTree, unsigned int blockSize) |
|
| AbstractProperty (const IndexTree &indexTree, unsigned int blockSize, const SpinMatrix *data) |
|
| AbstractProperty (const AbstractProperty &abstractProperty) |
|
| AbstractProperty (AbstractProperty &&abstractProperty) |
|
| AbstractProperty (const std::string &serialization, Mode mode) |
|
virtual | ~AbstractProperty () |
|
AbstractProperty & | operator= (const AbstractProperty &abstractProperty) |
|
AbstractProperty & | operator= (AbstractProperty &&abstractProperty) |
|
AbstractProperty & | operator+= (const AbstractProperty &rhs) |
|
AbstractProperty & | operator-= (const AbstractProperty &rhs) |
|
AbstractProperty & | operator*= (const SpinMatrix &rhs) |
|
AbstractProperty & | operator/= (const SpinMatrix &rhs) |
|
| Property () |
|
virtual | ~Property () |
|
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) |
|
Property container for magnetization.
The Magnetization is a Property with DataType SpinMatrix.
Example
#include "TBTK/PropertyExtractor/Diagonalizer.h"
using namespace TBTK;
using namespace Visualization::MatPlotLib;
int main(){
const unsigned int SIZE_X = 11;
const unsigned int SIZE_Y = 11;
double t = 1;
double J = 1;
J,
{SIZE_X/2, SIZE_Y/2, 0},
{SIZE_X/2, SIZE_Y/2, 0}
);
-J,
{SIZE_X/2, SIZE_Y/2, 1},
{SIZE_X/2, SIZE_Y/2, 1}
);
= propertyExtractor.calculateMagnetization({
{_a_, _a_, IDX_SPIN}
});
<< magnetization({5, 5, IDX_SPIN}) << "\n";
Plotter plotter;
plotter.setTitle("Magnetization projected on the z-axis");
plotter.plot({_a_, _a_, IDX_SPIN}, {0, 0, 1}, magnetization);
plotter.save("figures/MagnetizationZ.png");
}
Output
magnetization({5, 5, IDX_SPIN}) = SpinMatrix
(0.0930429,0) (-4.07175e-17,0)
(-4.07175e-17,0) (0.394725,0)