SpinParser  1.0
Public Types | Public Member Functions | Public Attributes | List of all members
TRIVertexTwoParticle Struct Reference

Two-particle vertex implementation for time reversal invariant models. More...

#include <TRIVertexTwoParticle.hpp>

Public Types

enum  FrequencyChannel {
  FrequencyChannel::S, FrequencyChannel::T, FrequencyChannel::U, FrequencyChannel::All,
  FrequencyChannel::None
}
 Indicator for frequency channels that exactly lie on frequency mesh points.
More...
 

Public Member Functions

 TRIVertexTwoParticle ()
 Construct a new TRIVertexTwoParticle object and initialize all entries to zero.
 
 ~TRIVertexTwoParticle ()
 Destroy the TRIVertexTwoParticle object.
 
void expandIterator (int iterator, LatticeIterator &i1, float &s, float &t, float &u, SpinComponent &s1, SpinComponent &s2) const
 Expand a linear iterator in the range [0,size) that iterates over all vertex entries. More...
 
void expandIterator (int iterator, float &s, float &t, float &u) const
 Expand a linear iterator in the range [0,sizeFrequency) that iterates over all paramtetrized frequency values. More...
 
float & getValueRef (const int iterator) const
 Directly access a vertex value via a linear iterator in the range [0,size). More...
 
float getValue (LatticeIterator i1, LatticeIterator i2, float s, float t, float u, SpinComponent s1, SpinComponent s2, const FrequencyChannel channel) const
 Access vertex value at arbitrary lattice sites, frequencies, and spin components. More...
 
template<int n>
float getValue (LatticeIterator i1, LatticeIterator i2, SpinComponent s1, SpinComponent s2, const TRIVertexTwoParticleAccessBuffer< n > &accessBuffer) const
 Access vertex value at arbitrary lattice sites and spin components via a given access buffer. More...
 
template<int n>
float getValueLocal (SpinComponent s1, SpinComponent s2, const TRIVertexTwoParticleAccessBuffer< n > &accessBuffer) const
 Access vertex value locally at arbitrary spin components via a given access buffer. More...
 
template<int n>
void getValueSuperbundle (const TRIVertexTwoParticleAccessBuffer< n > &accessBuffer, ValueSuperbundle< float, 16 > &superbundle) const
 Bundled vertex access on all lattice sites and spin components simultaneously via a given access buffer. More...
 
TRIVertexTwoParticleAccessBuffer< 4 > generateAccessBuffer (float s, float t, float u, const FrequencyChannel channel) const
 Generate an access buffer for a set of frequencies where one of them (specified by channel) exactly lies on the frequency mesh. More...
 
TRIVertexTwoParticleAccessBuffer< 8 > generateAccessBuffer (float s, float t, float u) const
 Generate an access buffer for an arbitrary set of frequencies. More...
 
float _directAccessMapFrequencyExchange (const int siteOffset, const int sOffset, const int tOffset, const int uOffset, const SpinComponent s1, const SpinComponent s2) const
 Directly access a vertex via given spin components, frequency, and site offsets, where sOffset may be lesser than uOffset. More...
 
float _directAccess (const int siteOffset, const int sOffset, const int tOffset, const int uOffset, const SpinComponent s1, const SpinComponent s2) const
 Directly access a vertex via given spin components, frequency, and site offsets, where sOffset >= uOffset. More...
 
template<int n>
void _generateAccessBufferOffsetMapFrequencyExchange (const int sOffset, const int tOffset, const int uOffset, const int abIndex, TRIVertexTwoParticleAccessBuffer< n > &ab) const
 Calculate the total memory offset from given frequency offsets, where sOffset may be lesser than uOffset. Write the result to the specified entry in an access buffer. More...
 
float _zeta (const int s1) const
 Helper function for vertex symmetries. Returns -1 if the argument is spin-like and +1 if it is density-like. More...
 

Public Attributes

int size
 Size of the vertex (number of elements).
 
int sizeFrequency
 Size of the vertex in the frequency subspace (number of elements).
 
float * _data
 Vertex data.
 
int _memoryStep [4]
 Memory stride width.
 

Detailed Description

Two-particle vertex implementation for time reversal invariant models.

Member Enumeration Documentation

◆ FrequencyChannel

Indicator for frequency channels that exactly lie on frequency mesh points.

Enumerator

s-channel.

t-channel.

u-channel.

All 

All channels.

None 

No channel.

Member Function Documentation

◆ _directAccess()

float TRIVertexTwoParticle::_directAccess ( const int  siteOffset,
const int  sOffset,
const int  tOffset,
const int  uOffset,
const SpinComponent  s1,
const SpinComponent  s2 
) const
inline

Directly access a vertex via given spin components, frequency, and site offsets, where sOffset >= uOffset.

Parameters
siteOffsetLattice site offset (number of elements).
sOffsetFirst frequency offset (number of elements).
tOffsetSecond frequency offset (number of elements).
uOffsetThird frequency offset (number of elements).
s1First vertex channel.
s2Second vertex channel.
Returns
float Vertex value.

◆ _directAccessMapFrequencyExchange()

float TRIVertexTwoParticle::_directAccessMapFrequencyExchange ( const int  siteOffset,
const int  sOffset,
const int  tOffset,
const int  uOffset,
const SpinComponent  s1,
const SpinComponent  s2 
) const
inline

Directly access a vertex via given spin components, frequency, and site offsets, where sOffset may be lesser than uOffset.

Parameters
siteOffsetLattice site offset (number of elements).
sOffsetFirst frequency offset (number of elements).
tOffsetSecond frequency offset (number of elements).
uOffsetThird frequency offset (number of elements).
s1First vertex channel.
s2Second vertex channel.
Returns
float Vertex value.

