Xped
Loading...
Searching...
No Matches
U0.hpp
Go to the documentation of this file.
1#ifndef U0_H_
2#define U0_H_
3
5#include <cstddef>
7
8#include "Xped/Util/Mpi.hpp"
9
13
14namespace Xped::Sym {
15
16template <typename Scalar_>
17struct U0;
18
19template <typename Scalar__>
20struct SymTraits<U0<Scalar__>>
21{
22 constexpr static int Nq = 0;
24 typedef Scalar__ Scalar;
25};
26
33template <typename Scalar_ = double>
34struct U0 : SymBase<U0<Scalar_>>
35{
36 typedef Scalar_ Scalar;
38
39 U0(){};
40
41 static std::string name() { return "noSymmetry"; }
42
43 static constexpr std::size_t Nq = 0;
44
45 static constexpr std::array<bool, Nq> HAS_MULTIPLICITIES = {};
46 static constexpr std::array<bool, Nq> NON_ABELIAN = {};
47 static constexpr std::array<bool, Nq> ABELIAN = {};
48 static constexpr std::array<bool, Nq> IS_TRIVIAL = {};
49 static constexpr std::array<bool, Nq> IS_MODULAR = {};
50 static constexpr std::array<bool, Nq> IS_FERMIONIC = {};
51 static constexpr std::array<bool, Nq> IS_BOSONIC = {};
52 static constexpr std::array<bool, Nq> IS_SPIN = {};
53 static constexpr std::array<int, Nq> MOD_N = {};
54
55 static constexpr bool ANY_HAS_MULTIPLICITIES = false;
56 static constexpr bool ANY_NON_ABELIAN = false;
57 static constexpr bool ANY_ABELIAN = true;
58 static constexpr bool ANY_IS_TRIVIAL = true;
59 static constexpr bool ANY_IS_MODULAR = false;
60 static constexpr bool ANY_IS_FERMIONIC = false;
61 static constexpr bool ANY_IS_BOSONIC = false;
62 static constexpr bool ANY_IS_SPIN = false;
63
64 static constexpr bool ALL_HAS_MULTIPLICITIES = false;
65 static constexpr bool ALL_NON_ABELIAN = false;
66 static constexpr bool ALL_ABELIAN = true;
67 static constexpr bool ALL_IS_TRIVIAL = true;
68 static constexpr bool ALL_IS_MODULAR = false;
69 static constexpr bool ALL_IS_FERMIONIC = false;
70 static constexpr bool ALL_IS_BOSONIC = false;
71 static constexpr bool ALL_IS_SPIN = false;
72
73 static constexpr bool IS_CHARGE_SU2() { return false; }
74 static constexpr bool IS_SPIN_SU2() { return false; }
75
76 static constexpr bool IS_SPIN_U1() { return false; }
77
78 static constexpr bool NO_SPIN_SYM() { return true; }
79 static constexpr bool NO_CHARGE_SYM() { return true; }
80
81 inline static constexpr std::array<KIND, Nq> kind() { return {}; }
82
83 inline static constexpr qType qvacuum() { return {}; }
84 inline static constexpr std::array<qType, 1> lowest_qs() { return std::array<qType, 1>{{qarray<0>(std::array<int, 0>{{}})}}; }
85
86 inline static qType conj(const qType&) { return {}; }
87 inline static int degeneracy(const qType&) { return Scalar(1); }
88
89 inline static qType random_q() { return {}; }
90
91 inline static std::vector<qType> basis_combine(const qType&, const qType&) { return {{}}; }
92
93 static std::size_t multiplicity(const qType&, const qType&, const qType&) { return 1ul; }
94
95 inline static Scalar coeff_dot(const qType&) { return Scalar(1.); }
96
97 inline static Scalar coeff_twist(const qType&) { return Scalar(1.); }
98
99 inline static Scalar coeff_FS(const qType&) { return Scalar(1.); }
100
101 template <typename PlainLib>
102 inline static typename PlainLib::template TType<Scalar, 2> one_j_tensor(const qType&, const mpi::XpedWorld& world = mpi::getUniverse())
103 {
104 typedef typename PlainLib::Indextype IndexType;
105 auto T = PlainLib::template construct<Scalar>(std::array<IndexType, 2>{1, 1}, world);
106 std::array<IndexType, 2> index = {0, 0};
107 PlainLib::template setVal<Scalar, 2>(T, index, Scalar(1.));
108 return T;
109 }
110
111 static Scalar coeff_rightOrtho(const qType&, const qType&) { return Scalar(1.); }
112
113 inline static Scalar coeff_3j(const qType&, const qType&, const qType&, int, int, int) { return Scalar(1.); }
114
115 template <typename PlainLib>
116 inline static typename PlainLib::template TType<Scalar, 3>
117 CGC(const qType&, const qType&, const qType&, const std::size_t, const mpi::XpedWorld& world = mpi::getUniverse())
118 {
119 typedef typename PlainLib::Indextype IndexType;
120 auto T = PlainLib::template construct<Scalar>(std::array<IndexType, 3>{1, 1, 1}, world);
121 std::array<IndexType, 3> index = {0, 0, 0};
122 PlainLib::template setVal<Scalar, 3>(T, index, Scalar(1.));
123 return T;
124 }
125
126 inline static Scalar coeff_6j(const qType&, const qType&, const qType&, const qType&, const qType&, const qType&) { return Scalar(1.); }
127
128 static Scalar coeff_recouple(const qType& q1, const qType& q2, const qType& q3, const qType& Q, const qType& Q12, const qType& Q23)
129 {
130 return coeff_6j(q1, q2, Q12, q3, Q, Q23);
131 }
132
133 inline static Scalar
134 coeff_9j(const qType&, const qType&, const qType&, const qType&, const qType&, const qType&, const qType&, const qType&, const qType&)
135 {
136 return Scalar(1.);
137 }
138
139 static Scalar coeff_swap(const qType& ql, const qType& qr, const qType& qf) { return triangle(ql, qr, qf) ? Scalar(1.) : Scalar(0.); };
140
141 inline static bool triangle(const qType& q1, const qType& q2, const qType& q3) { return true; }
142};
143
144} // namespace Xped::Sym
145#endif
Definition: CombSym.hpp:8
XpedWorld & getUniverse()
Definition: Mpi.hpp:49
CTF::Tensor< Scalar > TType
Definition: PlainInterface_Cyclops_impl.cpp:13
Definition: SymBase.hpp:14
qarray< Nq > qType
Definition: U0.hpp:23
Scalar__ Scalar
Definition: U0.hpp:24
Definition: SymBase.hpp:10
Definition: U0.hpp:35
static Scalar coeff_rightOrtho(const qType &, const qType &)
Definition: U0.hpp:111
static constexpr bool ALL_IS_BOSONIC
Definition: U0.hpp:70
static qType random_q()
Definition: U0.hpp:89
static constexpr bool ALL_IS_FERMIONIC
Definition: U0.hpp:69
static constexpr bool ALL_IS_SPIN
Definition: U0.hpp:71
static constexpr bool ANY_HAS_MULTIPLICITIES
Definition: U0.hpp:55
static constexpr std::array< bool, Nq > ABELIAN
Definition: U0.hpp:47
qarray< 0 > qType
Definition: U0.hpp:37
static constexpr std::array< int, Nq > MOD_N
Definition: U0.hpp:53
static constexpr bool ALL_IS_MODULAR
Definition: U0.hpp:68
static constexpr bool ANY_IS_BOSONIC
Definition: U0.hpp:61
U0()
Definition: U0.hpp:39
static constexpr std::array< bool, Nq > NON_ABELIAN
Definition: U0.hpp:46
static constexpr bool ALL_HAS_MULTIPLICITIES
Definition: U0.hpp:64
static constexpr bool ANY_IS_FERMIONIC
Definition: U0.hpp:60
static constexpr bool ALL_NON_ABELIAN
Definition: U0.hpp:65
static constexpr std::array< bool, Nq > IS_TRIVIAL
Definition: U0.hpp:48
static constexpr std::array< bool, Nq > IS_FERMIONIC
Definition: U0.hpp:50
static constexpr std::size_t Nq
Definition: U0.hpp:43
static constexpr std::array< KIND, Nq > kind()
Definition: U0.hpp:81
static int degeneracy(const qType &)
Definition: U0.hpp:87
static constexpr qType qvacuum()
Definition: U0.hpp:83
static std::size_t multiplicity(const qType &, const qType &, const qType &)
Definition: U0.hpp:93
static constexpr std::array< bool, Nq > IS_SPIN
Definition: U0.hpp:52
static constexpr bool ALL_IS_TRIVIAL
Definition: U0.hpp:67
static std::string name()
Definition: U0.hpp:41
static constexpr bool ANY_ABELIAN
Definition: U0.hpp:57
static Scalar coeff_FS(const qType &)
Definition: U0.hpp:99
static constexpr std::array< bool, Nq > IS_BOSONIC
Definition: U0.hpp:51
static constexpr bool NO_CHARGE_SYM()
Definition: U0.hpp:79
return T
Definition: U0.hpp:123
static constexpr bool IS_SPIN_SU2()
Definition: U0.hpp:74
static bool triangle(const qType &q1, const qType &q2, const qType &q3)
Definition: U0.hpp:141
static constexpr bool NO_SPIN_SYM()
Definition: U0.hpp:78
static Scalar coeff_3j(const qType &, const qType &, const qType &, int, int, int)
Definition: U0.hpp:113
static constexpr bool ALL_ABELIAN
Definition: U0.hpp:66
static constexpr bool ANY_IS_SPIN
Definition: U0.hpp:62
static PlainLib::template TType< Scalar, 2 > one_j_tensor(const qType &, const mpi::XpedWorld &world=mpi::getUniverse())
Definition: U0.hpp:102
static Scalar coeff_swap(const qType &ql, const qType &qr, const qType &qf)
Definition: U0.hpp:139
static Scalar coeff_9j(const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &, const qType &)
Definition: U0.hpp:134
static constexpr bool ANY_IS_TRIVIAL
Definition: U0.hpp:58
static constexpr std::array< bool, Nq > HAS_MULTIPLICITIES
Definition: U0.hpp:45
static constexpr std::array< qType, 1 > lowest_qs()
Definition: U0.hpp:84
static constexpr std::array< bool, Nq > IS_MODULAR
Definition: U0.hpp:49
static Scalar coeff_dot(const qType &)
Definition: U0.hpp:95
static std::vector< qType > basis_combine(const qType &, const qType &)
Definition: U0.hpp:91
static Scalar coeff_twist(const qType &)
Definition: U0.hpp:97
static Scalar coeff_recouple(const qType &q1, const qType &q2, const qType &q3, const qType &Q, const qType &Q12, const qType &Q23)
Definition: U0.hpp:128
Scalar_ Scalar
Definition: U0.hpp:36
static constexpr bool IS_SPIN_U1()
Definition: U0.hpp:76
static constexpr bool ANY_IS_MODULAR
Definition: U0.hpp:59
static constexpr bool ANY_NON_ABELIAN
Definition: U0.hpp:56
std::array< IndexType, 3 > index
Definition: U0.hpp:121
static qType conj(const qType &)
Definition: U0.hpp:86
static constexpr bool IS_CHARGE_SU2()
Definition: U0.hpp:73
static Scalar coeff_6j(const qType &, const qType &, const qType &, const qType &, const qType &, const qType &)
Definition: U0.hpp:126
auto T
Definition: U0.hpp:120
Definition: Mpi.hpp:34
Definition: qarray.hpp:30