CheMPS2
CheMPS2::Tensor Class Referenceabstract

#include <Tensor.h>

+ Inheritance diagram for CheMPS2::Tensor:

Public Member Functions

virtual int gNKappa () const =0
 Get the number of tensor blocks. More...
 
virtual double * gStorage ()=0
 Get the pointer to the storage. More...
 
virtual int gKappa (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2) const =0
 Get the index corresponding to a certain tensor block. More...
 
virtual int gKappa2index (const int kappa) const =0
 Get the storage jump corresponding to a certain tensor block. More...
 
virtual double * gStorage (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2)=0
 Get the pointer to the storage of a certain tensor block. More...
 
virtual int gIndex () const =0
 Get the location index. More...
 

Protected Attributes

int index
 Index of the Tensor object. For TensorT: a site index; for other tensors: a boundary index.
 
double * storage
 The actual variables. Tensor block kappa begins at storage+kappa2index[kappa] and ends at storage+kappa2index[kappa+1].
 
int nKappa
 Number of Tensor blocks.
 
int * kappa2index
 kappa2index[kappa] indicates the start of tensor block kappa in storage. kappa2index[nKappa] gives the size of storage.
 

Detailed Description

Pure virtual Tensor class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
February 15, 2013

The Tensor class defines parameters and functions which all Tensors must have.

Definition at line 31 of file Tensor.h.

Member Function Documentation

virtual int CheMPS2::Tensor::gIndex ( ) const
pure virtual

Get the location index.

Returns
the index

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.

virtual int CheMPS2::Tensor::gKappa ( const int  N1,
const int  TwoS1,
const int  I1,
const int  N2,
const int  TwoS2,
const int  I2 
) const
pure virtual

Get the index corresponding to a certain tensor block.

Parameters
N1The left or up particle number sector
TwoS1The left or up spin symmetry sector
I1The left or up irrep sector
N2The right or down particle number sector
TwoS2The right or down spin symmetry sector
I2The right or down irrep sector
Returns
The kappa corresponding to the input parameters; -1 means no such block

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.

virtual int CheMPS2::Tensor::gKappa2index ( const int  kappa) const
pure virtual

Get the storage jump corresponding to a certain tensor block.

Parameters
kappaThe symmetry block
Returns
kappa2index[ kappa ], the memory jumper to a certain block

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.

virtual int CheMPS2::Tensor::gNKappa ( ) const
pure virtual

Get the number of tensor blocks.

return The number of tensor blocks

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.

+ Here is the caller graph for this function:

virtual double* CheMPS2::Tensor::gStorage ( )
pure virtual

Get the pointer to the storage.

return pointer to the storage

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.

+ Here is the caller graph for this function:

virtual double* CheMPS2::Tensor::gStorage ( const int  N1,
const int  TwoS1,
const int  I1,
const int  N2,
const int  TwoS2,
const int  I2 
)
pure virtual

Get the pointer to the storage of a certain tensor block.

Parameters
N1The left or up particle number sector
TwoS1The left or up spin symmetry sector
I1The left or up irrep sector
N2The right or down particle number sector
TwoS2The right or down spin symmetry sector
I2The right or down irrep sector
Returns
Pointer to the storage of the specified tensor block; NULL means no such block

Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.


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