- Timestamp:
- Apr 22, 2008, 9:22:59 AM (17 years ago)
- Children:
- 2399875
- Parents:
- 9a9fee9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/perturbed.c
r9a9fee9 r7e294d 111 111 struct Lattice *Lat = &P->Lat; 112 112 struct Psis *Psi = &Lat->Psi; 113 int type ;113 int type, flag = 0;//,i; 114 114 115 115 for (type=Perturbed_P0;type<=Perturbed_RxP2;type++) { // go through each perturbation group separately // … … 119 119 R->PsiStep = R->MaxPsiStep; // reset in-Psi-minimisation-counter, so that we really advance to the next wave function 120 120 UpdateActualPsiNo(P, type); // step on to next perturbed one 121 121 122 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 123 124 SpeedMeasure(P, InitSimTime, StartTimeDo); 124 125 if(P->Call.out[MinOut]) fprintf(stderr,"from source file of recent calculation\n"); … … 135 136 SpeedMeasure(P, InitSimTime, StopTimeDo); 136 137 } 137 if ( P->Call.ReadSrcFiles != 1) {138 if ((P->Call.ReadSrcFiles != 1) || (!flag)) { // read and don't minimise only if SrcPsi were parsable! 138 139 SpeedMeasure(P, InitSimTime, StartTimeDo); 139 140 ResetGramSchTagType(P, Psi, type, NotOrthogonal); // perturbed now shall be orthonormalized 140 if ( P->Call.ReadSrcFiles != 2) {141 if ((P->Call.ReadSrcFiles != 2) || (!flag)) { 141 142 if (R->LevSNo == Lat->MaxLevel-1) { // is it the starting level? (see InitRunLevel()) 142 143 if(P->Call.out[MinOut]) fprintf(stderr, "randomly.\n"); … … 256 257 for (p=Lat->Psi.TypeStartIndex[state]; p < Lat->Psi.TypeStartIndex[state+1]; p++) { 257 258 //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! 259 260 CalculatePsiEnergy(P,p,1); 260 261 CalculatePerturbedEnergy(P, p, 0, first); … … 294 295 if (p != p_old) { 295 296 //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); 297 298 CalculatePsiEnergy(P,p_old,0); 298 299 CalculatePerturbedEnergy(P, p_old, 0, 0); … … 301 302 //if (p < 0 || p >= Lat->Psi.LocalNo) Error(SomeError,"InitPerturbedEnergyCalculation: p out of range"); 302 303 // recalculating non-local form factors which are coefficient dependent! 303 CalculateNonLocalEnergyNoRT(P,p);304 //CalculateNonLocalEnergyNoRT(P,p); 304 305 CalculatePsiEnergy(P,p,0); 305 306 CalculatePerturbedEnergy(P, p, 1, 0);
Note:
See TracChangeset
for help on using the changeset viewer.