CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
Tensor

Detailed Description

Data structure representing tensors.

Classes

class  CASM::Tensor< T >
 
class  CASM::ReturnTensor< T >
 
class  CASM::TensorBasis< T >
 

Functions

template<class T >
Tensor< T > CASM::operator* (const T &LHS, const Tensor< T > &RHS)
 
template<class T >
Tensor< T > CASM::operator* (const SymOp &LHS, const Tensor< T > &RHS)
 
template<class T >
std::ostream & CASM::operator<< (std::ostream &stream, const Tensor< T > &RHS)
 
template<class T >
std::istream & CASM::operator>> (std::istream &stream, Tensor< T > &RHS)
 
template<class T >
CASM::dot (const Tensor< T > &LHS, const Tensor< T > &RHS)
 
template<class T >
CASM::norm (const Tensor< T > &ttens)
 
void CASM::Tensor< T >::swap (Tensor &RHS)
 
template<int dim1, int dim2, int flag1>
Tensor< T > & CASM::Tensor< T >::operator= (const Eigen::Matrix< T, dim1, dim2, flag1 > &LHS)
 
void CASM::Tensor< T >::redefine (Array< Index > _Ndim)
 
void CASM::Tensor< T >::redefine (Array< Index > _Ndim, T fill_val)
 
Tensor & CASM::Tensor< T >::dim_permute (const Array< Index > &iperm)
 
Tensor & CASM::Tensor< T >::dim_permute (const Permutation &perm)
 
Tensor & CASM::Tensor< T >::dim_ipermute (const Array< Index > &perm)
 
Tensor & CASM::Tensor< T >::dim_ipermute (const Permutation &perm)
 
Tensor & CASM::Tensor< T >::dim_unpermute ()
 
bool CASM::Tensor< T >::next_permute ()
 
void CASM::Tensor< T >::reset_idim ()
 
void CASM::Tensor< T >::permute_symmetrize ()
 Symmetrize tensor with respect to index permutation. More...
 
void CASM::Tensor< T >::permute_symmetrize (const Array< Array< Index > > &unique_dim)
 
Counter< Array< Index > > CASM::Tensor< T >::element_counter () const
 
const Array< Index > & CASM::Tensor< T >::ind_max () const
 
const Array< Index > & CASM::Tensor< T >::dim () const
 
Index CASM::Tensor< T >::dim (Index i) const
 
const Array< Index > & CASM::Tensor< T >::mult_array () const
 
Index CASM::Tensor< T >::rank () const
 
const T & CASM::Tensor< T >::get (const Array< Index > &inds) const
 
T & CASM::Tensor< T >::at (const Array< Index > &inds)
 
const T & CASM::Tensor< T >::at (const Array< Index > &inds) const
 
T & CASM::Tensor< T >::operator() (const Array< Index > &inds)
 
const T & CASM::Tensor< T >::operator() (const Array< Index > &inds) const
 
T & CASM::Tensor< T >::operator() (Index i, Index j)
 
const T & CASM::Tensor< T >::operator() (Index i, Index j) const
 
Tensor & CASM::Tensor< T >::operator+= (const Tensor &RHS)
 
Tensor & CASM::Tensor< T >::operator-= (const Tensor &RHS)
 
Tensor & CASM::Tensor< T >::operator*= (T RHS)
 
Tensor & CASM::Tensor< T >::operator/= (T RHS)
 
ReturnTensor< T > CASM::Tensor< T >::operator- ()
 
ReturnTensor< T > CASM::Tensor< T >::operator+ (const Tensor &RHS)
 
ReturnTensor< T > CASM::Tensor< T >::operator- (const Tensor &RHS)
 
CASM::Tensor< T >::scalar_prod (const Tensor &RHS) const
 
ReturnTensor< T > CASM::Tensor< T >::tensor_prod (const Tensor &RHS)
 
Tensor & CASM::Tensor< T >::normalize ()
 
static ReturnTensor< T > CASM::Tensor< T >::identity (Index trank, Index tdim)
 
Tensor & CASM::Tensor< T >::transform (const SymOp &op, Array< SymGroupRepID > rep_IDs)
 
Tensor & CASM::Tensor< T >::symmetrize_index (const SymOp &op, Array< SymGroupRepID > rep_IDs, Array< Index > inner_ind)
 
