Skip to content

Commit

Permalink
Merge pull request #1714 from g5t/issue-1713
Browse files Browse the repository at this point in the history
Fix contributed component type mismatches
  • Loading branch information
willend authored Sep 25, 2024
2 parents 3c5bb8e + ab0fd31 commit ee841a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mcstas-comps/contrib/Monochromator_bent.comp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ INITIALIZE
if (mosaicity && radius_x) monochromator.type = bent_mosaic;
if (!radius_x && !mosaicity) monochromator.type = flat;
// Read the designated plane of reflection, for use in the monochromator.
enum crystal_plane plane = stringToEnum(&plane_of_reflection);
enum crystal_plane plane = stringToEnum((const char *)&plane_of_reflection);
// Set Monochromator values
monochromator.length = zwidth; // [m]
monochromator.height = yheight; // [m]
Expand Down
11 changes: 4 additions & 7 deletions mcstas-comps/contrib/StatisticalChopper_Monitor.comp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,10 @@ SAVE
/* the detector file written by the Monitor_nD is stored in a 'MCDETECTOR detector' structure */

/* get back information from the StatisticalChopper */
int *m_ptr = COMP_GETPAR3(StatisticalChopper, comp, m); /* number of appertures in the sequence */
int m = *m_ptr;
int *nslit_ptr = COMP_GETPAR3(StatisticalChopper, comp, nslit); /* length of the sequence (number of possible slits around disk) */
int nslit = *nslit_ptr;
double *nu_ptr = COMP_GETPAR3(StatisticalChopper, comp, nu);
double nu = *nu_ptr;
int *Sequence= COMP_GETPAR3(StatisticalChopper, comp, Sequence);
int m = *COMP_GETPAR3(StatisticalChopper, comp, m); /* number of appertures in the sequence */
int nslit = *COMP_GETPAR3(StatisticalChopper, comp, nslit); /* length of the sequence (number of possible slits around disk) */
double nu = *COMP_GETPAR3(StatisticalChopper, comp, nu);
int *Sequence= *COMP_GETPAR3(StatisticalChopper, comp, Sequence);

double c = (double)(m-1)/(double)(nslit-1); /* duty cycle */
int f; /* number of periods in the detected time range */
Expand Down

0 comments on commit ee841a9

Please sign in to comment.