GTCompactStore

GTCompactStore[matrix]
allows to store sparse matrices in a compact form.

DetailsDetails

  • Tight-binding Hamiltionians in real space are represented by large matrices. If a limited interaction radius of the atoms is considered the matrices are sparse. GTCompactStore is used especially in the calculation of the adjacency matrix. GTCompactStore only stores the non-zero elements and the position of those elements. The full matrix can be restored.
  • The following options can be given:
  • GOCompactFalsestore matrix in compact form
    GOMatrixType"General"type of the matrix
  • See: W. Hergert, M. Geilhufe, Group Theory in Solid State Physics and Photonics. Problem Solving with Mathematica, chapter 9.7.3

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

First load the package:

In[1]:=
Click for copyable input

A general matrix of size with randomly set elements is constructed.

In[2]:=
Click for copyable input

The matrix can be easily visualized.

In[3]:=
Click for copyable input
Out[3]=

Only non-zero elements are stored in the compact storage format. At first the dimension is given in the list. All nonzero elements follow. The last list contains the positions of the non-zero elements.

In[4]:=
Click for copyable input
Out[4]=