Ignore:
Timestamp:
Nov 1, 2010 4:22:12 PM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
4b3d25b
Parents:
6cda91f
Message:

new models and some bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/onion.c

    r339ce67 r0164899a  
    11/** 
    2  * Scattering model for a sphere 
     2 * Scattering model for a onion 
    33 */ 
    44 
     
    77#include <stdio.h> 
    88#include <stdlib.h> 
    9  
     9// some details can be found in sld_cal.c 
    1010double so_kernel(double dp[], double q) { 
    1111        int n = dp[0]; 
     
    107107 
    108108                        vol = 4.0 * pi / 3.0 * r * r * r; 
    109                         if (j == 1 && fabs(sld_in[i]-sld_solv) < 1e-04*fabs(sld_solv) && A[i]==0.0){ 
    110                                 vol_sub += (vol_pre - vol); 
    111                         } 
     109                        //if (j == 1 && fabs(sld_in[i]-sld_solv) < 1e-04*fabs(sld_solv) && A[i]==0.0){ 
     110                        //      vol_sub += (vol_pre - vol); 
     111                        //} 
    112112                        f += vol * (contr * (fun) + (sld_in[i]-slope[i]) * bes); 
    113113                        } 
     
    148148                                } 
    149149                            vol = 4.0 * pi / 3.0 * r * r * r; 
    150                             if (j == 1 && fabs(sld_in[i]-sld_solv) < 1e-04*fabs(sld_solv) && fun_type[i]==0){ 
    151                                 vol_sub += (vol_pre - vol); 
    152                             } 
     150                            //if (j == 1 && fabs(sld_in[i]-sld_solv) < 1e-04*fabs(sld_solv) && fun_type[i]==0){ 
     151                            //  vol_sub += (vol_pre - vol); 
     152                            //} 
    153153                            f += vol * (bes * contr + fun * slope[i]); 
    154154                            } 
     
    157157 
    158158        } 
    159     vol += vol_sub; 
     159    //vol += vol_sub; 
    160160    f2 = f * f / vol * 1.0e8; 
    161161        f2 *= scale; 
Note: See TracChangeset for help on using the changeset viewer.