Changeset 299dcce in sasmodels


Ignore:
Timestamp:
Apr 15, 2016 11:57:58 AM (9 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
0ceca73
Message:

Spherical_SLD adjustments to a new infrastructure - not working yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/spherical_sld.c

    r391ea92 r299dcce  
    223223 */ 
    224224double Iq(double q, 
    225     int n_shells, double thick_inter_0, int func_inter_0, double core0_sld, double solvent_sld, 
    226     double flat1_sld, double flat2_sld, double flat3_sld, double flat4_sld, double flat5_sld, 
    227     double flat6_sld, double flat7_sld, double flat8_sld, double flat9_sld, double flat10_sld, 
    228     double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
    229     double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
    230     double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
    231     double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
    232     int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
    233     int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
    234     double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
    235     double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
    236     int npts_inter, double nu_inter_0, double rad_core_0) { 
     225    int n_shells, 
     226    double thick_inter[], 
     227    double func_inter[], 
     228    double sld_core, 
     229    double sld_solvent, 
     230    double sld_flat[], 
     231    double thick_flat[], 
     232    double nu_inter[], 
     233    int npts_inter, 
     234    double core_radius 
     235    ) { 
    237236 
    238237    //printf("Number of points %d\n",npts_inter); 
     
    245244    dp[2] = thick_inter_0; 
    246245    dp[3] = func_inter_0; 
    247     dp[4] = core0_sld; 
    248     dp[5] = solvent_sld; 
     246    dp[4] = sld_core; 
     247    dp[5] = sld_solvent; 
    249248    dp[6] = 0.0; 
    250249 
    251     dp[7] = flat1_sld; 
    252     dp[8] = flat2_sld; 
    253     dp[9] = flat3_sld; 
    254     dp[10] = flat4_sld; 
    255     dp[11] = flat5_sld; 
    256     dp[12] = flat6_sld; 
    257     dp[13] = flat7_sld; 
    258     dp[14] = flat8_sld; 
    259     dp[15] = flat9_sld; 
    260     dp[16] = flat10_sld; 
    261  
    262     dp[17] = thick_inter_1; 
    263     dp[18] = thick_inter_2; 
    264     dp[19] = thick_inter_3; 
    265     dp[20] = thick_inter_4; 
    266     dp[21] = thick_inter_5; 
    267     dp[22] = thick_inter_6; 
    268     dp[23] = thick_inter_7; 
    269     dp[24] = thick_inter_8; 
    270     dp[25] = thick_inter_9; 
    271     dp[26] = thick_inter_10; 
    272  
    273     dp[27] = thick_flat_1; 
    274     dp[28] = thick_flat_2; 
    275     dp[29] = thick_flat_3; 
    276     dp[30] = thick_flat_4; 
    277     dp[31] = thick_flat_5; 
    278     dp[32] = thick_flat_6; 
    279     dp[33] = thick_flat_7; 
    280     dp[34] = thick_flat_8; 
    281     dp[35] = thick_flat_9; 
    282     dp[36] = thick_flat_10; 
    283  
    284     dp[37] = func_inter_1; 
    285     dp[38] = func_inter_2; 
    286     dp[39] = func_inter_3; 
    287     dp[40] = func_inter_4; 
    288     dp[41] = func_inter_5; 
    289     dp[42] = func_inter_6; 
    290     dp[43] = func_inter_7; 
    291     dp[44] = func_inter_8; 
    292     dp[45] = func_inter_9; 
    293     dp[46] = func_inter_10; 
    294  
    295     dp[47] = nu_inter_1; 
    296     dp[48] = nu_inter_2; 
    297     dp[49] = nu_inter_3; 
    298     dp[50] = nu_inter_4; 
    299     dp[51] = nu_inter_5; 
    300     dp[52] = nu_inter_6; 
    301     dp[53] = nu_inter_7; 
    302     dp[54] = nu_inter_8; 
    303     dp[55] = nu_inter_9; 
    304     dp[56] = nu_inter_10; 
     250    for (i=0; i<n; i++){ 
     251        dp[i+7] = sld_flat[i]; 
     252        dp[i+17] = thick_inter[i]; 
     253        dp[i+27] = thick_flat[i]; 
     254        dp[i+37] = func_inter[i]; 
     255        dp[i+47] = nu_inter[i]; 
     256    } 
    305257 
    306258    dp[57] = npts_inter; 
     
    320272 */ 
    321273double Iqxy(double qx, double qy, 
    322     int n_shells, double thick_inter_0, int func_inter_0, double core0_sld, double solvent_sld, 
    323     double flat1_sld, double flat2_sld, double flat3_sld, double flat4_sld, double flat5_sld, 
    324     double flat6_sld, double flat7_sld, double flat8_sld, double flat9_sld, double flat10_sld, 
    325     double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
    326     double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
    327     double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
    328     double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
    329     int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
    330     int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
    331     double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
    332     double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
    333     int npts_inter, double nu_inter_0, double rad_core_0) { 
     274    int n_shells, 
     275    double thick_inter[], 
     276    double func_inter[], 
     277    double sld_core, 
     278    double sld_solvent, 
     279    double sld_flat[], 
     280    double thick_flat[], 
     281    double nu_inter[], 
     282    int npts_inter, 
     283    double core_radius 
     284    ) { 
    334285 
    335286    double q = sqrt(qx*qx + qy*qy); 
Note: See TracChangeset for help on using the changeset viewer.