Changeset ce81a3a


Ignore:
Timestamp:
Apr 22, 2008, 8:57:24 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
f72dc1
Parents:
53b5b6
Message:

CalculateSomeEnergyAndHGNoRT(): added some more comments what in each line is calculated

Associations of formula with lines on code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified pcp/src/pseudo.c

    r53b5b6 rce81a3a  
    919919    Fac = 4.*PI/(Lev0->GArray[g].GSq);
    920920    for (it = 0; it < I->Max_Types; it++) {
    921       c_re(vp) += (c_re(I->I[it].SFactor[g])*PP->phi_ps_loc[it][g]);
     921      c_re(vp) += (c_re(I->I[it].SFactor[g])*PP->phi_ps_loc[it][g]);  // V^ps,loc
    922922      c_im(vp) += (c_im(I->I[it].SFactor[g])*PP->phi_ps_loc[it][g]);
    923       c_re(rp) += (c_re(I->I[it].SFactor[g])*PP->FacGauss[it][g]);
     923      c_re(rp) += (c_re(I->I[it].SFactor[g])*PP->FacGauss[it][g]);    // n^gauss
    924924      c_im(rp) += (c_im(I->I[it].SFactor[g])*PP->FacGauss[it][g]);
    925925    } // rp = n^{Gauss)(G)
    926     c_re(rhog) = c_re(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor+c_re(rp);
     926    c_re(rhog) = c_re(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor+c_re(rp);  // n + n^gauss = n^~
    927927    c_im(rhog) = c_im(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor+c_im(rp);
    928928    c_re(rhoe) = c_re(Dens->DensityCArray[TotalDensity][Index])*R->HGcFactor;
     
    936936    SumEG += Fac*(c_re(rp)*c_re(rp)+c_im(rp)*c_im(rp));             // Gauss energy
    937937    SumEHP += Fac*(c_re(rhog)*c_re(rhog)+c_im(rhog)*c_im(rhog));    // E_ES first part
    938     SumEH += Fac*(c_re(rhoe)*c_re(rhoe)+c_im(rhoe)*c_im(rhoe));
     938    SumEH += Fac*(c_re(rhoe)*c_re(rhoe)+c_im(rhoe)*c_im(rhoe));     // Hartree energy
    939939    SumEPS += 2.*(c_re(Dens->DensityCArray[TotalDensity][Index])*c_re(vp)+
    940940                  c_im(Dens->DensityCArray[TotalDensity][Index])*c_im(vp))*R->HGcFactor;
Note: See TracChangeset for help on using the changeset viewer.