Ignore:
Timestamp:
Nov 22, 2013, 9:57:54 AM (11 years ago)
Author:
lemeur
Message:

correction softwaregenerator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc

    r418 r434  
    375375void particleBeam::particlesPhaseSpaceComponent(vector<double>& coord, unsigned index)
    376376{
     377
    377378  if ( !particleRepresentationOk_ ) return;
    378379 
    379380  coord.clear();
    380381  coord.resize(relativePartic_.size(), 0.0 );
    381   cout << " particleBeam::particlesPhaseSpaceComponent index = " << index << endl;
     382  //  cout << " particleBeam::particlesPhaseSpaceComponent index = " << index << endl;
    382383
    383384  if ( index <= 2 ) {
     
    392393 
    393394  if ( index >  2 && index < 5 ) {
    394     cout << " particleBeam::particlesPhaseSpaceComponent traitement vitesses " << endl;
     395    //    cout << " particleBeam::particlesPhaseSpaceComponent traitement vitesses " << endl;
    395396    for (unsigned i = 0; i < relativePartic_.size(); ++i) {
    396397      double begamz = relativePartic_.at(i).getBetaGamma().getComponent(2);
     
    401402      }
    402403    }
    403     cout << " particleBeam::particlesPhaseSpaceComponent traitement vitesses TERMINE " << endl;
     404    //    cout << " particleBeam::particlesPhaseSpaceComponent traitement vitesses TERMINE " << endl;
    404405    return;
    405406  }
     
    727728    double gamma = relativePartic_.at(particleIndex).getGamma();
    728729    //    TRIDVECTOR pos = relativePartic_.at(particleIndex).getPosition();
     730    // cout << " ------------------ particleBeam::coordonneesDeployees ----- " << endl;
     731    //   cout << " particleBeam::coordonneesDeployees " << relativePartic_.at(particleIndex).FileOutputFlow() << endl;
     732    //   cout << " par reference x= " << relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(0);
     733    // cout << " ----------------------------------------------------- " << endl;
     734
     735
     736
    729737    double xx = relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(0);
    730738    double yy = relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(1);
     
    733741    //    TRIDVECTOR begam= goodPartic_.at(particleIndex).getBetaGamma();
    734742    double begamz = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(2);
    735     double dz = begamz * cdt / gamma;
    736     double xp = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(0)/begamz;
    737     double yp = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(1)/begamz;
    738     xx += xp * dz;
    739     yy += yp * dz;   
    740     return TRIDVECTOR(xx, yy, dz);
     743    double fac = cdt / gamma;
     744    //    double dz = begamz * fac;
     745    xx += relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(0) * fac;
     746    yy += relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(1) * fac;
     747    return TRIDVECTOR(xx, yy, begamz * fac);
    741748 }
Note: See TracChangeset for help on using the changeset viewer.