Changeset ed23abe in sasmodels


Ignore:
Timestamp:
Oct 18, 2016 9:45:37 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c3ebc71
Parents:
6f676fb
Message:

hollow_cylinder: fix errors introduced by code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_cylinder.c

    r5bddd89 red23abe  
    1111_hollow_cylinder_scaling(double integrand, double delrho, double volume) 
    1212{ 
    13     return 1.0e-4 * square(volume * delrho * integrand); 
     13    return 1.0e-4 * square(volume * delrho) * integrand; 
    1414} 
    1515 
     
    3232form_volume(double radius, double thickness, double length) 
    3333{ 
    34     double v_shell = M_PI*length*((radius+thickness)*(radius+thickness)-radius*radius); 
    35     return(v_shell); 
     34    double v_shell = M_PI*length*(square(radius+thickness) - radius*radius); 
     35    return v_shell; 
    3636} 
    3737 
     
    5050        const double inter = _hollow_cylinder_kernel(q, radius, thickness, length, 
    5151                                                     sin_val, cos_val); 
    52         summ += Gauss76Wt[i] * inter; 
     52        summ += Gauss76Wt[i] * inter * inter; 
    5353    } 
    5454 
     
    6969 
    7070    const double vol = form_volume(radius, thickness, length); 
    71     return _hollow_cylinder_scaling(Aq, solvent_sld-sld, vol); 
     71    return _hollow_cylinder_scaling(Aq*Aq, solvent_sld-sld, vol); 
    7272} 
    7373 
    74  
Note: See TracChangeset for help on using the changeset viewer.