source: sans/XOP_Dev/SANSAnalysis/lib/libSANSAnalysis.h @ 834

Last change on this file since 834 was 834, checked in by srkline, 11 years ago

Changes to the XOP code to upgrade to ToolKit? v6. Changes are the ones outlined in the Appendix A of the TK6 manual. SOme of the XOP support routines and the #pragma for 2-byte structures have changed. Per Howard Rodstein, there is no need to change the c files to cpp. c should work and compile just fine.

These changes work correctly on my mac. Next is to make sure that they work correctly on the two build machines.

File size: 7.8 KB
Line 
1/*
2 *  libSANSAnalysis.h
3 *  SANSAnalysis
4 *
5 *  Created by Andrew Jackson on 4/24/07.
6 *  Copyright 2007 __MyCompanyName__. All rights reserved.
7 *
8 */
9
10#include "libCylinder.h"
11#include "libSphere.h"
12#include "libStructureFactor.h"
13#include "libTwoPhase.h"
14#include "2Y_OneYukawa.h"
15#include "2Y_TwoYukawa.h"
16
17/*This should not be necessary AJJ May 09*/
18/* IGOR Fit Functions */
19/*
20double CylinderForm(double dp[], double q);
21double EllipCyl76(double dp[], double q);
22double EllipCyl20(double dp[], double q);
23double TriaxialEllipsoid(double dp[], double q);
24double Parallelepiped(double dp[], double q);
25double HollowCylinder(double dp[], double q);
26double EllipsoidForm(double dp[], double q);
27double Cyl_PolyRadius(double dp[], double q);
28double Cyl_PolyLength(double dp[], double q);
29double CoreShellCylinder(double dp[], double q);
30double OblateForm(double dp[], double q);
31double ProlateForm(double dp[], double q);
32double FlexExclVolCyl(double dp[], double q);
33double FlexCyl_PolyLen(double dp[], double q);
34double FlexCyl_PolyRad(double dp[], double q);
35double FlexCyl_Ellip(double dp[], double q);
36double PolyCoShCylinder(double dp[], double q);
37double StackedDiscs(double dp[], double q);
38double LamellarFF(double dp[], double q);
39double LamellarFF_HG(double dp[], double q);
40double LamellarPS(double dp[], double q);
41double LamellarPS_HG(double dp[], double q);
42//
43double Lamellar_ParaCrystal(double dp[], double q);
44double Spherocylinder(double dp[], double q);
45double ConvexLens(double dp[], double q);
46double Dumbbell(double dp[], double q);
47double CappedCylinder(double dp[], double q);
48double Barbell(double dp[], double q);
49double PolyCoreBicelle(double dp[], double q);
50*/
51
52/* internal functions */
53/*
54double CylKernel(double qq, double rr,double h, double theta);
55double NR_BessJ1(double x);
56double EllipCylKernel(double qq, double ra,double nu, double theta);
57double TriaxialKernel(double q, double aa, double bb, double cc, double dx, double dy);
58double PPKernel(double aa, double mu, double uu);
59double HolCylKernel(double qq, double rcore, double rshell, double length, double dum);
60double EllipsoidKernel(double qq, double a, double va, double dum);
61double Cyl_PolyRadKernel(double q, double radius, double length, double zz, double delrho, double dumRad);
62double SchulzPoint_cpr(double dumRad, double radius, double zz);
63double Cyl_PolyLenKernel(double q, double radius, double len_avg, double zz, double delrho, double dumLen);
64double CoreShellCylKernel(double qq, double rcore, double thick, double rhoc, double rhos, double rhosolv, double length, double dum);
65double gfn4(double xx, double crmaj, double crmin, double trmaj, double trmin, double delpc, double delps, double qq);
66double gfn2(double xx, double crmaj, double crmin, double trmaj, double trmin, double delpc, double delps, double qq);
67double FlePolyLen_kernel(double q, double radius, double length, double lb, double zz, double delrho, double zi);
68double FlePolyRad_kernel(double q, double ravg, double Lc, double Lb, double zz, double delrho, double zi);
69double EllipticalCross_fn(double qq, double a, double b);
70double CScyl(double qq, double rad, double radthick, double facthick, double rhoc, double rhos, double rhosolv, double length, double dum);
71double CSCylIntegration(double qq, double rad, double radthick, double facthick, double rhoc, double rhos, double rhosolv, double length);
72double Stackdisc_kern(double qq, double rcore, double rhoc, double rhol, double rhosolv, double length, double thick, double dum, double gsd, double d, double N);
73double BicelleKernel(double qq, double rad, double radthick, double facthick, double rhoc, double rhoh, double rhor, double rhosolv, double length, double dum);
74double BicelleIntegration(double qq, double rad, double radthick, double facthick, double rhoc, double rhoh, double rhor, double rhosolv, double length);
75*/
76
77
78//
79/* IGOR Fit Functions */
80/*
81double MultiShell(double dp[], double q);
82double PolyMultiShell(double dp[], double q);
83double SphereForm(double dp[], double q);
84double CoreShellForm(double dp[], double q);
85double PolyCoreForm(double dp[], double q);
86double PolyCoreShellRatio(double dp[], double q);
87double VesicleForm(double dp[], double q);
88double SchulzSpheres(double dp[], double q);
89double PolyRectSpheres(double dp[], double q);
90double PolyHardSphereIntensity(double dp[], double q);
91double BimodalSchulzSpheres(double dp[], double q);
92double GaussPolySphere(double dp[], double q);
93double LogNormalPolySphere(double dp[], double q);
94double BinaryHS(double dp[], double q);
95double BinaryHS_PSF11(double dp[], double q);
96double BinaryHS_PSF12(double dp[], double q);
97double BinaryHS_PSF22(double dp[], double q);
98//
99double OneShell(double dp[], double q);
100double TwoShell(double dp[], double q);
101double ThreeShell(double dp[], double q);
102double FourShell(double dp[], double q);
103double PolyOneShell(double dp[], double q);
104double PolyTwoShell(double dp[], double q);
105double PolyThreeShell(double dp[], double q);
106double PolyFourShell(double dp[], double q);
107double BCC_ParaCrystal(double dp[], double q);
108double FCC_ParaCrystal(double dp[], double q);
109double SC_ParaCrystal(double dp[], double q);
110
111//function prototypes
112double F_func(double qr);
113double MultiShellGuts(double q,double rcore,double ts,double tw,double rhocore,double rhoshel,int num);
114double fnt2(double yy, double zz);
115double fnt3(double yy, double pp, double zz);
116double SchulzSphere_Fn(double scale, double ravg, double pd, double rho, double rhos, double x);
117int ashcroft(double qval, double r2, double nf2, double aa, double phi, double *s11, double *s22, double *s12);
118
119
120////
121double HardSphereStruct(double dp[], double q);
122double SquareWellStruct(double dp[], double q);
123double StickyHS_Struct(double dp[], double q);
124double HayterPenfoldMSA(double dp[], double q);
125double DiamCyl(double a, double b);
126double DiamEllip(double a, double b);
127double sqhcal(double qq);
128int sqfun(int ix, int ir);
129int sqcoef(int ir);
130*/
131////
132/* IGOR Fit Functions */
133/*
134double TeubnerStreyModel(double dp[], double q);
135double Power_Law_Model(double dp[], double q);
136double Peak_Lorentz_Model(double dp[], double q);
137double Peak_Gauss_Model(double dp[], double q);
138double Lorentz_Model(double dp[], double q);
139double Fractal(double dp[], double q);
140double DAB_Model(double dp[], double q);
141double OneLevel(double dp[], double q);
142double TwoLevel(double dp[], double q);
143double ThreeLevel(double dp[], double q);
144double FourLevel(double dp[], double q);
145//
146double BroadPeak(double dp[], double q);
147double CorrLength(double dp[], double q);
148double TwoLorentzian(double dp[], double q);
149double TwoPowerLaw(double dp[], double q);
150double PolyGaussCoil(double dp[], double q);
151double GaussLorentzGel(double dp[], double q);
152double GaussianShell(double dp[], double q);
153*/
154
155// since the XOP and the library are separate chunks of compiled code
156// it is imperative to set ALL the structure alignments to be two-byte
157// rather than leave it to the whim of the compiler
158/* SRK08
159#pragma pack(2)
160 
161typedef struct {
162    double scale;
163    double radius;
164    double length;
165    double contrast;
166        double background;   
167    double cyl_theta;
168    double cyl_phi;   
169} CylinderParameters;
170
171typedef struct {
172    double scale;
173    double radius;
174    double length;
175    double contrast;
176        double background;
177    double cyl_theta;
178    double cyl_phi;
179    double sigma_theta;
180    double sigma_phi;
181    double sigma_radius;
182} SmearCylinderParameters;
183
184#pragma pack()
185
186/// 1D scattering function
187double cylinder_analytical_1D(CylinderParameters *pars, double q);
188/// 2D scattering function
189double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi);
190/// 1D scattering function
191double smeared_cylinder_analytical_1D(SmearCylinderParameters *pars, double q);
192/// 2D scattering function
193double dist_cylinder_2D(double pars[], double q, double phi);
194double smeared_cylinder_analytical_2D(SmearCylinderParameters *pars, double q, double phi);
195double smeared_cylinder_dist( double x, double mean, double sigma );
196*/
Note: See TracBrowser for help on using the repository browser.