Changeset 7e294d for pcp/src


Ignore:
Timestamp:
Apr 22, 2008, 9:22:59 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
2399875
Parents:
9a9fee9
Message:

InitPerturbedEnergyCalculation() and UpdatePerturbedEnergyCalculation() don't need to call CalculateNonLocalEnergyNoRT()

CalculateNonLocalEnergyNoRT() commented out in both functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/perturbed.c

    r9a9fee9 r7e294d  
    111111  struct Lattice *Lat = &P->Lat;
    112112  struct Psis *Psi = &Lat->Psi;
    113   int type;
     113  int type, flag = 0;//,i;
    114114 
    115115  for (type=Perturbed_P0;type<=Perturbed_RxP2;type++) {  // go through each perturbation group separately //
     
    119119    R->PsiStep = R->MaxPsiStep; // reset in-Psi-minimisation-counter, so that we really advance to the next wave function
    120120    UpdateActualPsiNo(P, type); // step on to next perturbed one
     121
    121122    if(P->Call.out[MinOut]) fprintf(stderr, "(%i) Re-initializing perturbed psi array for type %s ", P->Par.me, R->MinimisationName[type]);
    122     if (P->Call.ReadSrcFiles && ReadSrcPsiDensity(P,type,1, R->LevS->LevelNo)) {
     123    if (P->Call.ReadSrcFiles && (flag = ReadSrcPsiDensity(P,type,1, R->LevS->LevelNo))) {// in flag store whether stored Psis are readible or not
    123124      SpeedMeasure(P, InitSimTime, StartTimeDo); 
    124125      if(P->Call.out[MinOut]) fprintf(stderr,"from source file of recent calculation\n");
     
    135136      SpeedMeasure(P, InitSimTime, StopTimeDo); 
    136137    }
    137     if (P->Call.ReadSrcFiles != 1) {
     138    if ((P->Call.ReadSrcFiles != 1) || (!flag)) {  // read and don't minimise only if SrcPsi were parsable!
    138139      SpeedMeasure(P, InitSimTime, StartTimeDo); 
    139140      ResetGramSchTagType(P, Psi, type, NotOrthogonal); // perturbed now shall be orthonormalized
    140       if (P->Call.ReadSrcFiles != 2) {
     141      if ((P->Call.ReadSrcFiles != 2) || (!flag)) {
    141142        if (R->LevSNo == Lat->MaxLevel-1) { // is it the starting level? (see InitRunLevel())
    142143          if(P->Call.out[MinOut]) fprintf(stderr, "randomly.\n");
     
    256257  for (p=Lat->Psi.TypeStartIndex[state]; p < Lat->Psi.TypeStartIndex[state+1]; p++) {
    257258    //if (p < 0 || p >= Lat->Psi.LocalNo) Error(SomeError,"InitPerturbedEnergyCalculation: p out of range");
    258     CalculateNonLocalEnergyNoRT(P, p); // recalculating non-local form factors which are coefficient dependent!
     259    //CalculateNonLocalEnergyNoRT(P, p); // recalculating non-local form factors which are coefficient dependent!
    259260    CalculatePsiEnergy(P,p,1);
    260261    CalculatePerturbedEnergy(P, p, 0, first);
     
    294295  if (p != p_old) {
    295296    //if (p_old < 0 || p_old >= Lat->Psi.LocalNo) Error(SomeError,"UpdatePerturbedEnergyCalculation: p_old out of range");
    296     CalculateNonLocalEnergyNoRT(P, p_old);
     297    //CalculateNonLocalEnergyNoRT(P, p_old);
    297298    CalculatePsiEnergy(P,p_old,0);
    298299    CalculatePerturbedEnergy(P, p_old, 0, 0);
     
    301302  //if (p < 0 || p >= Lat->Psi.LocalNo) Error(SomeError,"InitPerturbedEnergyCalculation: p out of range");
    302303  // recalculating non-local form factors which are coefficient dependent!
    303   CalculateNonLocalEnergyNoRT(P,p);
     304  //CalculateNonLocalEnergyNoRT(P,p);
    304305  CalculatePsiEnergy(P,p,0);
    305306  CalculatePerturbedEnergy(P, p, 1, 0);
Note: See TracChangeset for help on using the changeset viewer.