Changeset b0aa9c for pcp


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

MinimisePerturbed(): verbosity changed, some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/perturbed.c

    r6edeca rb0aa9c  
    115115  for (type=Perturbed_P0;type<=Perturbed_RxP2;type++) {  // go through each perturbation group separately //
    116116    *Stop=0;   // reset stop flag
    117     fprintf(stderr,"(%i)Beginning perturbed minimisation of type %s ...\n", P->Par.me, R->MinimisationName[type]);
     117    if(P->Call.out[LeaderOut]) fprintf(stderr,"(%i)Beginning perturbed minimisation of type %s ...\n", P->Par.me, R->MinimisationName[type]);
    118118    //OutputOrbitalPositions(P, Occupied);
    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     fprintf(stderr, "(%i) Re-initializing perturbed psi array for type %s ", P->Par.me, R->MinimisationName[type]);
     121    if(P->Call.out[MinOut]) fprintf(stderr, "(%i) Re-initializing perturbed psi array for type %s ", P->Par.me, R->MinimisationName[type]);
    122122    if (P->Call.ReadSrcFiles && ReadSrcPsiDensity(P,type,1, R->LevSNo)) {
    123123      SpeedMeasure(P, InitSimTime, StartTimeDo); 
    124       fprintf(stderr,"from source file of recent calculation\n");
     124      if(P->Call.out[MinOut]) fprintf(stderr,"from source file of recent calculation\n");
    125125      ReadSrcPsiDensity(P,type, 0, R->LevSNo);
    126126      ResetGramSchTagType(P, Psi, type, IsOrthogonal); // loaded values are orthonormal
     
    140140      if (P->Call.ReadSrcFiles != 2) {
    141141        if (R->LevSNo == Lat->MaxLevel-1) { // is it the starting level? (see InitRunLevel())
    142           fprintf(stderr, "randomly.\n");
     142          if(P->Call.out[MinOut]) fprintf(stderr, "randomly.\n");
    143143          InitPsisValue(P, Psi->TypeStartIndex[type], Psi->TypeStartIndex[type+1]);  // initialize perturbed array for this run
    144144        } else {
    145           fprintf(stderr, "from source file of last level.\n");
     145          if(P->Call.out[MinOut]) fprintf(stderr, "from source file of last level.\n");
    146146          ReadSrcPerturbedPsis(P, type);
    147147        }
     
    162162      EnergyOutput(P,0);
    163163      while (*Stop != 1) {
    164         //P->R.PsiStep = P->R.MaxPsiStep; // make it advance to next Psi
    165         FindPerturbedMinimum(P);        
     164        //debug(P,"FindPerturbedMinimum");
     165        FindPerturbedMinimum(P);   // find minimum
    166166        //debug(P,"UpdateActualPsiNo");
    167167        UpdateActualPsiNo(P, type); // step on to next perturbed Psi
     
    180180      }
    181181      // now release normalization condition and minimize wrt to norm
    182       if(P->Call.out[NormalOut]) fprintf(stderr,"(%i) Write %s srcpsi to disk\n", P->Par.me, R->MinimisationName[type]);
     182      if(P->Call.out[MinOut]) fprintf(stderr,"(%i) Writing %s srcpsi to disk\n", P->Par.me, R->MinimisationName[type]);
    183183      OutputSrcPsiDensity(P, type);
    184184//      if (!TestReadnWriteSrcDensity(P,type))
Note: See TracChangeset for help on using the changeset viewer.