Skip to content

Commit ecea492

Browse files
committed
Fixes for mcstas-antlr
1 parent 8254cf3 commit ecea492

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

mcstas-comps/contrib/Fermi_chop2a.comp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ SHARE
5151

5252
/*routine to calculate x and y positions of a neutron in a fermi chopper */
5353
#pragma acc routine
54-
void neutxypos(double *x, double *y, double phi, double inrad,double c[])
54+
void neutxypos(double *x, double *y, double phi, double inrad, double* c)
5555
{
5656
*x=c[0]+inrad*cos(phi);
5757
*y=c[1]+inrad*sin(phi);
5858
}
5959

6060
/* routine to calculate the origin of a circle that describes the neutron path through the chopper */
6161
#pragma acc routine
62-
void calccenter(double c[],double zr[], double xr[]){
62+
void calccenter(double* c, double* zr, double* xr){
6363
double denom, A,B,C,D,a,b;
6464
denom=2*(-zr[0]*xr[2] +zr[0]*xr[1]+ zr[1]*xr[2]+xr[0]*zr[2]-xr[0]*zr[1] - xr[1]*zr[2]);
6565
A=xr[1]-xr[2];B=xr[0]-xr[1];C=zr[2]-zr[1];D=zr[1]-zr[0];
@@ -85,7 +85,7 @@ SHARE
8585
* return 0 if neutron does not transmit return 1 with channel number if neutron will pass*/
8686
#pragma acc routine
8787
int checkabsorb(double phi,int *chan_num, double inrad,double inw, double insw,
88-
double inbw, double blader, double off, double c[]){
88+
double inbw, double blader, double off, double* c){
8989
double xtmp,neuzr,neuxr;
9090
neutxypos(&neuzr,&neuxr,phi,inrad,c);
9191
// printf("xr:%g zr:%g phi: %g r: %g c[0]: %g c[1]: %g\n",neuxr,neuzr,phi,inrad,c[0],c[1]);

mcstas-comps/contrib/SNS_source.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ SHARE %{
5858
/* ----------------------------------------------------------------
5959
routine to load E, I and t I data from SNS source files
6060
-----------------------------------------------------------------*/
61-
void sns_source_load(char fname[], double *xvec, double *yvec, int xcol, int ycol,
61+
void sns_source_load(char* fname, double *xvec, double *yvec, int xcol, int ycol,
6262
int *veclenptr, double *tcol, double *Ecol, double **Imat,int *ntvals, int *nEvals)
6363
{
6464
FILE *fp;

mcstas-comps/contrib/Vertical_T0a.comp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ SHARE
4444

4545
/*routine to calculate x and y positions of a neutron in a fermi chopper */
4646
#pragma acc routine
47-
void neutxypos(double *x, double *y, double phi, double inrad,double c[])
47+
void neutxypos(double *x, double *y, double phi, double inrad, double* c)
4848
{
4949
*x=c[0]+inrad*cos(phi);
5050
*y=c[1]+inrad*sin(phi);
5151
}
5252

5353
/* routine to calculate the origin of a circle that describes the neutron path through the chopper */
5454
#pragma acc routine
55-
void calccenter(double c[],double zr[], double xr[]){
55+
void calccenter(double* c, double* zr, double* xr){
5656
double denom, A,B,C,D,a,b;
5757
denom=2*(-zr[0]*xr[2] +zr[0]*xr[1]+ zr[1]*xr[2]+xr[0]*zr[2]-xr[0]*zr[1] - xr[1]*zr[2]);
5858
A=xr[1]-xr[2];B=xr[0]-xr[1];C=zr[2]-zr[1];D=zr[1]-zr[0];
@@ -65,7 +65,7 @@ SHARE
6565
#endif
6666
/* function to calculate if the neutron is in the channel or not
6767
* return 0 if neutron does not transmit return 1 if neutron will pass*/
68-
int t0checkabsorb(double phi, double inrad,double inw1, double inw2, double c[]){
68+
int t0checkabsorb(double phi, double inrad,double inw1, double inw2, double* c){
6969
double xtmp,neuzr,neuxr;
7070
neutxypos(&neuzr,&neuxr,phi,inrad,c);
7171
// printf("xr:%g zr:%g phi: %g r: %g c[0]: %g c[1]: %g\n",neuxr,neuzr,phi,inrad,c[0],c[1]);

mcstas-comps/examples/SNS/SNS_ARCS/SNS_ARCS.instr

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,7 @@ COMPONENT mod=SNS_source(filename=filename,
119119
Emin=Emin,
120120
Emax=Emax)
121121
AT(0,0,-13.61) ABSOLUTE
122-
// COMPONENT mod=SNS_source(S_filename="source_sct521_bu_17_1.dat",
123-
// width=0.1,
124-
// height=0.12,
125-
// dist=2.5,
126-
// xw=0.1,
127-
// yh=0.12,
128-
// Emin=Emin,
129-
// Emax=Emax)
130-
// AT(0,0,0) ABSOLUTE
122+
131123
COMPONENT sourceMantid=Arm()
132124
AT(0,0,0) RELATIVE mod
133125
COMPONENT core_ves=Guide_channeled(w1=0.094285,h1=0.11323,w2=0.084684,h2=0.102362,l=1.2444,
@@ -186,8 +178,6 @@ COMPONENT Guide_1_3_3=Guide_channeled(w1=0.06440,h1=0.07609,w2=0.06342,h2=0.0744
186178
W=Gu_W,nslit=1,d=0.0,alphax=Gu_alpha,alphay=Gu_alpha)
187179
AT(0,0,8.04145) RELATIVE mod
188180

189-
/*COMPONENT T0_chopp=Arm()*/
190-
191181
COMPONENT t0_chopp=Vertical_T0a(len=0.474,w1=0.08,w2=0.101,nu=T0_nu,delta=0.0,tc=phase_T0,
192182
ymin=-0.045,ymax=0.045)
193183
AT(0,0,LT0)RELATIVE mod
@@ -219,10 +209,9 @@ COMPONENT Guide_2_1_5=Guide_channeled(w1=0.05745,h1=0.06417,w2=0.05637,h2=0.0622
219209
W=Gu_W,nslit=1,d=0.0,alphax=Gu_alpha,alphay=Gu_alpha)
220210
AT(0,0,11.08340) RELATIVE mod
221211

222-
COMPONENT fermi_chopp=Fermi_chop2a(len=0.10,w=0.06,ymin=-.0325,ymax=.0325,
212+
COMPONENT fermi_chopp=Fermi_chop2a(len=0.10,w=0.06,ymin=-.0325,ymax=.0325,
223213
nu=Fermi_nu,delta=0.0,tc=phasefc1
224214
,nchan=nchans,bw=0.0005,blader=nrad)
225-
/*COMPONENT fermi_chopp=Arm()*/
226215
AT (0,0,LF) RELATIVE mod
227216
/* COMPONENT Monitor1=TOF_monitor(xmin=-0.035,xmax=0.035,ymin=-0.035,ymax=0.035, */
228217
/* tmin=tplotmin, */

0 commit comments

Comments
 (0)