Skip to content

Class TempLat::SU2Dotter

template <typename R, typename T>

ClassList > TempLat > SU2Dotter

Lie-algebra inner product <A,B> = sum_{a=1,2,3} A_a B_a of two SU(2)-valued expressions, returned as a scalar. More...

  • #include <su2dotter.h>

Inherits the following classes: TempLat::BinaryOperator

Public Functions

Type Name
SU2Dotter (const R & pR, const T & pT)
DEVICE_INLINE_FUNCTION auto eval (const IDX &... idx) const
virtual std::string operatorString () override const
Override this method in your derived class, to have an easy implementation of your toString method.

Public Functions inherited from TempLat::BinaryOperator

See TempLat::BinaryOperator

Type Name
BinaryOperator (const R & pR, const T & pT)
device::Idx confirmGhostsUpToDate () const
void confirmSpace (const LayoutStruct< NDim > & newLayout, const SpaceStateType & spaceType) const
void doWeNeedGhosts () const
auto getDx () const
auto getKIR () const
auto getToolBox () const
virtual std::string operatorString () const = 0
Override this method in your derived class, to have an easy implementation of your toString method.
void postGet ()
void preGet ()
std::string toString () const
If your descending class implements operatorString() and your operator is of the type "a OP b" (where OP is * or whatever), this toString method does all the work for you.

Public Static Functions inherited from TempLat::BinaryOperator

See TempLat::BinaryOperator

Type Name
consteval size_t getNDim ()

Protected Attributes inherited from TempLat::BinaryOperator

See TempLat::BinaryOperator

Type Name
R mR
T mT

Detailed Description

It evaluates each operand once through the FUSED eval path (one device::array<.,4> per operand) rather than contracting per component as sum_a A.SU2Get(a) * B.SU2Get(a). That distinction matters when an operand is a deep SU(2) expression - e.g. the clover/non-abelian magnetic field B4NA: its per-component SU2Get(a) expansion is the exponential decomposition of a product of plaquettes, and building it three times (a = 1,2,3) yields an expression object that overflows the host stack during construction. Evaluating each operand once keeps the object small and linear in the chain length.

Being scalar-valued, it plugs straight into reductions such as average(). Component 0 (the SU(2) identity/trace part) is intentionally dropped, matching the Lie-algebra convention of SU2LieAlgebraField.

Unit test: ctest -R test-su2dotter

Public Functions Documentation

function SU2Dotter

inline TempLat::SU2Dotter::SU2Dotter (
    const R & pR,
    const T & pT
) 

function eval

template<typename... IDX>
inline DEVICE_INLINE_FUNCTION auto TempLat::SU2Dotter::eval (
    const IDX &... idx
) const

function operatorString

Override this method in your derived class, to have an easy implementation of your toString method.

inline virtual std::string TempLat::SU2Dotter::operatorString () override const

Implements TempLat::BinaryOperator::operatorString



The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/lattice/algebra/su2algebra/su2dotter.h