SyTen
syten::TensorBlock< rank > Class Template Reference

Represents one symmetry-protected block of a full tensor. More...

#include <tensorblock.h>

+ Collaboration diagram for syten::TensorBlock< rank >:

Public Types

typedef SparseTensor< rank, CDefCGC
 The sparse tensor type for the sparse/CGC tensors. More...
 
typedef std::vector< CGCCGCSet
 Type of the set of all CGC tensors. More...
 
typedef std::array< RDef, rank *SYTEN_MAX_SYM *SYTEN_MAX_DEGCmps
 Type of the set of labels used for comparison. More...
 
typedef DenseTensor< rank, SDefDense
 The standard dense tensor type for the reduced tensor. More...
 
typedef GenericDenseTensor< rank, SDefDenseStorage
 Storage type for the reduced, dense tensor. More...
 
typedef std::array< Sector, rankSym
 Type of the transformation definition of all legs in all symmetries. More...
 

Public Member Functions

MemoryUsage::MemorySize allocSize () const
 allocSize()/memory_size.h support. More...
 
void make_dense_cuda ()
 Brings the dense tensor into CUDA form. More...
 
void make_dense_standard ()
 Brings the dense tensor into standard form. More...
 
void maybe_make_dense_cuda ()
 Conditionally transforms the stored dense tensor into a CUDA dense tensor if CUDA support is compiled in, at least one CUDA device is enabled and the tensor is larger than the CUDA threshold. More...
 
TensorBlock< rankreturn_as_dense_standard () const
 Returns a copy of this with the dense tensor in standard dense format. More...
 
 TensorBlock ()=default
 Default ctor, mainly for boost serialisation. More...
 
template<typename TypeDense , typename TypeSym >
 TensorBlock (TypeDense &&m_, TypeSym &&s_)
 Standard ctor, default-initialises the CGC blocks (no non-abelian quantum numbers). More...
 
template<typename TypeDense , typename TypeSym , typename TypeCGC >
 TensorBlock (TypeDense &&m_, TypeSym &&s_, TypeCGC &&c_)
 Standard ctor. More...
 
Symmetry sector information
std::array< Sector, rank > const & trans () const
 Returns the symmetry sector information of all legs. More...
 
Sector const & trans (Index leg) const
 Returns the symmetry sector information on the specified leg. More...
 
Rep const & trans (Index leg, Index sym) const
 Returns the irrep of the specified symmetry on the specified leg. More...
 
std::array< Sector, rank > && trans_m ()
 Returns the symmetry sector information of all legs as rvalue. More...
 
Sector && trans_m (Index d)
 Returns the symmetry sector information of the specified leg as rvalue. More...
 
void setTransform (std::array< Sector, rank > &&rep)
 Sets the transformation of all legs and updates the fast comparison list. More...
 
Index numSymmetries () const
 
Index numCGC () const
 
Comparison of sectors with other tensor blocks
bool eqTrans (TensorBlock const &other) const
 Returns true if *this and other transform equally on all legs. More...
 
template<Rank orank>
bool eqTrans (TensorBlock< orank > const &other, Index const ileg, Index ioleg) const
 Returns true if the leg-th leg of *this and the oleg-th leg of other transform equally. More...
 
Boost serialisation support
template<class Archive >
void save (Archive &ar, const unsigned int) const
 Serialising. More...
 
template<class Archive >
void load (Archive &ar, const unsigned int in_version)
 Deserialising. More...
 

Public Attributes

CGCSet c
 The set of all CGC spaces. More...
 
Cmps cmps
 A list of all labels on all legs, first all labels of the first leg, then all labels on the second leg etc. More...
 
Index cmps_size_per_leg = 0
 The number of entries in Cmps per leg. More...
 
bool isZero = true
 True if the tensor is identically zero. More...
 
DenseStorage m
 The dense tensor/reduced multiplet. More...
 

Static Public Attributes

static constexpr unsigned int version = 3
 Boost serialisation version. More...
 

Private Member Functions

void updateTransform ()
 Call this to update the fast symmetry representation cmps after changing s. More...
 

Private Attributes

Sym s
 The actual irreps on each leg and symmetry, call updateTransform() after changing this. More...
 

Detailed Description

template<Rank rank>
class syten::TensorBlock< rank >

Represents one symmetry-protected block of a full tensor.

Consists of a reduced, dense tensor \( m \) and a set of CGC-tensors \( c_i \) , one for each symmetry. The full block \( b \) would be the tensor product \( b = m \otimes \left( \bigotimes_{i=1}^{\mathrm{\# Sym}} c_i \right) \).

The block transforms irreducibly on each leg in each symmetry sector. To avoid comparing large numbers of representations, we construct an optimised representation (namely just the set of labels) of the transformation properties. For this reason, the symmetry transform is not directly accessible and one has to use setter and getter functions. Sorry.


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