- Timestamp:
- 06/03/11 17:45:51 (12 months ago)
- Location:
- branches/mcstas-1.x
- Files:
-
- 14 modified
-
CHANGES (modified) (2 diffs)
-
lib/contrib/ISIS_moderator.comp (modified) (1 diff)
-
lib/contrib/Source_multi_surfaces.comp (modified) (1 diff)
-
lib/contrib/Virtual_mcnp_input.comp (modified) (2 diffs)
-
lib/contrib/Virtual_tripoli4_input.comp (modified) (2 diffs)
-
lib/contrib/Virtual_tripoli4_output.comp (modified) (1 diff)
-
lib/misc/Progress_bar.comp (modified) (2 diffs)
-
lib/share/monitor_nd-lib.c (modified) (2 diffs)
-
lib/sources/ESS_moderator_long.comp (modified) (1 diff)
-
lib/sources/ESS_moderator_short.comp (modified) (1 diff)
-
lib/sources/Monitor_Optimizer.comp (modified) (1 diff)
-
lib/sources/Source_Maxwell_3.comp (modified) (1 diff)
-
lib/sources/Source_Optimizer.comp (modified) (4 diffs)
-
lib/sources/Virtual_input.comp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/mcstas-1.x/CHANGES
r3086 r3088 30 30 * Modified by: PW, EF, EK April 2nd 2009: version 1.12a 31 31 * Modified by: PW, EF, EK June/July 2010: version 1.12b 32 * Modified by: PW May 2011: version 1.12c32 * Modified by: PW May-June 2011: version 1.12c (re-release) 33 33 * 34 * This file is part of McStas version 1.12c, released May 24th, 2011.34 * This file is part of McStas version 1.12c, released June 3rd, 2011. 35 35 * It gives a 'changes' list from the beginning of the project 36 36 * 37 37 *******************************************************************************/ 38 Changes in McStas v1.12c, May 24rd, 201138 Changes in McStas v1.12c, June 3rd, 2011 39 39 40 40 McStas 1.12c is bugfix release. … … 45 45 - Fix of a bug in the rectangular focusing routine, reported to mcstas-users by Markos Skoulatos, HZB 46 46 (see http://mailman.mcstas.org/pipermail/mcstas-users/2010q4/000845.html) 47 - Introduction of --ncount as unsigned long long int in place of double. Could potentially lead simulations to "hang" 47 - Introduction of --ncount as unsigned long long int in place of double. Using double could potentially lead 48 simulations to "hang". A re-release of McStas 1.12c was done due to bugs in components related to the new 49 type returned from mcget_ncount. 48 50 49 51 Tools -
branches/mcstas-1.x/lib/contrib/ISIS_moderator.comp
r2699 r3088 878 878 } 879 879 880 Nsim= mcget_ncount();880 Nsim=(double)mcget_ncount(); 881 881 Bcnt=0; 882 882 // CH4 face 1 (north) -
branches/mcstas-1.x/lib/contrib/Source_multi_surfaces.comp
r1734 r3088 287 287 288 288 /*generate p_in*/ 289 p_in = 1 /mcget_ncount();289 p_in = 1.0/mcget_ncount(); 290 290 291 291 %} -
branches/mcstas-1.x/lib/contrib/Virtual_mcnp_input.comp
r2171 r3088 370 370 n_count_extrapolated); 371 371 if (n_count_extrapolated > mcget_ncount()) 372 printf(" (will use only %.3g %% of file)\n", 100 *mcget_ncount()/n_count_extrapolated);372 printf(" (will use only %.3g %% of file)\n", 100.0*mcget_ncount()/n_count_extrapolated); 373 373 else 374 374 printf(" (limiting simulation to %g neutrons)\n", n_count_extrapolated*repeat_count); … … 527 527 if (verbose) { 528 528 printf("MCNP_input: %s: \n", NAME_CURRENT_COMP); 529 printf(" %g neutrons generated\n", mcget_ncount());529 printf(" %g neutrons generated\n", (double)mcget_ncount()); 530 530 } 531 531 } -
branches/mcstas-1.x/lib/contrib/Virtual_tripoli4_input.comp
r2171 r3088 387 387 n_count_extrapolated, (long)nbatch_extrapolated, nsize); 388 388 if (n_count_extrapolated > mcget_ncount()) 389 printf(" (will use only %.3g %% of file)\n", 100 *mcget_ncount()/n_count_extrapolated);389 printf(" (will use only %.3g %% of file)\n", 100.0*mcget_ncount()/n_count_extrapolated); 390 390 else 391 391 printf(" (limiting simulation to %g neutrons)\n", n_count_extrapolated*repeat_count); … … 582 582 if (verbose) { 583 583 printf("Tripoli4_input: %s: \n", NAME_CURRENT_COMP); 584 printf(" %g neutrons generated\n", mcget_ncount());584 printf(" %g neutrons generated\n", (double)mcget_ncount()); 585 585 printf(" %d read batch (B) of intial %d neutrons (N)\n",nbatch, nsize); 586 586 if (nbatch && nsize && intensity && !intensity_extrapolated) -
branches/mcstas-1.x/lib/contrib/Virtual_tripoli4_output.comp
r2230 r3088 117 117 fprintf(hfile,"TAILLE Unknown\n"); 118 118 fprintf(hfile,"PARTICULE NEUTRON\n"); 119 fprintf(hfile,"INTENSITE %g\n", mcget_ncount());119 fprintf(hfile,"INTENSITE %g\n",(double)mcget_ncount()); 120 120 fprintf(hfile,"SIMULATION PROTECTION\n"); 121 121 fprintf(hfile,"Following lines are: type, energy in MeV, position = (x,y,z) in cm, direction = (u,v,w), statistical weight\n"); -
branches/mcstas-1.x/lib/misc/Progress_bar.comp
r2822 r3088 80 80 if (difftime(NowTime,StartTime) > 10) { /* wait 10 sec before writing ETA */ 81 81 EndTime = StartTime + (time_t)(difftime(NowTime,StartTime) 82 *mcget_ncount()/ncount);82 *(double)mcget_ncount()/ncount); 83 83 IntermediateCnts = 0; 84 84 fprintf(stdout, "\nTrace ETA "); … … 97 97 || (percent && !minutes && ncount >= IntermediateCnts)) ) 98 98 { 99 fprintf(stdout, "%d ", (int)(ncount*100 /mcget_ncount())); fflush(stdout);99 fprintf(stdout, "%d ", (int)(ncount*100.0/mcget_ncount())); fflush(stdout); 100 100 CurrentTime = NowTime; 101 101 IntermediateCnts = ncount + percent*mcget_ncount()/100; -
branches/mcstas-1.x/lib/share/monitor_nd-lib.c
r3066 r3088 799 799 if (mc_mn_Vars->Intermediate < 0) mc_mn_Vars->Intermediate = 0; 800 800 if (mc_mn_Vars->Intermediate > 1) mc_mn_Vars->Intermediate /= 100; 801 mc_mn_Vars->IntermediateCnts = mc_mn_Vars->Intermediate* mcget_ncount();801 mc_mn_Vars->IntermediateCnts = mc_mn_Vars->Intermediate*(double)mcget_ncount(); 802 802 803 803 if (mc_mn_Vars->Flag_Verbose) … … 1119 1119 double mc_mn_ratio; 1120 1120 1121 mc_mn_ratio = 100 *mcget_run_num()/mcget_ncount();1121 mc_mn_ratio = 100.0*mcget_run_num()/mcget_ncount(); 1122 1122 if (mc_mn_Vars->Flag_per_cm2 && mc_mn_Vars->area && mc_mn_Vars->Flag_Verbose) 1123 1123 printf("Monitor_nD: %s: detector area is %g [cm2]\n", -
branches/mcstas-1.x/lib/sources/ESS_moderator_long.comp
r2899 r3088 139 139 w_mult = size*size*1.0e4; /* source area correction */ 140 140 w_mult *= l_range; /* wavelength range correction */ 141 w_mult *= 1 /mcget_ncount(); /* Correct for number of rays */141 w_mult *= 1.0/mcget_ncount(); /* Correct for number of rays */ 142 142 w_mult *= 50.0/3.0; /* Correct for baseline frequency setting */ 143 143 %} -
branches/mcstas-1.x/lib/sources/ESS_moderator_short.comp
r2168 r3088 130 130 w_mult = size*size*1.0e4; /* source area correction */ 131 131 w_mult *= l_range; /* wavelength range correction */ 132 w_mult *= 1 /mcget_ncount(); /* Flux value */132 w_mult *= 1.0/mcget_ncount(); /* Flux value */ 133 133 %} 134 134 -
branches/mcstas-1.x/lib/sources/Monitor_Optimizer.comp
r1309 r3088 107 107 && (Vars->Phase == DEFS->PHASE_GET_REF)) 108 108 { 109 if (((Vars->Reference_Counts >mcget_ncount()*Vars->dstep) && (Vars->Monitor_Counts >= Vars->nbins*10))110 || (Vars->Monitor_Counts >= Vars->nbins*100) || (Vars->Reference_Counts > 2 *mcget_ncount()*Vars->dstep))109 if (((Vars->Reference_Counts > (double)mcget_ncount()*Vars->dstep) && (Vars->Monitor_Counts >= Vars->nbins*10)) 110 || (Vars->Monitor_Counts >= Vars->nbins*100) || (Vars->Reference_Counts > 2.0*mcget_ncount()*Vars->dstep)) 111 111 { 112 112 Vars->Phase_Counts_R = 0; /* enough counts on monitor */ -
branches/mcstas-1.x/lib/sources/Source_Maxwell_3.comp
r2168 r3088 86 86 w_mult = w_source*h_source*1.0e4; /* source area correction */ 87 87 w_mult *= l_range; /* wavelength range correction */ 88 w_mult *= 1 /mcget_ncount(); /* correct for # neutron rays */88 w_mult *= 1.0/mcget_ncount(); /* correct for # neutron rays */ 89 89 90 90 if (w_source <0 || h_source < 0 || l_low <= 0 || l_high <= 0 || dist <= 0 || T1 <= 0 || T2 <= 0|| T3 <= 0) { -
branches/mcstas-1.x/lib/sources/Source_Optimizer.comp
r1562 r3088 540 540 if (Vars.nbins*10 < Vars.Phase_Counts) Vars.Phase_Counts_L = Vars.nbins*100; /* need at least 10 counts per bin for Limits */ 541 541 else Vars.Phase_Counts_L = (long)(mcget_ncount() * Vars.dstep / 4); 542 Vars.Phase_Counts_R = mcget_ncount();543 Vars.Phase_Counts = mcget_ncount();542 Vars.Phase_Counts_R = (double)mcget_ncount(); 543 Vars.Phase_Counts = (double)mcget_ncount(); 544 544 Vars.keep_target = Vars.dkeep; 545 545 Vars.dkeep = 0.5; … … 1425 1425 printf("Source_Optimizer: Vars.Normal_Monitor_Counts = %i, Vars.Total_Monitor_Counts = %i \n",Vars.Normal_Monitor_Counts, Vars.Total_Monitor_Counts); 1426 1426 if (Vars.Normal_Monitor_Counts != 0) 1427 printf("Source_Optimizer: Optimizer speedup : %.3g \n", (double)(Vars.Total_Monitor_Counts/(Vars.Normal_Monitor_Counts*mcget_ncount()/Vars.Phase_Counts)));1427 printf("Source_Optimizer: Optimizer speedup : %.3g \n", (double)(Vars.Total_Monitor_Counts/(Vars.Normal_Monitor_Counts*(double)mcget_ncount()/Vars.Phase_Counts))); 1428 1428 printf("Source_Optimizer: Number of redirections : %i\n",Vars.n_redirect); 1429 1429 printf("Counts : reference = %i, passing = %i, monitor = %.1f\n", Vars.Reference_Counts, Vars.Passing_Counts, Vars.Monitor_Counts); … … 1470 1470 fprintf(hfile,"# ylabel: 'Counts'\n"); 1471 1471 if (Vars.Normal_Monitor_Counts != 0) 1472 fprintf(hfile,"# Optimizer speedup estimate: %.3g [Monitor Normal counts %i (extrapolated), Optimized %i ]\n", (double)(Vars.Total_Monitor_Counts/(Vars.Normal_Monitor_Counts*mcget_ncount()/Vars.Phase_Counts)),(long)ceil(Vars.Normal_Monitor_Counts*mcget_ncount()/Vars.Phase_Counts), Vars.Total_Monitor_Counts);1472 fprintf(hfile,"# Optimizer speedup estimate: %.3g [Monitor Normal counts %i (extrapolated), Optimized %i ]\n", (double)(Vars.Total_Monitor_Counts/(Vars.Normal_Monitor_Counts*(double)mcget_ncount()/Vars.Phase_Counts)),(long)ceil(Vars.Normal_Monitor_Counts*(double)mcget_ncount()/Vars.Phase_Counts), Vars.Total_Monitor_Counts); 1473 1473 1474 1474 fprintf(hfile,"# Optimizer options: "); … … 1486 1486 fprintf(hfile,"\n"); 1487 1487 1488 fprintf(hfile,"# Redirected neutrons: %i (%.2f %%)\n",Vars.n_redirect,(double)(100 *Vars.n_redirect/mcget_ncount()));1488 fprintf(hfile,"# Redirected neutrons: %i (%.2f %%)\n",Vars.n_redirect,(double)(100.0*Vars.n_redirect/mcget_ncount())); 1489 1489 fprintf(hfile,"# data: Optimized Source (%.1f Counts, Flux %.4g)\n", Vars.Monitor_Counts, Vars.Monitor_Flux); 1490 1490 for (Vars.index = 0; Vars.index < Vars.nbins; Vars.index++) -
branches/mcstas-1.x/lib/sources/Virtual_input.comp
r2077 r3088 312 312 } else { 313 313 double tmp; 314 tmp = mcget_ncount()/file_ncount;314 tmp = (double)mcget_ncount()/file_ncount; 315 315 if (fabs(rint(tmp)/tmp-1) > 0.02) 316 316 printf("Warning: Virtual_input: %s: simulation finished in the middle of file '%s'\n" … … 318 318 " Intensities may be wrong.\n" 319 319 " Increase ncount value to %g or higher.\n", 320 NAME_CURRENT_COMP, file,mcget_ncount(), file_ncount, file_ncount*repeat_cnt);320 NAME_CURRENT_COMP, file, (double)mcget_ncount(), file_ncount, file_ncount*repeat_cnt); 321 321 if (mcget_ncount() < file_ncount*repeat_cnt) 322 322 printf("Warning: Virtual_input: %s: not all source %s repetitions were generated.\n"
