Changeset 3204

Show
Ignore:
Timestamp:
11/04/11 14:19:04 (7 months ago)
Author:
farhi
Message:

Iso_Sqw: fixed error when save_sqw=1 under Windows. Inactivate for this system.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/nlib/samples/Isotropic_Sqw.comp

    r3198 r3204  
    195195*                     of the next component/detector). Use 0 for full space. 
    196196*                     This is only relevant for single scattering (order=1). 
    197 * save_sqw:     [1] When set to 1, saves S(q), S(w) and S(q,w) as monitors. 
     197* save_sqw:     [1] When set to 1, saves S(q), S(w) and S(q,w) as monitors. This option  
     198*                     is not available under Windows platforms. 
    198199* weight:   [g/mol] atomic/molecular weight of material 
    199200* density: [g/cm^3] density of material. V_rho=density/weight/1e24*N_A 
     
    13851386  VarSqw.q_max     = (qmax > 0 ? qmax : 0); 
    13861387  VarSqw.q_min     = (qmin > 0 ? qmin : 0); 
     1388   
     1389#ifdef WIN32 
     1390  save_sqw=0; /* SAVE Sqw generates mem error under windows (probably dynamic memory allocation) */ 
     1391#endif 
    13871392/* end INITIALIZE */ 
    13881393%} 
     
    19791984%{ 
    19801985  int  k; 
     1986   
     1987  /* save_sqw=0 forced under Windows  
     1988     SAVE Sqw generates mem error under windows (probably dynamic memory allocation) */ 
    19811989 
    19821990  if (VarSqw.s_coh > 0 || VarSqw.s_inc > 0) 
     
    19932001    Data_sqw =  (k == 0 ? VarSqw.Data_coh : VarSqw.Data_inc); 
    19942002 
    1995     if (save_sqw && Data_sqw.intensity) { 
     2003    if (save_sqw && Data_sqw.intensity && Data_sqw.nb_q && Data_sqw.nb_w) { 
    19962004      double SW[Data_sqw.nb_w]; 
    19972005      double SQW[Data_sqw.nb_q][Data_sqw.nb_w];