Tensor & CASM::Tensor< T >::apply_sym (const SymOp &op)
 
void CASM::Tensor< T >::read (std::istream &stream)
 
Tensor & CASM::Tensor< T >::transform (const Eigen::MatrixXd &op)
 
Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
CASM::Tensor< T >::convert_to_Eigen () const
 
void CASM::TensorBasis< T >::generate_basis (Index Nrank, const SymGroup &sym_group)
 
void CASM::TensorBasis< T >::generate_basis (Index Nrank, const SymGroup &sym_group, Index Rep_ID)
 
void CASM::TensorBasis< T >::generate_basis (Index Nrank, const SymGroup &sym_group, const SymGroupRep &perm_group)
 
void CASM::TensorBasis< T >::make_orthogonal_to (const TensorBasis &ortho_basis)
 
TensorBasis & CASM::TensorBasis< T >::apply_sym (const SymOp &op)
 
void CASM::TensorBasis< T >::normalize ()
 
void CASM::TensorBasis< T >::idealize ()
 
bool CASM::TensorBasis< T >::read (std::istream &stream)
 

Function Documentation

template<class T >
Tensor< T > & CASM::Tensor< T >::apply_sym ( const SymOp op)

Definition at line 823 of file Tensor.hh.

template<class T >
TensorBasis< T > & CASM::TensorBasis< T >::apply_sym ( const SymOp op)

Definition at line 1120 of file Tensor.hh.

template<class T >
T & CASM::Tensor< T >::at ( const Array< Index > &  inds)

Definition at line 539 of file Tensor.hh.

template<class T >
const T & CASM::Tensor< T >::at ( const Array< Index > &  inds) const

Definition at line 550 of file Tensor.hh.

template<class T >
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > CASM::Tensor< T >::convert_to_Eigen ( ) const

Definition at line 928 of file Tensor.hh.

template<class T >
const Array< Index > & CASM::Tensor< T >::dim ( ) const

Definition at line 500 of file Tensor.hh.

template<class T >
Index CASM::Tensor< T >::dim ( Index  i) const

Definition at line 507 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::dim_ipermute ( const Array< Index > &  perm)

Definition at line 344 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::dim_ipermute ( const Permutation perm)

Definition at line 360 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::dim_permute ( const Array< Index > &  iperm)

Definition at line 321 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::dim_permute ( const Permutation perm)

Definition at line 338 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::dim_unpermute ( )

Definition at line 366 of file Tensor.hh.

template<class T >
T CASM::dot ( const Tensor< T > &  LHS,
const Tensor< T > &  RHS 
)

Definition at line 961 of file Tensor.hh.

template<class T >
Counter< Array< Index > > CASM::Tensor< T >::element_counter ( ) const

Definition at line 486 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::generate_basis ( Index  Nrank,
const SymGroup sym_group 
)

Definition at line 1026 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::generate_basis ( Index  Nrank,
const SymGroup sym_group,
Index  Rep_ID 
)

Definition at line 1050 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::generate_basis ( Index  Nrank,
const SymGroup sym_group,
const SymGroupRep perm_group 
)

Definition at line 1079 of file Tensor.hh.

template<class T >
const T & CASM::Tensor< T >::get ( const Array< Index > &  inds) const

Definition at line 528 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::idealize ( )

Definition at line 1139 of file Tensor.hh.

template<class T >
ReturnTensor< T > CASM::Tensor< T >::identity ( Index  trank,
Index  tdim 
)
static

Definition at line 762 of file Tensor.hh.

template<class T >
const Array< Index > & CASM::Tensor< T >::ind_max ( ) const

Definition at line 493 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::make_orthogonal_to ( const TensorBasis< T > &  ortho_basis)

Definition at line 1107 of file Tensor.hh.

template<class T >
const Array< Index > & CASM::Tensor< T >::mult_array ( ) const

Definition at line 514 of file Tensor.hh.

template<class T >
bool CASM::Tensor< T >::next_permute ( )

Definition at line 379 of file Tensor.hh.

template<class T >
T CASM::norm ( const Tensor< T > &  ttens)

Definition at line 968 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::normalize ( )

Definition at line 754 of file Tensor.hh.

template<class T >
void CASM::TensorBasis< T >::normalize ( )

