18 #include "diagonalcalc.h" 20 #include "wrapperMPI.h" 55 #pragma omp parallel for default(none) reduction(+: dnorm) private(i) shared(v0, v1) firstprivate(i_max, Ns, LargeValue) 56 for(i = 1; i <= i_max; i++){
58 dnorm += conj(
v0[i])*
v0[i];
63 #pragma omp parallel for default(none) private(i) shared(v0) firstprivate(i_max, dnorm) 64 for(i=1;i<=i_max;i++){
87 double complex dnorm=0.0;
88 double complex tmp1 = 1.0;
89 double complex tmp2=0.0;
95 if(dt <pow(10.0, -14)){
96 #pragma omp parallel for default(none) reduction(+: dnorm) private(i) shared(v0, v1, v2) firstprivate(i_max, dt, tmp2) 97 for(i = 1; i <= i_max; i++){
107 #pragma omp parallel for default(none) reduction(+: dnorm) private(i) shared(v0, v1, v2) firstprivate(i_max, dt, tmp1, tmp2) 108 for (i = 1; i <= i_max; i++) {
110 v0[i] =
v1[i] + tmp1 * tmp2;
112 v2[i] = 0.0 + I * 0.0;
115 tmp1 *= -I * dt / (
double complex) coef;
119 #pragma omp parallel for default(none) private(i) shared(v0, v1, v2) firstprivate(i_max, tmp1, myrank) 120 for (i = 1; i <= i_max; i++) {
121 v0[i] += tmp1 *
v2[i];
123 v2[i] = 0.0 + I * 0.0;
128 #pragma omp parallel for default(none) reduction(+: dnorm) private(i) shared(v0) firstprivate(i_max, dt) 129 for(i = 1; i <= i_max; i++){
130 dnorm += conj(
v0[i])*
v0[i];
135 #pragma omp parallel for default(none) private(i) shared(v0) firstprivate(i_max, dnorm) 136 for(i=1;i<=i_max;i++){
struct DefineList Def
Definision of system (Hamiltonian) etc.
int mltply(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Parent function of multiplying the wavefunction by the Hamiltonian. . First, the calculation of diago...
double complex SumMPI_dc(double complex norm)
MPI wrapper function to obtain sum of Double complex across processes.
unsigned long int idim_max
The dimension of the Hilbert space of this process.
int Multiply(struct BindStruct *X)
Function of calculating the i-th step norm as and update the i+1-th wave vector as for TPQ calculat...
unsigned int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
int MultiplyForTEM(struct BindStruct *X)
Function of multiplying Hamiltonian for Time Evolution.
struct CheckList Check
Size of the Hilbert space.