1#ifndef REAL_GAUNT_TABLE_H_
2#define REAL_GAUNT_TABLE_H_
70 const double&
operator()(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
78 return gaunt_table_.size() * (6 *
sizeof(int) +
sizeof(
double))
101 double gaunt(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
123 bool gaunt_select_l(
const int l1,
const int l2,
const int l3)
const;
126 bool gaunt_select_m(
const int m1,
const int m2,
const int m3)
const {
return m1 + m2 + m3 == 0; }
137 bool is_valid_lm(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
140 double gaunt_lookup(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
143 double real_gaunt_lookup(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
160 std::array<int, 6>
gaunt_key(
const int l1,
const int l2,
const int l3,
const int m1,
const int m2,
const int m3)
const;
163 void arrange(
int& l1,
int& l2,
int& m1,
int& m2)
const;
Table of Gaunt coefficients of real spherical harmonics.
Definition real_gaunt_table.h:25
void build(const int lmax)
Builds the Gaunt table of real spherical harmonics for two-center integrals.
Definition real_gaunt_table.cpp:9
int lmax() const
returns the maximum l (for the first two dimensions; the third dimension is 2*lmax)
Definition real_gaunt_table.h:73
int lmax_
maximum angular momentum of the table (for the first two dimensions)
Definition real_gaunt_table.h:108
size_t memory() const
Returns the amount of heap memory used by this class (in bytes).
Definition real_gaunt_table.h:76
RealGauntTable()
Definition real_gaunt_table.h:105
std::map< std::array< int, 6 >, double > gaunt_table_
Table of standard Gaunt coefficients.
Definition real_gaunt_table.h:117
static RealGauntTable & instance()
Definition real_gaunt_table.h:32
int minus_1_pow(int m) const
returns pow(-1, m)
Definition real_gaunt_table.h:178
bool gaunt_select_m(const int m1, const int m2, const int m3) const
selection rule of standard Gaunt coefficients regarding m1, m2, m3
Definition real_gaunt_table.h:126
double gaunt_lookup(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
Get a Gaunt coefficient by looking up the table.
Definition real_gaunt_table.cpp:181
bool real_gaunt_select_m(const int m1, const int m2, const int m3) const
selection rule of real Gaunt coefficients regarding m1, m2, m3
Definition real_gaunt_table.cpp:173
~RealGauntTable()
Definition real_gaunt_table.h:30
const double & operator()(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
gets the tabulated real Gaunt coefficient
Definition real_gaunt_table.cpp:78
double gaunt(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
Computes the standard Gaunt coefficients.
Definition real_gaunt_table.cpp:121
container::Tensor real_gaunt_table_
table of real Gaunt coefficients
Definition real_gaunt_table.h:120
bool gaunt_select_l(const int l1, const int l2, const int l3) const
selection rule of standard & real Gaunt coefficients regarding l1, l2, l3
Definition real_gaunt_table.cpp:168
double factorial(const int n) const
returns n! as a double
Definition real_gaunt_table.cpp:221
std::array< int, 6 > gaunt_key(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
Symmetry-adapted key for gaunt_table_.
Definition real_gaunt_table.cpp:193
RealGauntTable(RealGauntTable const &)=delete
double real_gaunt_lookup(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
Get a real Gaunt coefficient from the stored Gaunt coefficients.
Definition real_gaunt_table.cpp:87
RealGauntTable & operator=(RealGauntTable const &)=delete
int index_map(int l, int m) const
Returns the linearized index of Y(l,m).
Definition real_gaunt_table.cpp:234
bool is_valid_lm(const int l1, const int l2, const int l3, const int m1, const int m2, const int m3) const
Returns whether the given l & m are valid quantum numbers.
Definition real_gaunt_table.cpp:163
void arrange(int &l1, int &l2, int &m1, int &m2) const
swap (l1,m1) <--> (l2,m2) if l1 < l2; do nothing otherwise
Definition real_gaunt_table.cpp:212
A class for representing the shape of a tensor.
Definition tensor_shape.h:13
A multi-dimensional array of elements of a single data type.
Definition tensor.h:32
int64_t NumElements() const
Get the total number of elements in the tensor.
Definition tensor.cpp:70
@ DT_DOUBLE
Double-precision floating point */.