QNANO
Precompute_Coulomb_Onsite.h
1 #ifndef QNANO_NEW_PRECOMPUTE_COULOMB_ONSITE
2 #define QNANO_NEW_PRECOMPUTE_COULOMB_ONSITE
3 
4 #include "tools/Static_Const_Member.h"
5 #include "tools/Integrator.h"
6 #include "tools/QNANO_Constants.h"
7 #include "GSL/Integrator_VEGAS.h"
8 #include "orbitals/Slater_Orbital_List.h"
9 
11 public:
12 
13  Slater_Orbital_List solist;
14  std::vector<int> cur_indices;
15 
16 
17 
18  static double f(double *x, size_t dim, void *params){
19  const Precompute_Coulomb_Onsite *cl=(const Precompute_Coulomb_Onsite *)params;
20  double *x2=&x[3];
21  double DR=sqrt( (x[0]-x2[0])*(x[0]-x2[0]) + (x[1]-x2[1])*(x[1]-x2[1]) + (x[2]-x2[2])*(x[2]-x2[2]) );
22 
23  return QNANO_Constants::COULOMB_PREFAC* \
24  cl->solist[cl->cur_indices[0]].f(x,3,(void*)&cl->solist[cl->cur_indices[0]])* \
25  cl->solist[cl->cur_indices[1]].f(x2,3,(void*)&cl->solist[cl->cur_indices[1]])* \
26  cl->solist[cl->cur_indices[2]].f(x2,3,(void*)&cl->solist[cl->cur_indices[2]])* \
27  cl->solist[cl->cur_indices[3]].f(x,3,(void*)&cl->solist[cl->cur_indices[3]])/DR;
28  }
29 
30 
31  void precompute_and_print(const std::string &outfile, double lim, double Ndiscr, double epsilon=1.);
32 
33 
34  Precompute_Coulomb_Onsite(const std::string &orbfile)
35  : Integrable_Function(f, 6, this), solist(orbfile), cur_indices(4,0) {
36  }
37 
38 };
39 
40 #endif
Definition: Slater_Orbital_List.h:8
Definition: Precompute_Coulomb_Onsite.h:10
Interface for integrable functions.
Definition: Integrable_Function.h:10