Show
Ignore:
Timestamp:
07/14/10 15:12:20 (23 months ago)
Author:
pkwi
Message:

The use of assert causes problems in some installations - and should be used for debugging purposes only.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mcstas-1.x/lib/optics/Pol_mirror.comp

    r1657 r2901  
    8888SHARE 
    8989%{ 
    90 #include <assert.h> 
     90/* #include <assert.h> - debugging use only */ 
    9191  %include "pol-lib" 
    9292  %include "ref-lib" 
     
    148148    // calculate scattering vector magnitude 
    149149    Q = fabs(2*vx*V2K);  
    150     assert(Q>=0); 
     150    /* assert(Q>=0); */ 
    151151     
    152152    // calculate reflection probability 
     
    163163     
    164164    // check that refWeight is meaningfull 
    165     assert(refWeight>=0 && refWeight<=1);  
     165    /* assert(refWeight>=0 && refWeight<=1); */ 
    166166     
    167167    // find out if neutrons is reflected or transmitted 
     
    191191    }  
    192192 
    193     assert(reflect==0 || reflect==1); 
     193    /* assert(reflect==0 || reflect==1); */ 
    194194 
    195195    // set outgoing velocity and polarisation 
     
    207207    }  
    208208     
    209     if(isPolarising) 
     209    /*if(isPolarising) 
    210210      assert(sx*sx+sy*sy+sz*sz<=1); // check that polarisation is meaningfull 
    211      
     211    */ 
     212 
    212213    SCATTER; 
    213214  } /* End intersect the mirror */