Changeset 3a48772 in sasmodels for sasmodels/models/vesicle.c
- Timestamp:
- Oct 14, 2016 5:23:40 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a5b6997
- Parents:
- b716cc6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/vesicle.c
r2c74c11 r3a48772 8 8 { 9 9 //note that for the vesicle model, the volume is ONLY the shell volume 10 double volume; 11 volume =4.*M_PI*(radius+thickness)*(radius+thickness)*(radius+thickness)/3; 12 volume -=4.*M_PI*radius*radius*radius/3.; 13 return volume; 10 return M_4PI_3*(cube(radius+thickness) - cube(radius)); 14 11 } 15 12 … … 32 29 // core first, then add in shell 33 30 contrast = sld_solvent-sld; 34 vol = 4.0*M_PI/3.0*radius*radius*radius;35 f = vol *sph_j1c(q*radius)*contrast;31 vol = M_4PI_3*cube(radius); 32 f = vol * sph_j1c(q*radius) * contrast; 36 33 37 34 //now the shell. No volume normalization as this is done by the caller 38 35 contrast = sld-sld_solvent; 39 vol = 4.0*M_PI/3.0*(radius+thickness)*(radius+thickness)*(radius+thickness);40 f += vol *sph_j1c(q*(radius+thickness))*contrast;36 vol = M_4PI_3*cube(radius+thickness); 37 f += vol * sph_j1c(q*(radius+thickness)) * contrast; 41 38 42 39 //rescale to [cm-1]. 43 f2 = volfraction *f*f*1.0e-4;40 f2 = volfraction * f*f*1.0e-4; 44 41 45 return (f2);42 return f2; 46 43 }
Note: See TracChangeset
for help on using the changeset viewer.