ARTS 2.5.4 (git: 31ce4f0e)
wigner_functions.h File Reference

Wigner symbol interactions. More...

#include "rational.h"
#include <wigner/wigxjpf/inc/wigxjpf.h>
#include <algorithm>
#include <array>

Go to the source code of this file.

Macros

#define DO_FAST_WIGNER   0
 

Functions

std::pair< Rational, Rationalwigner_limits (std::pair< Rational, Rational > a, std::pair< Rational, Rational > b)
 
template<Index pos>
constexpr std::pair< Rational, Rationalwigner3j_limits (const Rational a=0, const Rational b=0, const Rational c=0, const Rational d=0, const Rational e=0)
 
Numeric wigner3j (const Rational j1, const Rational j2, const Rational j3, const Rational m1, const Rational m2, const Rational m3)
 Wigner 3J symbol. More...
 
Numeric wigner6j (const Rational j1, const Rational j2, const Rational j3, const Rational l1, const Rational l2, const Rational l3)
 Wigner 6J symbol. More...
 
Index make_wigner_ready (int largest, int fastest, int size)
 Ready Wigner. More...
 
bool is_wigner_ready (int j)
 Tells if the function can deal with the input integer. More...
 
bool is_wigner3_ready (const Rational &J)
 Tells if the function is ready for Wigner 3J calculations. More...
 
bool is_wigner6_ready (const Rational &J)
 Tells if the function is ready for Wigner 6J calculations. More...
 
template<class ... Integer>
constexpr int temp_init_size (Integer... vals) noexcept
 
Numeric dwigner3j (Index M, Index J1, Index J2, Index J)
 Computes the wigner 3J symbol with floating point precision. More...
 
Numeric dwigner6j (Index A, Index B, Index C, Index D, Index F)
 Computes the wigner 6J symbol with floating point precision. More...
 

Detailed Description

Wigner symbol interactions.

Author
Richard Larsson
Date
2013-06-19

Definition in file wigner_functions.h.

Macro Definition Documentation

◆ DO_FAST_WIGNER

#define DO_FAST_WIGNER   0

Definition at line 41 of file wigner_functions.h.

Function Documentation

◆ dwigner3j()

Numeric dwigner3j ( Index  M,
Index  J1,
Index  J2,
Index  J 
)

Computes the wigner 3J symbol with floating point precision.

 /               \
 |  J1   J2   J  |

output = | | | M -M 0 | \ /

Parameters
MInput as above
J1Input as above
J2Input as above
JInput as above
Returns
Numeric

Definition at line 170 of file wigner_functions.cc.

References abs, M, max, min, and sqrt().

◆ dwigner6j()

Numeric dwigner6j ( Index  A,
Index  B,
Index  C,
Index  D,
Index  F 
)

Computes the wigner 6J symbol with floating point precision.

 /             \
 |  A   B   1  |

output = < > | D C F | \ /

Parameters
AInput as above
BInput as above
CInput as above
DInput as above
FInput as above
Returns
Numeric

Definition at line 214 of file wigner_functions.cc.

References abs.

◆ is_wigner3_ready()

bool is_wigner3_ready ( const Rational J)

Tells if the function is ready for Wigner 3J calculations.

Parameters
[in]JLargest input into a Wigner 3J function call
Returns
true If is_wigner_ready(3J + 1) does
false Otherwise

Definition at line 160 of file wigner_functions.cc.

References is_wigner_ready(), and Rational::toInt().

Referenced by lbl_checkedCalc().

◆ is_wigner6_ready()

bool is_wigner6_ready ( const Rational J)

Tells if the function is ready for Wigner 6J calculations.

Parameters
[in]JLargest input into a Wigner 6J function call
Returns
true If is_wigner_ready(4J + 1)
false Otherwise

Definition at line 165 of file wigner_functions.cc.

References is_wigner_ready(), and Rational::toInt().

◆ is_wigner_ready()

bool is_wigner_ready ( int  j)

Tells if the function can deal with the input integer.

Parameters
[in]j
Returns
true If j is less than max allowed j
false Otherwise

Definition at line 155 of file wigner_functions.cc.

Referenced by is_wigner3_ready(), and is_wigner6_ready().

◆ make_wigner_ready()

Index make_wigner_ready ( int  largest,
int  fastest,
int  size 
)

Ready Wigner.

Parameters
[in]largest
[in]fastest
[in]size[3 or 6]
Returns
largest if successful

Definition at line 120 of file wigner_functions.cc.

Referenced by main(), test_hitran2017(), test_wigner_error(), Wigner3Init(), and Wigner6Init().

◆ temp_init_size()

