Changeset 2901
- Timestamp:
- 07/14/10 15:12:20 (19 months ago)
- Location:
- branches/mcstas-1.x/lib/optics
- Files:
-
- 4 modified
-
Monochromator_pol.comp (modified) (2 diffs)
-
Pol_bender.comp (modified) (3 diffs)
-
Pol_guide_vmirror.comp (modified) (3 diffs)
-
Pol_mirror.comp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/mcstas-1.x/lib/optics/Monochromator_pol.comp
r1641 r2901 87 87 DECLARE 88 88 %{ 89 #include <assert.h> 89 /*#include <assert.h> - debugging only */ 90 90 91 91 double mos_rms; /* root-mean-square of mosaic, in radians */ … … 177 177 printf("S_out: (%f, %f, %f)\n", sx, sy, sz); 178 178 179 assert(sx*sx+sy*sy+sz*sz <= 1);179 /* assert(sx*sx+sy*sy+sz*sz <= 1); */ 180 180 181 181 SCATTER; -
branches/mcstas-1.x/lib/optics/Pol_bender.comp
r1669 r2901 109 109 SHARE 110 110 %{ 111 #include <assert.h> 111 /* #include <assert.h> - debugging use only */ 112 112 %include "pol-lib" 113 113 %include "ref-lib" … … 439 439 440 440 // check that refWeight is meaningfull 441 assert(weight>=0 && weight<=1);441 /* assert(weight>=0 && weight<=1); */ 442 442 443 443 if(isPolarising) … … 463 463 const double lengthOfGuide = sin(length/radius)*radius; 464 464 const double slitWidth = xw/nslits; 465 assert(lengthOfGuide>0);465 /* assert(lengthOfGuide>0); */ 466 466 double R = 0; /* radius of arc */ 467 467 int nSlitsMax = nslits; -
branches/mcstas-1.x/lib/optics/Pol_guide_vmirror.comp
r1660 r2901 77 77 SHARE 78 78 %{ 79 #include <assert.h> 79 /* #include <assert.h> - debugging use only */ 80 80 %include "pol-lib" 81 81 %include "ref-lib" … … 341 341 rUpFunc(fabs(Q), rUpParPtr, &Rup); 342 342 rDownFunc(fabs(Q), rDownParPtr, &Rdown); 343 assert(Rup>=0 && Rup<=1 && Rdown>=0 && Rdown<=1);343 /* assert(Rup>=0 && Rup<=1 && Rdown>=0 && Rdown<=1); */ 344 344 345 345 GetMonoPolFNFM(Rup, Rdown, &FN, &FM); 346 346 GetMonoPolRefProb(FN, FM, sy, &refWeight); 347 assert(refWeight>=0 && refWeight<=1); // check that refWeight is meaningfull347 /* assert(refWeight>=0 && refWeight<=1); // check that refWeight is meaningfull */ 348 348 349 349 if (rand01()<refWeight) { … … 358 358 } 359 359 360 assert(sx*sx+sy*sy+sz*sz<=1); // check that polarisation is meaningfull360 /* assert(sx*sx+sy*sy+sz*sz<=1); // check that polarisation is meaningfull */ 361 361 } 362 362 -
branches/mcstas-1.x/lib/optics/Pol_mirror.comp
r1657 r2901 88 88 SHARE 89 89 %{ 90 #include <assert.h> 90 /* #include <assert.h> - debugging use only */ 91 91 %include "pol-lib" 92 92 %include "ref-lib" … … 148 148 // calculate scattering vector magnitude 149 149 Q = fabs(2*vx*V2K); 150 assert(Q>=0);150 /* assert(Q>=0); */ 151 151 152 152 // calculate reflection probability … … 163 163 164 164 // check that refWeight is meaningfull 165 assert(refWeight>=0 && refWeight<=1);165 /* assert(refWeight>=0 && refWeight<=1); */ 166 166 167 167 // find out if neutrons is reflected or transmitted … … 191 191 } 192 192 193 assert(reflect==0 || reflect==1);193 /* assert(reflect==0 || reflect==1); */ 194 194 195 195 // set outgoing velocity and polarisation … … 207 207 } 208 208 209 if(isPolarising)209 /*if(isPolarising) 210 210 assert(sx*sx+sy*sy+sz*sz<=1); // check that polarisation is meaningfull 211 211 */ 212 212 213 SCATTER; 213 214 } /* End intersect the mirror */
