KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
Kernel_GWP.h
Go to the documentation of this file.
1#include "kids/Kernel.h"
2#include "kids/Kernel_Elec.h"
3
4namespace PROJECT_NS {
5
6class Kernel_GWP final : public Kernel {
7 public:
8 virtual const std::string getName();
9
10 virtual int getType() const;
11
12 Kernel_GWP(std::shared_ptr<Kernel> kmodel, std::shared_ptr<Kernel> krepr, std::shared_ptr<Kernel> kforce)
13 : _kmodel{kmodel}, _krepr{krepr}, _kforce{kforce} {
14 appendChild(std::shared_ptr<Kernel_Elec>(new Kernel_Elec())); //
15 }
16
17 static int calc_Ekin(kids_real* Ekin, // [P]
18 kids_real* p, // [P,N]
19 kids_real* m, // [P,N]
20 int P, int N);
21
22 static int calc_Snuc(kids_complex* S, // [P,P]
23 kids_real* x1, // [P,N]
24 kids_real* p1, // [P,N]
25 kids_real* m1, // [P,N]
26 kids_real* g1, // [P]
27 kids_real* x2, // [P,N]
28 kids_real* p2, // [P,N]
29 kids_real* m2, // [P,N]
30 kids_real* g2, // [P]
31 kids_real* alpha, // [N]
32 int P, int N);
33
34 static int calc_Sele(kids_complex* S, // [P,P]
35 kids_complex* c1, // [P,F]
36 kids_complex* c2, // [P,F]
37 kids_real xi, //
39 int P, int F);
40
41 static int calc_dtlnSnuc(kids_complex* dtlnSnuc, // [P,P]
42 kids_real* x, // [P,N]
43 kids_real* p, // [P,N]
44 kids_real* m, // [P,N]
45 kids_real* f, // [P,N]
46 kids_real* alpha, // [N]
47 kids_real* Ekin, // [P]
48 int P, int N);
49
50 static int calc_dtSele(kids_complex* dtlnSele, // [P,P]
51 kids_complex* Sele, // [P,P]
52 kids_complex* c, // [P,F]
53 kids_complex* H, // [P,F,F]
54 kids_real* vpes, // [P]
55 int P, int F);
56
57 static int calc_invS(kids_complex* invS, kids_complex* S, int P);
58
59 static double calc_density(kids_complex* rhored, // [F,F]
60 kids_complex* Acoeff, // [P]
61 kids_complex* Snuc, // [P,P]
62 kids_complex* c, // [P,F]
63 kids_real xi, kids_real gamma, int Pu, int P, int F);
64
65 static int calc_Hbasis(kids_complex* Hbasis, // [P,P]
66 kids_real* vpes, // [P]
67 kids_real* grad, // [P,N]
68 kids_real* V, // [P,F,F]
69 kids_real* dV, // [P,N,F,F]
70 kids_real* x, // [P,N]
71 kids_real* p, // [P,N]
72 kids_real* m, // [P,N]
73 kids_real* alpha, // [N]
74 kids_complex* Sele, // [P,P]
75 kids_complex* c, // [P,F]
76 int P, int N, int F // Dimensions
77 );
78
79 static int calc_Hbasis_adia(kids_complex* Hbasis, // [P,P]
80 kids_real* E, // [P,F]
81 kids_real* dE, // [P,N,F,F]
82 kids_real* x, // [P,N]
83 kids_real* p, // [P,N]
84 kids_real* m, // [P,N]
85 kids_real* alpha, // [N]
86 kids_complex* c, // [P,F]
87 int P, int N, int F // Dimensions
88 );
89
90 private:
94
95 std::shared_ptr<Kernel> _kmodel; // prepare for initial sampling
96 std::shared_ptr<Kernel> _krepr; // prepare for representation calculation
97 std::shared_ptr<Kernel> _kforce; // prepare for force calculation
98
102 kids_real xi, gamma; // for mapping kernel
103 kids_real alpha0, width_scaling; // for initial width
104 kids_real *x, *p, *m, *f, *g;
108
110 kids_real * V, *dV, *E, *dE, *T;
112
119
121
126 kids_complex *R, *UXdt, *UYdt, *Xcoeff; // help for Acoeff
130
132
139
143
144 // bool* pf_cross;
150
151 void setInputParam_impl(std::shared_ptr<Param>& PM);
152
153 void setInputDataSet_impl(std::shared_ptr<DataSet>& DS);
154
156
158
159 Status& impl_0(Status& stat);
160 Status& impl_1(Status& stat);
161 int cloning();
162 int death() { return 0; }
163};
164
165}; // namespace PROJECT_NS
this file provide Kernel class
initialization kernels for electonic DOFs
this class implements calculation/utils for electronic DOFs:
Definition Kernel_Elec.h:11
kids_complex * Xcoeff
Definition Kernel_GWP.h:126
Status & impl_0(Status &stat)
kids_complex * dtlnSnuc
Definition Kernel_GWP.h:118
kids_complex * Hbasis
Definition Kernel_GWP.h:122
kids_complex * S2
Definition Kernel_GWP.h:116
std::shared_ptr< Kernel > _krepr
Definition Kernel_GWP.h:96
kids_complex * UXdt
Definition Kernel_GWP.h:126
kids_complex * Snuc
Definition Kernel_GWP.h:113
static int calc_Hbasis_adia(kids_complex *Hbasis, kids_real *E, kids_real *dE, kids_real *x, kids_real *p, kids_real *m, kids_real *alpha, kids_complex *c, int P, int N, int F)
std::shared_ptr< Kernel > _kforce
Definition Kernel_GWP.h:97
virtual int getType() const
Get the type of the kernel.
kids_real * MatR_PP
temporary
Definition Kernel_GWP.h:133
static int calc_dtSele(kids_complex *dtlnSele, kids_complex *Sele, kids_complex *c, kids_complex *H, kids_real *vpes, int P, int F)
kids_complex * R2
Definition Kernel_GWP.h:116
static int calc_Sele(kids_complex *S, kids_complex *c1, kids_complex *c2, kids_real xi, kids_real gamma, int P, int F)
kids_complex * S1
Definition Kernel_GWP.h:115
Status & impl_1(Status &stat)
kids_complex * invS2h
Definition Kernel_GWP.h:116
virtual const std::string getName()
Get the name of the kernel.
kids_complex * fun_diag_P
Definition Kernel_GWP.h:136
Status & executeKernel_impl(Status &stat)
Virtual function to execute the kernel implementation.
static int calc_invS(kids_complex *invS, kids_complex *S, int P)
kids_complex * I_PP
Definition Kernel_GWP.h:135
kids_complex * dtSele
Definition Kernel_GWP.h:118
kids_complex * Sx
Definition Kernel_GWP.h:117
kids_complex * Sele
Definition Kernel_GWP.h:113
static int calc_Ekin(kids_real *Ekin, kids_real *p, kids_real *m, int P, int N)
static int calc_dtlnSnuc(kids_complex *dtlnSnuc, kids_real *x, kids_real *p, kids_real *m, kids_real *f, kids_real *alpha, kids_real *Ekin, int P, int N)
static double calc_density(kids_complex *rhored, kids_complex *Acoeff, kids_complex *Snuc, kids_complex *c, kids_real xi, kids_real gamma, int Pu, int P, int F)
kids_complex * c_last
Definition Kernel_GWP.h:142
static int calc_Hbasis(kids_complex *Hbasis, kids_real *vpes, kids_real *grad, kids_real *V, kids_real *dV, kids_real *x, kids_real *p, kids_real *m, kids_real *alpha, kids_complex *Sele, kids_complex *c, int P, int N, int F)
std::shared_ptr< Kernel > _kmodel
Definition Kernel_GWP.h:95
kids_complex * Ubranch
Definition Kernel_GWP.h:138
Kernel_GWP(std::shared_ptr< Kernel > kmodel, std::shared_ptr< Kernel > krepr, std::shared_ptr< Kernel > kforce)
Definition Kernel_GWP.h:12
kids_complex * rhored
Definition Kernel_GWP.h:127
kids_complex * dtAcoeff
Definition Kernel_GWP.h:124
kids_complex * S2h
Definition Kernel_GWP.h:116
kids_complex * fun_diag_F
Definition Kernel_GWP.h:137
kids_complex * invS
Definition Kernel_GWP.h:113
kids_complex * rhored2
Definition Kernel_GWP.h:128
kids_complex * rhored3
Definition Kernel_GWP.h:129
void setInputDataSet_impl(std::shared_ptr< DataSet > &DS)
Virtual function to set input data set for the kernel implementation.
kids_complex * R1
Definition Kernel_GWP.h:115
kids_complex * S1h
Definition Kernel_GWP.h:115
kids_complex * invS1h
Definition Kernel_GWP.h:115
Status & initializeKernel_impl(Status &stat)
Virtual function to initialize the kernel implementation.
static int calc_Snuc(kids_complex *S, kids_real *x1, kids_real *p1, kids_real *m1, kids_real *g1, kids_real *x2, kids_real *p2, kids_real *m2, kids_real *g2, kids_real *alpha, int P, int N)
the expression is exp(-0.25*a*(x1-x2)^2 -0.25*(p1-p2)/a + 0.5i*(p1+p2)(x1-x2) - i(g1-g2))
kids_complex * Udt
Definition Kernel_GWP.h:111
kids_complex * MatC_PP
Definition Kernel_GWP.h:134
kids_complex * Hcoeff
Definition Kernel_GWP.h:123
kids_complex * Acoeff
Definition Kernel_GWP.h:124
void setInputParam_impl(std::shared_ptr< Param > &PM)
Virtual function to set input parameters for the kernel implementation.
kids_complex * UYdt
Definition Kernel_GWP.h:126
this class provides the container and implementation of algorithms
Definition Kernel.h:60
Kernel & appendChild(std::shared_ptr< Kernel > ker)
Append a kernel as the last child of the current tree node.
Definition Kernel.cpp:78
< http://warp.povusers.org/FunctionParser/fparser.html
Definition Context.h:39
double kids_real
Alias for real number type.
Definition Types.h:59
std::complex< double > kids_complex
Alias for complex number type.
Definition Types.h:60