Changeset 940aca7 in sasview for sansmodels


Ignore:
Timestamp:
May 19, 2012 10:17:02 AM (13 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
baa915c
Parents:
d225e32
Message:

Merge 2.1.1 into trunk

Location:
sansmodels/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/libigor/libStructureFactor.c

    r67424cd r940aca7  
    77#include "StandardHeaders.h"                    // Include ANSI headers, Mac headers, IgorXOP.h, XOP.h and XOPSupport.h 
    88#include "libStructureFactor.h" 
    9  
    10 static double gMSAWave[17]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}; 
    119 
    1210//Hard Sphere Structure Factor 
     
    177175HayterPenfoldMSA(double dp[], double q) 
    178176{ 
     177  double gMSAWave[17]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}; 
    179178        double Elcharge=1.602189e-19;           // electron charge in Coulombs (C) 
    180179        double kB=1.380662e-23;                         // Boltzman constant in J/K 
     
    231230         
    232231        ierr=0; 
    233         ierr=sqcoef(ierr); 
     232        ierr=sqcoef(ierr, gMSAWave); 
    234233        if (ierr>=0) { 
    235                 SofQ=sqhcal(Qdiam); 
     234                SofQ=sqhcal(Qdiam, gMSAWave); 
    236235        }else{ 
    237236        //SofQ=NaN; 
     
    269268// 
    270269int 
    271 sqcoef(int ir) 
     270sqcoef(int ir, double gMSAWave[]) 
    272271{        
    273272        int itm=40,ix,ig,ii; 
    274273        double acc=5.0E-6,del,e1,e2,f1,f2; 
    275          
     274 
    276275        //      WAVE gMSAWave = $"root:HayPenMSA:gMSAWave" 
    277276        f1=0;           //these were never properly initialized... 
     
    284283                gMSAWave[16]=gMSAWave[4]; 
    285284                ix=1; 
    286                 ir = sqfun(ix,ir); 
     285                ir = sqfun(ix,ir,gMSAWave); 
    287286                gMSAWave[14]=gMSAWave[15]; 
    288287                gMSAWave[4]=gMSAWave[16]; 
     
    310309                        gMSAWave[16]=e1; 
    311310                        ix=2; 
    312                         ir = sqfun(ix,ir); 
     311                        ir = sqfun(ix,ir,gMSAWave); 
    313312                        f1=gMSAWave[15]; 
    314313                        e1=gMSAWave[16]; 
     
    317316                        gMSAWave[16]=e2; 
    318317                        ix=2; 
    319                         ir = sqfun(ix,ir); 
     318                        ir = sqfun(ix,ir,gMSAWave); 
    320319                        f2=gMSAWave[15]; 
    321320                        e2=gMSAWave[16]; 
     
    327326                gMSAWave[16]=e2; 
    328327                ix=4; 
    329                 ir = sqfun(ix,ir); 
     328                ir = sqfun(ix,ir,gMSAWave); 
    330329                gMSAWave[14]=gMSAWave[15]; 
    331330                e2=gMSAWave[16]; 
     
    338337        gMSAWave[16]=gMSAWave[4]; 
    339338        ix=3; 
    340         ir = sqfun(ix,ir); 
     339        ir = sqfun(ix,ir,gMSAWave); 
    341340        gMSAWave[14]=gMSAWave[15]; 
    342341        gMSAWave[4]=gMSAWave[16]; 
     
    349348 
    350349int 
    351 sqfun(int ix, int ir) 
     350sqfun(int ix, int ir, double gMSAWave[]) 
    352351{        
    353352        double acc=1.0e-6; 
     
    712711 
    713712double 
    714 sqhcal(double qq) 
     713sqhcal(double qq, double gMSAWave[]) 
    715714{        
    716715    double SofQ,etaz,akz,gekz,e24,x1,x2,ck,sk,ak2,qk,q2k,qk2,qk3,qqk,sink,cosk,asink,qcosk,aqk,inter;            
    717716        //      WAVE gMSAWave = $"root:HayPenMSA:gMSAWave" 
    718          
     717 
    719718        etaz = gMSAWave[10]; 
    720719        akz =  gMSAWave[12]; 
  • sansmodels/src/libigor/libStructureFactor.h

    r67424cd r940aca7  
    1010 
    1111//function prototypes 
    12 double sqhcal(double qq); 
    13 int sqfun(int ix, int ir); 
    14 int sqcoef(int ir); 
     12double sqhcal(double qq, double gMSAWave[]); 
     13int sqfun(int ix, int ir, double gMSAWave[]); 
     14int sqcoef(int ir, double gMSAWave[]); 
  • sansmodels/src/sans/models/media/model_functions.html

    r57eab9e r940aca7  
    57495749<p class="MsoNormal">The contrast is defined as SLD(core) 
    57505750– SLD(shell) or 
    5751 SLD(shell – solvent). In the parameters, equat_core = equatorial radius 
    5752 of the 
    5753 core, polar_core = polar radius of the core, equat_shell = r<sub>min</sub> 
    5754 (or 
    5755 equatorial radius of the shell), and polar_shell = = r<sub>maj</sub> 
    5756 (or polar radius 
    5757 of the shell).</p> 
     5751SLD(shell – solvent). In the parameters, equat_core = equatorial core radius,  
     5752polar_core = polar core radius, equat_shell = r<sub>min</sub> 
     5753(or equatorial outer radius), and polar_shell = = r<sub>maj</sub> 
     5754(or polar outer radius).</p> 
    57585755<p class="MsoNormal">&nbsp;</p> 
    57595756<p class="MsoNormal">For P*S: The 2<sup>nd</sup> 
Note: See TracChangeset for help on using the changeset viewer.