Changeset 435 in PSPA for Interface_Web/trunk
- Timestamp:
- Nov 25, 2013, 11:11:05 AM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc
r434 r435 14 14 particleBeam::particleBeam() { 15 15 P0Transport_ = 0.0; 16 clear(); 16 17 particleRepresentationOk_ = false; 17 18 momentRepresentationOk_ = false; … … 233 234 234 235 double gref = referenceParticle_.getGamma() - 1.0; 235 double P_reference_MeV_sur_c = sqrt( gref*(gref+2) ); 236 237 double P_reference_MeV_sur_c = gref*(gref+2); 238 239 if ( P_reference_MeV_sur_c > 0.0 ) P_reference_MeV_sur_c = sqrt( P_reference_MeV_sur_c ); 240 else P_reference_MeV_sur_c = 0.0; 236 241 237 242 cout << " gref = " << gref << " P_reference_MeV_sur_c = " << P_reference_MeV_sur_c << endl; … … 266 271 begamz = begam.getComponent(2); 267 272 g = gamma -1.0; 268 PMeVsc = sqrt( g*(g+2) ); 269 del = 100.0 * ( PMeVsc - P_reference_MeV_sur_c ) / P_reference_MeV_sur_c ; // en % 273 PMeVsc = g*(g+2); 274 if ( PMeVsc > 0.) PMeVsc = sqrt( PMeVsc ); 275 else PMeVsc = 0.0; 276 277 278 270 279 271 280 // dz = begamz * cdt / gamma; … … 274 283 275 284 part[0] = positionDeployee.getComponent(0); 276 part[1] = begam.getComponent(0)/begamz;277 285 part[2] = positionDeployee.getComponent(1); 278 part[3] = begam.getComponent(1)/begamz;279 286 part[4] = positionDeployee.getComponent(2); 280 part[5] = del; 287 288 if ( begamz == 0.0 ) { 289 part[1] = 0.0; 290 part[3] = 0.0; 291 } else { 292 part[1] = begam.getComponent(0)/begamz; 293 part[3] = begam.getComponent(1)/begamz; 294 } 295 296 if ( P_reference_MeV_sur_c > 0.0 ) { 297 del = 100.0 * ( PMeVsc - P_reference_MeV_sur_c ) / P_reference_MeV_sur_c ; // en % 298 part[5] = del; 299 } else { 300 if ( PMeVsc > 0.0 ) part[5] = 100.; 301 else part[5] = 0.0; 302 } 281 303 282 304 for ( j = 0; j < 6; j++) { … … 285 307 { 286 308 auxm = part.at(m) - centroid_.at(m); 287 288 309 ( matrice.at(j) ).at(m) += auxj*auxm; 289 // ( rij_transportMoments_.at(j) ).at(m) += auxj*auxm;290 291 292 // cout << " j= " << j << " m= " << m << " rjm= " << ( rij_transportMoments_.at(j) ).at(m) << endl;293 310 } 294 311 } … … 299 316 double facmoy = 1.0/double( relativePartic_.size() ); 300 317 for ( j = 0; j < 6; j++) { 301 ( matrice.at(j) ).at(j) = sqrt(( matrice.at(j) ).at(j) * facmoy ); 318 double aux = ( matrice.at(j) ).at(j); 319 if ( aux > 0.0 ) ( matrice.at(j) ).at(j) = sqrt(aux * facmoy ); 320 else ( matrice.at(j) ).at(j) = 0.0; 302 321 } 303 322 … … 306 325 for (m=0; m < j; m++) { 307 326 auxm = ( matrice.at(m) ).at(m); 308 ( matrice.at(j) ).at(m) *= facmoy/(auxj * auxm); 309 } 327 if ( auxm != 0.0 && auxj != 0.0 ) ( matrice.at(j) ).at(m) *= facmoy/(auxj * auxm); 328 else ( matrice.at(j) ).at(m) = 0.0; 329 } 310 330 } 311 331 -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r434 r435 27 27 #include <Wt/WMessageBox> 28 28 29 #define HAS_IMAGEMAGIC 129 //#define HAS_IMAGEMAGIC 1 30 30 31 31 using namespace Wt::Chart; -
Interface_Web/trunk/pspaWT/workingArea/pspa.save
r304 r435 1 1 globals 2 2 2998.65 1 100000 10 3 lattice 4 CIRCULAR 0 0 0 3 5 rfgun 4 6 rfgun01
Note: See TracChangeset
for help on using the changeset viewer.