◆ _generateAccessBufferOffsetMapFrequencyExchange()

template<int n>
void TRIVertexTwoParticle::_generateAccessBufferOffsetMapFrequencyExchange ( const int  sOffset,
const int  tOffset,
const int  uOffset,
const int  abIndex,
TRIVertexTwoParticleAccessBuffer< n > &  ab 
) const
inline

Calculate the total memory offset from given frequency offsets, where sOffset may be lesser than uOffset. Write the result to the specified entry in an access buffer.

Template Parameters
nNumber of support sites in the access buffer.
Parameters
[in]sOffsetFirst frequency offset (number of elements).
[in]tOffsetSecond frequency offset (number of elements).
[in]uOffsetThird frequency offset (number of elements).
[in]abIndexIndex of the access buffer entry to write.
abAccess buffer.

◆ _zeta()

float TRIVertexTwoParticle::_zeta ( const int  s1) const
inline

Helper function for vertex symmetries. Returns -1 if the argument is spin-like and +1 if it is density-like.

Parameters
s1Spin argument.
Returns
float Function value.

◆ expandIterator() [1/2]

void TRIVertexTwoParticle::expandIterator ( int  iterator,
float &  s,
float &  t,
float &  u 
) const
inline

Expand a linear iterator in the range [0,sizeFrequency) that iterates over all paramtetrized frequency values.

Parameters
[in]iteratorLinear iterator.
[out]sFirst frequency argument.
[out]tSecond frequency argument.
[out]uThird frequency argument.

◆ expandIterator() [2/2]

void TRIVertexTwoParticle::expandIterator ( int  iterator,
LatticeIterator i1,
float &  s,
float &  t,
float &  u,
SpinComponent s1,
SpinComponent s2 
) const
inline

Expand a linear iterator in the range [0,size) that iterates over all vertex entries.

Parameters
[in]iteratorLinear iterator.
[out]i1Lattice site iterator.
[out]sFirst frequency argument.
[out]tSecond frequency argument.
[out]uThird frequency argument.
[out]s1First vertex channel.
[out]s2Second vertex channel.

◆ generateAccessBuffer() [1/2]

TRIVertexTwoParticleAccessBuffer<8> TRIVertexTwoParticle::generateAccessBuffer ( float  s,
float  t,
float  u 
) const
inline

Generate an access buffer for an arbitrary set of frequencies.

Parameters
sFirst frequency argument.
tSecond frequency argument.
uThird frequency argument.
Returns
TRIVertexTwoParticleAccessBuffer<8> Access buffer.

◆ generateAccessBuffer() [2/2]

TRIVertexTwoParticleAccessBuffer<4> TRIVertexTwoParticle::generateAccessBuffer ( float  s,
float  t,
float  u,
const FrequencyChannel  channel 
) const
inline

Generate an access buffer for a set of frequencies where one of them (specified by channel) exactly lies on the frequency mesh.

Parameters
sFirst frequency argument.
tSecond frequency argument.
uThird frequency argument.
channelFrequency channel.
Returns
TRIVertexTwoParticleAccessBuffer<4> Access buffer.

◆ getValue() [1/2]

float TRIVertexTwoParticle::getValue ( LatticeIterator  i1,
LatticeIterator  i2,
float  s,
float  t,
float  u,
SpinComponent  s1,
SpinComponent  s2,
const FrequencyChannel  channel 
) const
inline

Access vertex value at arbitrary lattice sites, frequencies, and spin components.

Parameters
i1First lattice site argument.
i2Second lattice site argument.
sFirst frequency argument.
tSecond frequency argument.
uThird frequency argument.
s1First vertex channel.
s2Second vertex channel.
channelFrequency channel.
Returns
float Vertex value.

◆ getValue() [2/2]

template<int n>
float TRIVertexTwoParticle::getValue ( LatticeIterator  i1,
LatticeIterator  i2,
SpinComponent  s1,
SpinComponent  s2,
const TRIVertexTwoParticleAccessBuffer< n > &  accessBuffer 
) const
inline

Access vertex value at arbitrary lattice sites and spin components via a given access buffer.

Template Parameters
nNumber of support sites in the access buffer.
Parameters
i1First lattice site argument.
i2Second lattice site argument.
s1First vertex channel.
s2Second vertex channel.
accessBufferAccess buffer.
Returns
float Vertex value.

◆ getValueLocal()

template<int n>
float TRIVertexTwoParticle::getValueLocal ( SpinComponent  s1,
SpinComponent  s2,
const TRIVertexTwoParticleAccessBuffer< n > &  accessBuffer 
) const
inline

Access vertex value locally at arbitrary spin components via a given access buffer.

Template Parameters
nNumber of support sites in the access buffer.
Parameters
s1First vertex channel.
s2Second vertex channel.
accessBufferAccess buffer.
Returns
float Vertex value.

◆ getValueRef()

float& TRIVertexTwoParticle::getValueRef ( const int  iterator) const
inline

Directly access a vertex value via a linear iterator in the range [0,size).

Parameters
iteratorLinear iterator.
Returns
float& Vertex value.

◆ getValueSuperbundle()

template<int n>
void TRIVertexTwoParticle::getValueSuperbundle ( const TRIVertexTwoParticleAccessBuffer< n > &  accessBuffer,
ValueSuperbundle< float, 16 > &  superbundle 
) const
inline

Bundled vertex access on all lattice sites and spin components simultaneously via a given access buffer.

Template Parameters
nNumber of support sites in the access buffer.
Parameters
[in]accessBufferAccess buffer.
[out]superbundleVertex value bundle.

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