IM-SRG++  0
ThreeBodyME.hh
1 #ifndef ThreeBodyME_h
2 #define ThreeBodyME_h 1
3 
4 #include "ModelSpace.hh"
5 #include <fstream>
6 
7 //typedef double ThreeBME_type;
8 typedef float ThreeBME_type;
9 
19 {
20  public:
21  ModelSpace * modelspace;
22 // vector<vector<vector<vector<vector<vector<vector<ThreeBME_type>>>>>>> MatEl; //
23  vector<ThreeBME_type> MatEl;
24  vector<vector<vector<vector<vector<vector<size_t>>>>>> OrbitIndex; //
25  int E3max;
26  size_t total_dimension;
27 
28  ~ThreeBodyME();
29  ThreeBodyME();
31  ThreeBodyME(ModelSpace* ms, int e3max);
32 
33  void Allocate();
34 
35  void SetModelSpace(ModelSpace *ms){modelspace = ms;};
36 
38  vector<pair<int,double>> AccessME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n) const;
39  ThreeBME_type AddToME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n, ThreeBME_type V);
40  void SetME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n, ThreeBME_type V);
41  ThreeBME_type GetME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n) const;
42 // ThreeBME_type GetME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n);
43 // ThreeBME_type GetME_pn(int Jab_in, int Jde_in, int J2, int i, int j, int k, int l, int m, int n);
44  ThreeBME_type GetME_pn(int Jab_in, int Jde_in, int J2, int i, int j, int k, int l, int m, int n) const;
45 
47 
48  int SortOrbits(int a_in, int b_in, int c_in, int& a,int& b,int& c) const;
49  double RecouplingCoefficient(int recoupling_case, double ja, double jb, double jc, int Jab_in, int Jab, int J) const;
50  void SetE3max(int e) {E3max = e;};
51  int GetE3max()const {return E3max;};
52 
53  void Erase(); // set all three-body terms to zero
54  void Deallocate();
55  size_t size(){return total_dimension * sizeof(ThreeBME_type);};
56 
57 
58  void WriteBinary(ofstream&);
59  void ReadBinary(ifstream&);
60 
61 };
62 
63 
64 #endif
double RecouplingCoefficient(int recoupling_case, double ja, double jb, double jc, int Jab_in, int Jab, int J) const
Coefficients for recoupling three body matrix elements.
Definition: ThreeBodyME.cc:301
void Deallocate()
Free up the memory used for the matrix elements.
Definition: ThreeBodyME.cc:353
void SetME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n, ThreeBME_type V)
Definition: ThreeBodyME.cc:191
ThreeBME_type GetME_pn(int Jab_in, int Jde_in, int J2, int i, int j, int k, int l, int m, int n) const
Definition: ThreeBodyME.cc:132
vector< pair< int, double > > AccessME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n) const
Definition: ThreeBodyME.cc:205
Definition: ModelSpace.hh:157
ThreeBME_type GetME(int Jab_in, int Jde_in, int J2, int tab_in, int tde_in, int T2, int i, int j, int k, int l, int m, int n) const
Definition: ThreeBodyME.cc:175
int SortOrbits(int a_in, int b_in, int c_in, int &a, int &b, int &c) const
Definition: ThreeBodyME.cc:326
Definition: ThreeBodyME.hh:18