Changeset 60a9f9 for pcp/src


Ignore:
Timestamp:
Apr 22, 2008, 11:55:03 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
b924cd
Parents:
473c2b
Message:

CalculateChemicalShieldingByReciprocalCurrentDensity(): N is now pointer, not array and a few comments changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/perturbed.c

    r473c2b r60a9f9  
    30603060  double x[2][NDIM];
    30613061  int it, ion, in, dex, g, Index, i;
     3062  int *N = Lev0->Plan0.plan->N;
    30623063  //const double FFTfactor = 1.;///Lev0->MaxN;
    30633064  int n[2][NDIM];
     
    30663067  char suffixsigma[255];
    30673068  const int myPE = P->Par.me_comm_ST_Psi;
    3068   int N[NDIM];
    30693069  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];
    30733070  const int N0 = Lev0->Plan0.plan->local_nx;
    30743071  const double factorDC = R->FactorDensityC;
     
    30773074  time_t seconds; 
    30783075  time(&seconds); // get current time
     3076
     3077  if(P->Call.out[NormalOut]) fprintf(stderr,"(%i)Calculating Chemical Shielding\n", P->Par.me);
    30793078
    30803079  // inverse Fourier transform current densities
     
    31303129          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;
    31313130          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 susceptibility
     3131        } else {  // divergent G=0-component stems from magnetic susceptibility
    31333132          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]);
    31343133        }
     
    32523251        fprintf(stderr,"A          : %e\n", A);
    32533252        fprintf(stderr,"==================\n");
    3254        
    32553253      }
    32563254    }
Note: See TracChangeset for help on using the changeset viewer.