Changeset fa227d3 in sasmodels
- Timestamp:
- Apr 25, 2016 12:29:14 PM (9 years ago)
- 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. - Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r4d76711 re1454ab 79 79 COMPILE = " ".join((CC, LN)) 80 80 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" 82 84 if "SAS_OPENMP" in os.environ: 83 85 COMPILE = COMPILE + " -fopenmp" … … 85 87 COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 86 88 87 DLL_PATH = tempfile.gettempdir() 89 # Assume the default location of module DLLs is within the sasmodel directory. 90 DLL_PATH = os.path.join(os.path.split(os.path.realpath(__file__))[0], "models", "dll") 88 91 89 92 ALLOW_SINGLE_PRECISION_DLLS = True … … 103 106 basename += "128" 104 107 return joinpath(DLL_PATH, basename+'.so') 105 106 108 107 109 def make_dll(source, model_info, dtype="double"): … … 143 145 source_files = generate.model_sources(model_info) + [model_info['filename']] 144 146 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): 147 151 # Replace with a proper temp file 148 152 fid, filename = tempfile.mkstemp(suffix=".c", prefix=tempfile_prefix) -
setup.py
rf903f0a re1454ab 1 import os 1 2 from setuptools import setup,find_packages 3 4 # Create the model .so's 5 os.system("python gen_so.py") 2 6 3 7 packages = find_packages(exclude=['contrib', 'docs', 'tests*']) … … 5 9 'sasmodels.models': ['*.c','lib/*.c'], 6 10 'sasmodels': ['*.c'], 11 'sasmodels.models.dll': ['*.so'], 7 12 } 8 13 required = [] -
sasmodels/models/core_multi_shell.c
rf7930be rabdd01c 182 182 if (r == r0) { 183 183 // no thickness, so nothing to add 184 } else if (fabs(A[i]) < 1 e-16 || sld_out[i] == sld_in[i]) {184 } else if (fabs(A[i]) < 1.0e-16 || sld_out[i] == sld_in[i]) { 185 185 f -= f_constant(q, r0, sld_in[i]); 186 186 f += f_constant(q, r, sld_in[i]); 187 } else if (fabs(A[i]) < 1 e-4) {187 } else if (fabs(A[i]) < 1.0e-4) { 188 188 const double slope = (sld_out[i] - sld_in[i])/thickness[i]; 189 189 f -= f_linear(q, r0, sld_in[i], slope); -
sasmodels/models/core_shell_parallelepiped.c
r44bd2be rabdd01c 48 48 double a_scaled = a_side / b_side; 49 49 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 53 51 // DelRho values (note that drC is not used later) 54 52 double dr0 = core_sld-solvent_sld; -
sasmodels/models/elliptical_cylinder.c
r43b7eea rabdd01c 87 87 88 88 const double vol = form_volume(r_minor, r_ratio, length); 89 return answer*vol*vol*1 e-4;89 return answer*vol*vol*1.0e-4; 90 90 } 91 91 -
sasmodels/models/onion.c
rfdb1487 rabdd01c 80 80 if (r == r0) { 81 81 // no thickness, so nothing to add 82 } else if (fabs(A[i]) < 1 e-16 || sld_out[i] == sld_in[i]) {82 } else if (fabs(A[i]) < 1.0e-16 || sld_out[i] == sld_in[i]) { 83 83 f -= f_constant(q, r0, sld_in[i]); 84 84 f += f_constant(q, r, sld_in[i]); 85 } else if (fabs(A[i]) < 1 e-4) {85 } else if (fabs(A[i]) < 1.0e-4) { 86 86 const double slope = (sld_out[i] - sld_in[i])/thickness[i]; 87 87 f -= f_linear(q, r0, sld_in[i], slope); -
sasmodels/models/rpa.c
r13ed84c rabdd01c 39 39 Phia=Phib=0.0000001; 40 40 Kab=Kac=Kad=Kbc=Kbd=-0.0004; 41 La=Lb=1 e-12;41 La=Lb=1.0e-12; 42 42 va=vb=100.0; 43 43 ba=bb=5.0; … … 45 45 Phia=0.0000001; 46 46 Kab=Kac=Kad=-0.0004; 47 La=1 e-12;47 La=1.0e-12; 48 48 va=100.0; 49 49 ba=5.0;
Note: See TracChangeset
for help on using the changeset viewer.