SyTen

◆ correct_cgc_tensors() [2/2]

template<Rank r>
void syten::correct_cgc_tensors ( Tensor< r > &  in,
bool  recursive = false,
SourceLocation  loc = SourceLocation::current() 
)

Corrects the CGC space by reconstructing it from a fusion tree.

This function iteratively merges legs of the tensor together until it is reduced to a rank-2 tensor. The rank-2 tensor has a well-defined CGC space proportional to the identity matrix. The elements of the CGC block are equalised and the tensor legs un-merged until the original tensor is obtained.

Parameters
in[in,out] Tensor to be corrected. Needs to have at least one incoming leg and one outgoing leg.
recursiveSet to true on recursive calls from within the function
locCallsite identifier

References syten::Tensor< rank >::b(), std::vector< T >::begin(), syten::Tensor< rank >::clear(), correct_cgc_tensors(), syten::Tensor< rank >::dirs, std::vector< T >::end(), syten::Basis::f(), gME(), syten::Tensor< rank >::hasCGC(), Inc, insertIOFullHalf(), logGW(), Out, std::vector< T >::push_back(), syten::Tensor< rank >::size(), std::vector< T >::size(), std::sort(), and SYTEN_ASSERT_MSG.

+ Here is the call graph for this function: