- Timestamp:
- Apr 22, 2008, 9:07:27 AM (17 years ago)
- Children:
- 6edeca
- Parents:
- f72dc1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/pseudo.c
rf72dc1 r0f2c43 1073 1073 void CalculateIonLocalForce(struct Problem *P) 1074 1074 { 1075 int is,ia,g2,Index, s,i;1075 int is,ia,g2,Index,i; 1076 1076 double *G; 1077 1077 struct Lattice *L = &P->Lat; … … 1100 1100 for (ia=0;ia< I->I[is].Max_IonsOfType; ia++) { 1101 1101 dsum = &I->FTemp[ia*NDIM]; 1102 s= 0;1103 if ( Lev0->GArray[0].GSq == 0.0)1104 s++;1105 for ( g2=s; g2 < Lev0->MaxG; g2++) {1102 g2 = 0; 1103 if (fabs(Lev0->GArray[g2].GSq) < MYEPSILON) 1104 g2++; 1105 for (; g2 < Lev0->MaxG; g2++) { 1106 1106 Index = Lev0->GArray[g2].Index; 1107 1107 G = Lev0->GArray[g2].G; 1108 c_re(cv) = c_re(PP->VCoulombc[g2])*PP->FacGauss[is][g2]+PP->phi_ps_loc[is][g2]*c_re(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor; 1109 c_im(cv) = c_im(PP->VCoulombc[g2])*PP->FacGauss[is][g2]-PP->phi_ps_loc[is][g2]*c_im(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor; 1108 //debug(P,"Lokal Pseudopotential"); 1109 c_re(cv) = PP->phi_ps_loc[is][g2]*c_re(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor; 1110 c_im(cv) = -PP->phi_ps_loc[is][g2]*c_im(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor; 1111 //debug(P,"Coulombpotential"); 1112 c_re(cv) += c_re(PP->VCoulombc[g2])*PP->FacGauss[is][g2]; 1113 c_im(cv) += c_im(PP->VCoulombc[g2])*PP->FacGauss[is][g2]; 1110 1114 if (I->I[is].corecorr == CoreCorrected) { 1111 1115 // this summand was missing before, is not thoroughly tested
Note:
See TracChangeset
for help on using the changeset viewer.