Changeset a42fec0 in sasmodels for Kernel


Ignore:
Timestamp:
Aug 4, 2014 5:20:07 PM (11 years ago)
Author:
HMP1 <helen.park@…>
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:
8cdb9f1
Parents:
099e053
Message:

Speed-up of 3X, compare.py working

Location:
Kernel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Kernel/Kernel-CapCyl.cpp

    r099e053 ra42fec0  
    4242        answer/=sin(alpha); 
    4343 
    44         _ptvalue[i] = rad_cyl_weight*length_weight*rad_cap_weight*theta_weight*phi_weight*vol_i*answer; 
     44        _ptvalue[i] += rad_cyl_weight*length_weight*rad_cap_weight*theta_weight*phi_weight*vol_i*answer; 
    4545     //   if (size>1) { 
    4646   //         _ptvalue[i] *= fabs(cos(thet*pi/180.0)); 
  • Kernel/Kernel-CoreShellCylinder.cpp

    r099e053 ra42fec0  
    4444        answer *= answer/(pi*(radius+thickness)*(radius+thickness)*(length+2.0*thickness))*1.0e8*scale; 
    4545 
    46         _ptvalue[i] = radius_weight*length_weight*thickness_weight*theta_weight*phi_weight*answer*pow(radius+thickness,2)*(length+2.0*thickness); 
     46        _ptvalue[i] += radius_weight*length_weight*thickness_weight*theta_weight*phi_weight*answer*pow(radius+thickness,2)*(length+2.0*thickness); 
    4747     //   if (size>1) { 
    4848       // _ptvalue[i] *= fabs(cos(axis_theta*pi/180.0)); 
  • Kernel/Kernel-Cylinder.cpp

    r099e053 ra42fec0  
    4242        real answer = sub*sub*form*acos(-1.0)*rr*rr*h*1.0e8*scale; 
    4343 
    44         _ptvalue[i] = radius_weight*length_weight*theta_weight*phi_weight*answer*pow(rr,2)*h; 
     44        _ptvalue[i] += radius_weight*length_weight*theta_weight*phi_weight*answer*pow(rr,2)*h; 
     45 
    4546       // if (size>1) { 
    4647         //   _ptvalue[i] *= fabs(cos(cyl_theta*pi/180.0)); 
  • Kernel/Kernel-Ellipse.cpp

    r099e053 ra42fec0  
    2020         ret*=ret*9.0*sub*sub*4.0/3.0*acos(-1.0)*radius_b*radius_b*radius_a*scale*(1.0e8); 
    2121 
    22          _ptvalue[i] = radius_a_weight*radius_b_weight*axis_theta_weight*radius_a*axis_phi_weight*ret*pow(radius_b, 2); 
     22         _ptvalue[i] += radius_a_weight*radius_b_weight*axis_theta_weight*radius_a*axis_phi_weight*ret*pow(radius_b, 2); 
    2323         //if(size > 1){ 
    2424          //  _ptvalue[i] *= fabs(cos(axis_theta*pi/180.0)); 
  • Kernel/Kernel-TriaxialEllipse.cpp

    r099e053 ra42fec0  
    3232        answer*=answer*sub*sub*4.0*pi/3.0*axisA*axisB*axisC*1.0e8*scale; 
    3333 
    34         _ptvalue[i] = axisA_weight*axisB_weight*axisC_weight*theta_weight*phi_weight*psi_weight*answer*axisA*axisB*axisC; 
     34        _ptvalue[i] += axisA_weight*axisB_weight*axisC_weight*theta_weight*phi_weight*psi_weight*answer*axisA*axisB*axisC; 
    3535       // if (size>1) 
    3636         //   _ptvalue[i] *= fabs(cos(theta*pi/180.0)); 
Note: See TracChangeset for help on using the changeset viewer.