Changeset fa227d3 in sasmodels


Ignore:
Timestamp:
Apr 25, 2016 12:29:14 PM (9 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:
3a45c2c, bfdfb23
Parents:
abdd01c (diff), e1454ab (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:sasview/sasmodels

Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    r4d76711 re1454ab  
    7979            COMPILE = " ".join((CC, LN)) 
    8080    else: 
    81         COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
     81        # fPIC is unused on windows 
     82        # COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
     83        COMPILE = "gcc -shared -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    8284        if "SAS_OPENMP" in os.environ: 
    8385            COMPILE = COMPILE + " -fopenmp" 
     
    8587    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    8688 
    87 DLL_PATH = tempfile.gettempdir() 
     89# Assume the default location of module DLLs is within the sasmodel directory. 
     90DLL_PATH = os.path.join(os.path.split(os.path.realpath(__file__))[0], "models", "dll") 
    8891 
    8992ALLOW_SINGLE_PRECISION_DLLS = True 
     
    103106        basename += "128" 
    104107    return joinpath(DLL_PATH, basename+'.so') 
    105  
    106108 
    107109def make_dll(source, model_info, dtype="double"): 
     
    143145    source_files = generate.model_sources(model_info) + [model_info['filename']] 
    144146    dll = dll_path(model_info, dtype) 
    145     newest = max(os.path.getmtime(f) for f in source_files) 
    146     if not os.path.exists(dll) or os.path.getmtime(dll) < newest: 
     147 
     148    #newest = max(os.path.getmtime(f) for f in source_files) 
     149    #if not os.path.exists(dll) or os.path.getmtime(dll) < newest: 
     150    if not os.path.exists(dll): 
    147151        # Replace with a proper temp file 
    148152        fid, filename = tempfile.mkstemp(suffix=".c", prefix=tempfile_prefix) 
  • setup.py

    rf903f0a re1454ab  
     1import os 
    12from setuptools import setup,find_packages 
     3 
     4# Create the model .so's 
     5os.system("python gen_so.py") 
    26 
    37packages = find_packages(exclude=['contrib', 'docs', 'tests*']) 
     
    59    'sasmodels.models': ['*.c','lib/*.c'], 
    610    'sasmodels': ['*.c'], 
     11    'sasmodels.models.dll': ['*.so'], 
    712} 
    813required = [] 
  • sasmodels/models/core_multi_shell.c

    rf7930be rabdd01c  
    182182    if (r == r0) { 
    183183      // no thickness, so nothing to add 
    184     } else if (fabs(A[i]) < 1e-16 || sld_out[i] == sld_in[i]) { 
     184    } else if (fabs(A[i]) < 1.0e-16 || sld_out[i] == sld_in[i]) { 
    185185      f -= f_constant(q, r0, sld_in[i]); 
    186186      f += f_constant(q, r, sld_in[i]); 
    187     } else if (fabs(A[i]) < 1e-4) { 
     187    } else if (fabs(A[i]) < 1.0e-4) { 
    188188      const double slope = (sld_out[i] - sld_in[i])/thickness[i]; 
    189189      f -= f_linear(q, r0, sld_in[i], slope); 
  • sasmodels/models/core_shell_parallelepiped.c

    r44bd2be rabdd01c  
    4848    double a_scaled = a_side / b_side; 
    4949    double c_scaled = c_side / b_side; 
    50     double arim_scaled = arim_thickness / b_side; 
    51     double brim_scaled = brim_thickness / b_side; 
    52         
     50 
    5351    // DelRho values (note that drC is not used later)        
    5452        double dr0 = core_sld-solvent_sld; 
  • sasmodels/models/elliptical_cylinder.c

    r43b7eea rabdd01c  
    8787 
    8888    const double vol = form_volume(r_minor, r_ratio, length); 
    89     return answer*vol*vol*1e-4; 
     89    return answer*vol*vol*1.0e-4; 
    9090} 
    9191 
  • sasmodels/models/onion.c

    rfdb1487 rabdd01c  
    8080    if (r == r0) { 
    8181      // no thickness, so nothing to add 
    82     } else if (fabs(A[i]) < 1e-16 || sld_out[i] == sld_in[i]) { 
     82    } else if (fabs(A[i]) < 1.0e-16 || sld_out[i] == sld_in[i]) { 
    8383      f -= f_constant(q, r0, sld_in[i]); 
    8484      f += f_constant(q, r, sld_in[i]); 
    85     } else if (fabs(A[i]) < 1e-4) { 
     85    } else if (fabs(A[i]) < 1.0e-4) { 
    8686      const double slope = (sld_out[i] - sld_in[i])/thickness[i]; 
    8787      f -= f_linear(q, r0, sld_in[i], slope); 
  • sasmodels/models/rpa.c

    r13ed84c rabdd01c  
    3939    Phia=Phib=0.0000001; 
    4040    Kab=Kac=Kad=Kbc=Kbd=-0.0004; 
    41     La=Lb=1e-12; 
     41    La=Lb=1.0e-12; 
    4242    va=vb=100.0; 
    4343    ba=bb=5.0; 
     
    4545    Phia=0.0000001; 
    4646    Kab=Kac=Kad=-0.0004; 
    47     La=1e-12; 
     47    La=1.0e-12; 
    4848    va=100.0; 
    4949    ba=5.0; 
Note: See TracChangeset for help on using the changeset viewer.