Changeset 314 in PSPA


Ignore:
Timestamp:
Feb 6, 2013, 1:30:07 PM (11 years ago)
Author:
lemeur
Message:

energie cinetique pour parmela sans rfgun

Location:
Interface_Web/trunk/pspaWT/sources/controler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/include/particleBeam.h

    r312 r314  
    3535
    3636
    37 
    38 
    3937  void impressionDesMoments() const;
    4038  void razDesMoments();
     
    5856  double getUnnormalizedEmittanceX();
    5957  double getP0Transport() const;
     58  double referenceKineticEnergyMeV() const;
    6059  bool particleRepresentationOk() const;
    6160  bool momentRepresentationOk() const;
  • Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc

    r313 r314  
    3232   GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
    3333   if (console) console->addConsoleMessage(message);
     34   pspa_->processEvents();
    3435}
    3536
  • Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc

    r312 r314  
    7474  return P0Transport_;
    7575}
     76
     77double particleBeam::referenceKineticEnergyMeV() const {
     78  if ( particleRepresentationOk_ ) {
     79    return (referenceParticle_.getGamma() -1.) * ERESTMeV;
     80  } else {
     81    double P0Norm = 1000.0 * P0Transport_ / ERESTMeV;
     82    double gamma = sqrt(1.0 +  P0Norm * P0Norm);
     83    return (gamma - 1.0) * ERESTMeV;
     84  }
     85}
     86
     87
    7688
    7789void particleBeam::set2Moments(beam2Moments& moments) {
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc

    r313 r314  
    4343  if ( !there_is_rfgun ) {
    4444    if ( !beamToParmela(workingDir, beamBefore ) ) return false;
    45     cout << " softwareParmela::createInputFile PROGRAMMER LA RECHERCHE D'EC " << endl;
    46     //    cerr << " dataManager::createInputFileParmela : the first element should be rfgun" << endl;
    47     //    return false;
     45    initalKineticEnergy = beamBefore->referenceKineticEnergyMeV();
    4846  }
    4947  else {
     
    10098  }
    10199  else {
     100    sortie << " successful launching of parmela " << endl;
    102101    cout << " execution parmela MARCHE " << endl;
    103     sortie << resultOfRun;
    104102    string::size_type nn = (resultOfRun).find("normal");
    105103    if ( nn == string::npos )
Note: See TracChangeset for help on using the changeset viewer.