Skip to content

Commit

Permalink
Footwork for correction of McStasMcXtrace#1733
Browse files Browse the repository at this point in the history
  • Loading branch information
willend committed Oct 11, 2024
1 parent 587f785 commit 1004777
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mcstas-comps/misc/MCPL_input.comp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ INITIALIZE
}
mcset_ncount(nparticles);

if(repeat_count>0 && v_smear==0 && pos_smear==0 && dir_smear==0) {
if(repeat_count>1 && v_smear==0 && pos_smear==0 && dir_smear==0) {
fprintf(stdout, "\n\n WARNING: You have requested a repeat_count=%i but have left all *_smear parameters at 0!\n --> This is not allowed! Resetting to repeat_count=1!\n",repeat_count);
fprintf(stderr, "\n\n WARNING: You have requested a repeat_count=%i but have left all *_smear parameters at 0!\n --> This is not allowed! Resetting to repeat_count=1!\n",repeat_count);
repeat_count=1;
Expand Down
10 changes: 10 additions & 0 deletions mcxtrace-comps/misc/MCPL_input.comp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ INITIALIZE
printf("Message(%s): MCPL file (%s) produced with %s.\n",NAME_CURRENT_COMP,filename,mcpl_hdr_srcname(inputfile));
printf("Message(%s): MCPL file (%s) contains %lu particles.\n",NAME_CURRENT_COMP,filename,(long unsigned)nparticles);
}
mcset_ncount(nparticles);

if(repeat_count>1 && E_smear==0 && pos_smear==0 && dir_smear==0) {
fprintf(stdout, "\n\n WARNING: You have requested a repeat_count=%i but have left all *_smear parameters at 0!\n --> This is not allowed! Resetting to repeat_count=1!\n",repeat_count);
fprintf(stderr, "\n\n WARNING: You have requested a repeat_count=%i but have left all *_smear parameters at 0!\n --> This is not allowed! Resetting to repeat_count=1!\n",repeat_count);
repeat_count=1;
sleep(10);
}

if(repeat_count==0) repeat_count=1;
repeat_cnt = repeat_count;
ismpislave=0;
#if defined (USE_MPI)
Expand Down

0 comments on commit 1004777

Please sign in to comment.