source: sasview/sansmodels/src/sans/models/c_extensions/flexcyl_ellipX.c @ 1aaa579

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 1aaa579 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
RevLine 
[c724ccd]1/**
2 * Scattering model for a flexible cylinder with an elliptical cross section
3 */
4#include "flexcyl_ellipX.h"
5#include <math.h>
6#include "libCylinder.h"
7
8/**
9 * Function to evaluate 1D scattering function
10 * @param pars: parameters of the flexible cylinder with an elliptical X
11 * @param q: q-value
12 * @return: function value
13 */
14double flexcyl_ellipX_analytical_1D(FlexCylEXParameters *pars, double q) {
15        double dp[8];
16
17        dp[0] = pars->scale;
18        dp[1] = pars->length;
19        dp[2] = pars->kuhn_length;
20        dp[3] = pars->radius;
21        dp[4] = pars->axis_ratio;
22        dp[5] = pars->sldCyl;
23        dp[6] = pars->sldSolv;
24        dp[7] = pars->background;
25
26        return FlexCyl_Ellip(dp, q);
27}
28
29/**
30 * Function to evaluate 2D scattering function
31 * @param pars: parameters of the flexible cylinder with an elliptical X
32 * @param q: q-value
33 * @return: function value
34 */
35double flexcyl_ellipX_analytical_2D(FlexCylEXParameters *pars, double q, double phi) {
36        return flexcyl_ellipX_analytical_1D(pars,q);
37}
38
39double flexcyl_ellipX_analytical_2DXY(FlexCylEXParameters *pars, double qx, double qy){
40        return flexcyl_ellipX_analytical_1D(pars,sqrt(qx*qx+qy*qy));
41}
Note: See TracBrowser for help on using the repository browser.