ampsci
High-precision calculations for one- and two-valence atomic systems
Loading...
Searching...
No Matches
Angular::CkTable

Lookup table for C^k and 3j symbols (special m=1/2, q=0 case) More...

#include <CkTable.hpp>

Public Member Functions

 CkTable (const int in_max_twoj=0)
 Calculates and stored all Ck/3j symbols up to given maximum 2j.
 
void fill (const int in_max_twoj)
 Extends existing look-up table to new twoj.
 
double get_Ckab_mutable (int k, int ka, int kb)
 Ckab. mutable: will calculate if needed. Not thread safe.
 
double get_tildeCkab_mutable (int k, int ka, int kb)
 tildeCkab. mutable: will calculate if needed. Not thread safe
 
double get_3jkab_mutable (int k, int ka, int kb)
 special 3j(k, ka, kb). mutable: will calculate if needed. Not thread safe
 
double get_Ckab (int k, int ka, int kb) const
 Ckab. Undefined if k, ka, or kb are out-of-bounds [check with max_tj()].
 
double get_tildeCkab (int k, int ka, int kb) const
 tildeCkab. Undefined if k, ka, or kb are out-of-bounds
 
double get_3jkab (int k, int ka, int kb) const
 special 3j(k, ka, kb). Undefined if k, ka, or kb are out-of-bounds
 
double operator() (int k, int ka, int kb) const
 Operator overload: returns Ckab.
 
double get_Lambdakab (int k, int ka, int kb) const
 Lambda^k_ij := 3js((ji,jj,k),(-1/2,1/2,0))^2 * parity(li+lj+k)
 
int max_tj () const
 Maximum value for 2j currently stored in tables.
 
int max_k () const
 Maximum value for k currently stored in tables.
 

Detailed Description

Lookup table for C^k and 3j symbols (special m=1/2, q=0 case)

  • Builds 3j symbol lookup table for given maximum k and maximum j (2j)
  • 3j symbols, special case: (ja jb k \ -1/2, 1/2, 0)
  • Ckab : \(C^k_{ab} = \langle k_a||C^k||k_b \rangle\) [symmetric up to +/- sign]
  • TildeCkab : \(\widetilde C^k_{ab} = (-1)^{ja+1/2} C^k_{ab}\) [symmetric]
  • Slightly faster than calculating on-the-fly, but adds some overhead
    Construction
  • Needs maximum two*j values. Will build look-up tables for all possible symbols.
    Mutable versions
  • Some functions come with '_mutable' versions
  • These will calculate (+ store) values if they don't exist yet
  • '_mutable' versions are NOT thread safe (non-mutable are)
  • The non-mutable versions: must not be called if symbol hasn't been calculated. This is undefined behaviour
  • You can check which symbols exist by calling max_tj() and max_k()
  • All "lower" symbols are calculated [max_tj, max_k defined all]
    Usage
  • Note: Functions take k and kappa_a, kappa_b as input!

Constructor & Destructor Documentation

◆ CkTable()

Angular::CkTable::CkTable ( const int  in_max_twoj = 0)
inline

Calculates and stored all Ck/3j symbols up to given maximum 2j.

Member Function Documentation

◆ fill()

void Angular::CkTable::fill ( const int  in_max_twoj)

Extends existing look-up table to new twoj.

nb: called on construction automatically, you only need to call this if you need to extend the table after original construction (rare)

◆ get_Ckab_mutable()

double Angular::CkTable::get_Ckab_mutable ( int  k,
int  ka,
int  kb 
)

Ckab. mutable: will calculate if needed. Not thread safe.

◆ get_tildeCkab_mutable()

double Angular::CkTable::get_tildeCkab_mutable ( int  k,
int  ka,
int  kb 
)

tildeCkab. mutable: will calculate if needed. Not thread safe

◆ get_3jkab_mutable()

double Angular::CkTable::get_3jkab_mutable ( int  k,
int  ka,
int  kb 
)

special 3j(k, ka, kb). mutable: will calculate if needed. Not thread safe

◆ get_Ckab()

double Angular::CkTable::get_Ckab ( int  k,
int  ka,
int  kb 
) const

Ckab. Undefined if k, ka, or kb are out-of-bounds [check with max_tj()].

◆ get_tildeCkab()

double Angular::CkTable::get_tildeCkab ( int  k,
int  ka,
int  kb 
) const

tildeCkab. Undefined if k, ka, or kb are out-of-bounds

◆ get_3jkab()

double Angular::CkTable::get_3jkab ( int  k,
int  ka,
int  kb 
) const

special 3j(k, ka, kb). Undefined if k, ka, or kb are out-of-bounds

◆ operator()()

double Angular::CkTable::operator() ( int  k,
int  ka,
int  kb 
) const
inline

Operator overload: returns Ckab.

◆ get_Lambdakab()

double Angular::CkTable::get_Lambdakab ( int  k,
int  ka,
int  kb 
) const

Lambda^k_ij := 3js((ji,jj,k),(-1/2,1/2,0))^2 * parity(li+lj+k)

◆ max_tj()

int Angular::CkTable::max_tj ( ) const
inline

Maximum value for 2j currently stored in tables.

◆ max_k()

int Angular::CkTable::max_k ( ) const
inline

Maximum value for k currently stored in tables.


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