template<class ... Integer>
constexpr int temp_init_size ( Integer...  vals)
constexprnoexcept

Definition at line 215 of file wigner_functions.h.

References N, and v.

Referenced by Absorption::LineMixing::Makarov2020etal::relaxation_matrix_offdiagonal().

◆ wigner3j()

Numeric wigner3j ( const Rational  j1,
const Rational  j2,
const Rational  j3,
const Rational  m1,
const Rational  m2,
const Rational  m3 
)

Wigner 3J symbol.

Run wigxjpf wig3jj for Rational symbol

/ \

j1 j2 j3
m1 m2 m3

\ /

See for definition: http://dlmf.nist.gov/34.2

Parameters
[in]j1as above
[in]j2as above
[in]j3as above
[in]m1as above
[in]m2as above
[in]m3as above
Returns
Numeric Symbol value

Definition at line 45 of file wigner_functions.cc.

References a, abs, ARTS_USER_ERROR, b, c, d, Constant::e, max, and WIGNER3.

Referenced by Absorption::reduced_rovibrational_dipole(), relaxation_matrix_element(), Absorption::LineMixing::LinearRovibErrorCorrectedSudden::relaxation_matrix_offdiagonal(), Zeeman::Model::Strength(), and test_wigner_error().

◆ wigner3j_limits()

template<Index pos>
constexpr std::pair< Rational, Rational > wigner3j_limits ( const Rational  a = 0,
const Rational  b = 0,
const Rational  c = 0,
const Rational  d = 0,
const Rational  e = 0 
)
constexpr

Return the limits where a wigner3j symbol can be non-zero

The values a-e are as in a call to wigner3j with pos determining the offset. The output is the range of valid values at the offset position given the relevant triangle equaility |x - y| <= z <= x + y and that the m1 + m2 = -m3 condition for the lower row values

Positional information: pos == 1: wigner3j(X, a, b, c, d, e): b <= X + a -> X <= b - a, and |X - a| <= b -> a - b <= X <= a + b pos == 2: wigner3j(a, X, b, c, d, e): b <= a + X -> X <= b - a, and |a - X| <= b -> a + b <= X <= a - b pos == 3: wigner3j(a, b, X, c, d, e): |a - b| <= X <= a + b -> X <= b - a pos == 4: wigner3j(a, b, c, X, d, e): -|a| <= X <= |a|, and X + d = - e -> X = - e - d pos == 5: wigner3j(a, b, c, d, X, e): -|b| <= X <= |b|, and d + X = - e -> X = - e - d pos == 6: wigner3j(a, b, c, d, e, X): -|c| <= X <= |c|, and d + e = - X -> X = - e - d

If there is no valid range, the function returns {RATIONAL_UNDEFINED, RATIONAL_UNDEFINED}

Parameters
[in]posPosition of value
[in]aAn input
[in]bAn input
[in]cAn input
[in]dAn input
[in]eAn input
Returns
A valid range where both start and end are valid, or invalid numbers

Definition at line 98 of file wigner_functions.h.

References a, abs, b, c, d, Constant::e, RATIONAL_UNDEFINED, and swap().

◆ wigner6j()

Numeric wigner6j ( const Rational  j1,
const Rational  j2,
const Rational  j3,
const Rational  l1,
const Rational  l2,
const Rational  l3 
)

Wigner 6J symbol.

Run wigxjpf wig6jj for Rational symbol

/ \ | j1 j2 j3 | < > | l1 l2 l3 | \ /

See for definition: http://dlmf.nist.gov/34.4

Parameters
[in]j1as above
[in]j2as above
[in]j3as above
[in]l1as above
[in]l2as above
[in]l3as above
Returns
Numeric Symbol value

Definition at line 77 of file wigner_functions.cc.

References a, abs, ARTS_USER_ERROR, b, c, d, Constant::e, max, and WIGNER6.

Referenced by Absorption::LineMixing::Makarov2020etal::reduced_dipole(), Absorption::reduced_magnetic_quadrapole(), relaxation_matrix_element(), and Absorption::LineMixing::LinearRovibErrorCorrectedSudden::relaxation_matrix_offdiagonal().

◆ wigner_limits()

std::pair< Rational, Rational > wigner_limits ( std::pair< Rational, Rational a,
std::pair< Rational, Rational b 
)

Refine limits from multiple inputs

Parameters
[in]aA limit
[in]aAnother limit
Returns
[low, high] for valid ranges of numbers or two undefined rationals

Definition at line 107 of file wigner_functions.cc.

References a, b, max, min, and RATIONAL_UNDEFINED.

Referenced by Absorption::LineMixing::Makarov2020etal::relaxation_matrix_offdiagonal().