- Timestamp:
- Apr 22, 2008, 11:55:03 AM (17 years ago)
- Children:
- b924cd
- Parents:
- 473c2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/perturbed.c
r473c2b r60a9f9 3060 3060 double x[2][NDIM]; 3061 3061 int it, ion, in, dex, g, Index, i; 3062 int *N = Lev0->Plan0.plan->N; 3062 3063 //const double FFTfactor = 1.;///Lev0->MaxN; 3063 3064 int n[2][NDIM]; … … 3066 3067 char suffixsigma[255]; 3067 3068 const int myPE = P->Par.me_comm_ST_Psi; 3068 int N[NDIM];3069 3069 int cross_lookup[4]; // cross lookup table 3070 N[0] = Lev0->Plan0.plan->N[0];3071 N[1] = Lev0->Plan0.plan->N[1];3072 N[2] = Lev0->Plan0.plan->N[2];3073 3070 const int N0 = Lev0->Plan0.plan->local_nx; 3074 3071 const double factorDC = R->FactorDensityC; … … 3077 3074 time_t seconds; 3078 3075 time(&seconds); // get current time 3076 3077 if(P->Call.out[NormalOut]) fprintf(stderr,"(%i)Calculating Chemical Shielding\n", P->Par.me); 3079 3078 3080 3079 // inverse Fourier transform current densities … … 3130 3129 sigma_imag[in+dex*NDIM][Index].im = GArray[g].G[cross_lookup[0]] * ( CurrentDensityC[dex*NDIM+cross_lookup[1]][Index].re)/GArray[g].GSq;//*FFTfactor; 3131 3130 sigma_imag[in+dex*NDIM][Index].im -= GArray[g].G[cross_lookup[2]] * ( CurrentDensityC[dex*NDIM+cross_lookup[3]][Index].re)/GArray[g].GSq;//*FFTfactor; 3132 } else { // G=0-component stems from magnetic susceptibility3131 } else { // divergent G=0-component stems from magnetic susceptibility 3133 3132 sigma_imag[in+dex*NDIM][GArray[g].Index].re = 2./3.*I->I[0].chi[in+dex*NDIM];//-4.*M_PI*(0.5*I->I[0].chi[0+0*NDIM]+0.5*I->I[0].chi[1+1*NDIM]+2./3.*I->I[0].chi[2+2*NDIM]); 3134 3133 } … … 3252 3251 fprintf(stderr,"A : %e\n", A); 3253 3252 fprintf(stderr,"==================\n"); 3254 3255 3253 } 3256 3254 }
Note:
See TracChangeset
for help on using the changeset viewer.