Changeset 9eb3632 in sasmodels for sasmodels/models


Ignore:
Timestamp:
Jul 23, 2016 12:54:17 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
7b7da6b
Parents:
6a0d6aa
Message:

restructure kernels using fixed PD loops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hardsphere.py

    rd2bb604 r9eb3632  
    7373    """ 
    7474 
    75 Iq = """ 
     75Iq = r""" 
    7676      double D,A,B,G,X,X2,X4,S,C,FF,HARDSPH; 
    7777      // these are c compiler instructions, can also put normal code inside the "if else" structure  
     
    8787      if(fabs(radius_effective) < 1.E-12) { 
    8888               HARDSPH=1.0; 
     89//printf("HS1 %g: %g\n",q,HARDSPH); 
    8990               return(HARDSPH); 
    9091      } 
     
    9899      if(X < 5.E-06) { 
    99100                 HARDSPH=1./A; 
     101//printf("HS2 %g: %g\n",q,HARDSPH); 
    100102                 return(HARDSPH); 
    101103      } 
     
    122124            //FF = (8 +2.*volfraction + ( volfraction/4. -0.8 +(volfraction/100. -1./35.)*X2 )*X2 )*A  + (3.0 -X2/3. +X4/40.)*2.*B; 
    123125            HARDSPH= 1./(1. + volfraction*FF ); 
     126//printf("HS3 %g: %g\n",q,HARDSPH); 
    124127            return(HARDSPH); 
    125128      } 
     
    146149//      FF=A*(S/X3-C/X2) + B*(2.*S/X3 - C/X2 +2.0*(C-1.0)/X4) + G*( (4./X -24./X3)*S -(1.0 -12./X2 +24./X4)*C +24./X4 )/X2; 
    147150//      HARDSPH= 1./(1. + 24.*volfraction*FF ); 
     151//printf("HS4 %g: %g\n",q,HARDSPH); 
    148152      return(HARDSPH); 
    149153   """ 
Note: See TracChangeset for help on using the changeset viewer.