ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 0b12abb5 was
c724ccd,
checked in by Jae Cho <jhjcho@…>, 15 years ago
|
More models added and correction of Wrappergenerator on model parameter value precision
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[25579e8] | 1 | /** |
---|
[5eb9154] | 2 | * SquareWell Structure factor |
---|
[25579e8] | 3 | * @author: Jae Hie Cho / UTK |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #include "HayterMSA.h" |
---|
| 7 | #include "libStructureFactor.h" |
---|
| 8 | #include <math.h> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | /** |
---|
| 12 | * Function to evaluate 1D scattering function |
---|
| 13 | * @param pars: parameters of the HayterPenfoldMSA |
---|
| 14 | * @param q: q-value |
---|
| 15 | * @return: function value |
---|
| 16 | */ |
---|
[8b677ec] | 17 | |
---|
[25579e8] | 18 | double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q) { |
---|
| 19 | double dp[6]; |
---|
[42ae1d9] | 20 | //Hayer takes diameter. |
---|
[8b677ec] | 21 | dp[0] = 2.0 * pars->effect_radius; |
---|
[c724ccd] | 22 | dp[1] = fabs(pars->charge); |
---|
[8b677ec] | 23 | dp[2] = pars->volfraction; |
---|
[25579e8] | 24 | dp[3] = pars->temperature; |
---|
| 25 | dp[4] = pars->saltconc; |
---|
| 26 | dp[5] = pars->dielectconst; |
---|
[5eb9154] | 27 | |
---|
[25579e8] | 28 | return HayterPenfoldMSA(dp, q); |
---|
| 29 | } |
---|
[5eb9154] | 30 | |
---|
[25579e8] | 31 | /** |
---|
| 32 | * Function to evaluate 2D scattering function |
---|
| 33 | * @param pars: parameters of the HayterPenfoldMSA |
---|
| 34 | * @param q: q-value |
---|
| 35 | * @return: function value |
---|
| 36 | */ |
---|
| 37 | double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi) { |
---|
| 38 | return HayterMSA_analytical_1D(pars,q); |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy){ |
---|
[5eb9154] | 42 | return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy)); |
---|
[25579e8] | 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.