Definition at line 1130 of file Tensor.hh.

template<class T >
T & CASM::Tensor< T >::operator() ( const Array< Index > &  inds)

Definition at line 561 of file Tensor.hh.

template<class T >
const T & CASM::Tensor< T >::operator() ( const Array< Index > &  inds) const

Definition at line 572 of file Tensor.hh.

template<class T >
T & CASM::Tensor< T >::operator() ( Index  i,
Index  j 
)

Definition at line 582 of file Tensor.hh.

template<class T >
const T & CASM::Tensor< T >::operator() ( Index  i,
Index  j 
) const

Definition at line 589 of file Tensor.hh.

template<class T >
Tensor< T > CASM::operator* ( const T &  LHS,
const Tensor< T > &  RHS 
)

Definition at line 947 of file Tensor.hh.

template<class T >
Tensor< T > CASM::operator* ( const SymOp &  LHS,
const Tensor< T > &  RHS 
)

Definition at line 954 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::operator*= ( RHS)

Definition at line 649 of file Tensor.hh.

template<class T >
ReturnTensor< T > CASM::Tensor< T >::operator+ ( const Tensor< T > &  RHS)

Definition at line 681 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::operator+= ( const Tensor< T > &  RHS)

Definition at line 596 of file Tensor.hh.

template<class T >
ReturnTensor< T > CASM::Tensor< T >::operator- ( )

Definition at line 671 of file Tensor.hh.

template<class T >
ReturnTensor< T > CASM::Tensor< T >::operator- ( const Tensor< T > &  RHS)

Definition at line 688 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::operator-= ( const Tensor< T > &  RHS)

Definition at line 623 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::operator/= ( RHS)

Definition at line 660 of file Tensor.hh.

template<class T >
std::ostream & CASM::operator<< ( std::ostream &  stream,
const Tensor< T > &  RHS 
)

Definition at line 976 of file Tensor.hh.

template<class T>
template<int dim1, int dim2, int flag1>
Tensor<T>& CASM::Tensor< T >::operator= ( const Eigen::Matrix< T, dim1, dim2, flag1 > &  LHS)

Definition at line 264 of file Tensor.hh.

template<class T >
std::istream & CASM::operator>> ( std::istream &  stream,
Tensor< T > &  RHS 
)

Definition at line 1016 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::permute_symmetrize ( )

Symmetrize tensor with respect to index permutation.

Definition at line 444 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::permute_symmetrize ( const Array< Array< Index > > &  unique_dim)

Symmetrize tensor with respect to index permutation if not all dimensions are quivalent unique_dim lists each subset of indices which are mutually equivalent

Definition at line 459 of file Tensor.hh.

template<class T >
Index CASM::Tensor< T >::rank ( ) const

Definition at line 521 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::read ( std::istream &  stream)

Definition at line 853 of file Tensor.hh.

template<class T >
bool CASM::TensorBasis< T >::read ( std::istream &  stream)

Definition at line 1151 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::redefine ( Array< Index _Ndim)

Definition at line 285 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::redefine ( Array< Index _Ndim,
fill_val 
)

Definition at line 303 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::reset_idim ( )

Definition at line 424 of file Tensor.hh.

template<class T >
T CASM::Tensor< T >::scalar_prod ( const Tensor< T > &  RHS) const

Definition at line 695 of file Tensor.hh.

template<class T >
void CASM::Tensor< T >::swap ( Tensor< T > &  RHS)

Definition at line 250 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::symmetrize_index ( const SymOp op,
Array< SymGroupRepID rep_IDs,
Array< Index inner_ind 
)

Definition at line 802 of file Tensor.hh.

template<class T >
ReturnTensor< T > CASM::Tensor< T >::tensor_prod ( const Tensor< T > &  RHS)

Definition at line 724 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::transform ( const Eigen::MatrixXd &  mat)

A temporary hack for multiplying tensors – This only works for a rank 2 tensor of dimension 3x3 multiplying a Vector3. It returns a rank 2 tensor of dimension 3x1

Definition at line 898 of file Tensor.hh.

template<class T >
Tensor< T > & CASM::Tensor< T >::transform ( const SymOp op,
Array< SymGroupRepID rep_IDs 
)

Definition at line 772 of file Tensor.hh.