Ignore:
Timestamp:
Sep 30, 2016 9:07:16 AM (8 years ago)
Author:
butler
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:
a807206
Parents:
6e5b2a7
Message:

Updating parameter names regarding #649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_ellipsoid_xt.c

    re7678b2 r2222134  
    1 double form_volume(double equat_core, 
     1double form_volume(double radius_equat_core, 
    22                   double polar_core, 
    33                   double equat_shell, 
    44                   double polar_shell); 
    55double Iq(double q, 
    6           double equat_core, 
     6          double radius_equat_core, 
    77          double x_core, 
    8           double t_shell, 
     8          double thick_shell, 
    99          double x_polar_shell, 
    1010          double core_sld, 
     
    1414 
    1515double Iqxy(double qx, double qy, 
    16           double equat_core, 
     16          double radius_equat_core, 
    1717          double x_core, 
    18           double t_shell, 
     18          double thick_shell, 
    1919          double x_polar_shell, 
    2020          double core_sld, 
     
    2525 
    2626 
    27 double form_volume(double equat_core, 
     27double form_volume(double radius_equat_core, 
    2828                   double x_core, 
    29                    double t_shell, 
     29                   double thick_shell, 
    3030                   double x_polar_shell) 
    3131{ 
    32     const double equat_shell = equat_core + t_shell; 
    33     const double polar_shell = equat_core*x_core + t_shell*x_polar_shell; 
     32    const double equat_shell = radius_equat_core + thick_shell; 
     33    const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 
    3434    double vol = 4.0*M_PI/3.0*equat_shell*equat_shell*polar_shell; 
    3535    return vol; 
     
    3838static double 
    3939core_shell_ellipsoid_xt_kernel(double q, 
    40           double equat_core, 
     40          double radius_equat_core, 
    4141          double x_core, 
    42           double t_shell, 
     42          double thick_shell, 
    4343          double x_polar_shell, 
    4444          double core_sld, 
     
    5555 
    5656 
    57     const double polar_core = equat_core*x_core; 
    58     const double equat_shell = equat_core + t_shell; 
    59     const double polar_shell = equat_core*x_core + t_shell*x_polar_shell; 
     57    const double polar_core = radius_equat_core*x_core; 
     58    const double equat_shell = radius_equat_core + thick_shell; 
     59    const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 
    6060 
    6161    for(int i=0;i<N_POINTS_76;i++) { 
    6262        double zi = ( Gauss76Z[i]*(uplim-lolim) + uplim + lolim )/2.0; 
    6363        double yyy = Gauss76Wt[i] * gfn4(zi, 
    64                                   equat_core, 
     64                                  radius_equat_core, 
    6565                                  polar_core, 
    6666                                  equat_shell, 
     
    8181static double 
    8282core_shell_ellipsoid_xt_kernel_2d(double q, double q_x, double q_y, 
    83           double equat_core, 
     83          double radius_equat_core, 
    8484          double x_core, 
    85           double t_shell, 
     85          double thick_shell, 
    8686          double x_polar_shell, 
    8787          double core_sld, 
     
    106106    const double cos_val = cyl_x*q_x + cyl_y*q_y; 
    107107 
    108     const double polar_core = equat_core*x_core; 
    109     const double equat_shell = equat_core + t_shell; 
    110     const double polar_shell = equat_core*x_core + t_shell*x_polar_shell; 
     108    const double polar_core = radius_equat_core*x_core; 
     109    const double equat_shell = radius_equat_core + thick_shell; 
     110    const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 
    111111 
    112112    // Call the IGOR library function to get the kernel: 
    113113    // MUST use gfn4 not gf2 because of the def of params. 
    114114    double answer = gfn4(cos_val, 
    115                   equat_core, 
     115                  radius_equat_core, 
    116116                  polar_core, 
    117117                  equat_shell, 
     
    128128 
    129129double Iq(double q, 
    130           double equat_core, 
     130          double radius_equat_core, 
    131131          double x_core, 
    132           double t_shell, 
     132          double thick_shell, 
    133133          double x_polar_shell, 
    134134          double core_sld, 
     
    137137{ 
    138138    double intensity = core_shell_ellipsoid_xt_kernel(q, 
    139            equat_core, 
     139           radius_equat_core, 
    140140           x_core, 
    141            t_shell, 
     141           thick_shell, 
    142142           x_polar_shell, 
    143143           core_sld, 
     
    150150 
    151151double Iqxy(double qx, double qy, 
    152           double equat_core, 
     152          double radius_equat_core, 
    153153          double x_core, 
    154           double t_shell, 
     154          double thick_shell, 
    155155          double x_polar_shell, 
    156156          double core_sld, 
     
    163163    q = sqrt(qx*qx+qy*qy); 
    164164    double intensity = core_shell_ellipsoid_xt_kernel_2d(q, qx/q, qy/q, 
    165                        equat_core, 
     165                       radius_equat_core, 
    166166                       x_core, 
    167                        t_shell, 
     167                       thick_shell, 
    168168                       x_polar_shell, 
    169169                       core_sld, 
Note: See TracChangeset for help on using the changeset viewer.