Changeset 0ba3b08 in sasview for sansmodels/src/c_models/DiamCyl.cpp
- Timestamp:
- Jan 5, 2012 10:16:29 AM (13 years ago)
- 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:
- 011e0e4
- Parents:
- bbbed8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_models/DiamCyl.cpp
r67424cd r0ba3b08 18 18 * sansmodels/src/libigor 19 19 * 20 * TODO: refactor so that we pull in the old sansmodels.c_extensions21 20 */ 22 21 23 22 #include <math.h> 24 #include "models.hh"25 23 #include "parameters.hh" 26 24 #include <stdio.h> 27 25 using namespace std; 26 #include "DiamCyl.h" 28 27 29 28 extern "C" { 30 29 #include "libStructureFactor.h" 31 #include "DiamCyl.h"32 30 } 33 31 … … 112 110 return 0.0; 113 111 } 114 // Testing code115 116 /**117 int main(void)118 {119 DiamCylFunc c = DiamCylFunc();120 121 printf("I(Qx=%g,Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));122 printf("I(Q=%g) = %g\n", 0.001, c(0.001));123 c.radius.dispersion = new GaussianDispersion();124 c.radius.dispersion->npts = 100;125 c.radius.dispersion->width = 20;126 127 //c.length.dispersion = GaussianDispersion();128 //c.length.dispersion.npts = 20;129 //c.length.dispersion.width = 65;130 131 //printf("I(Q=%g) = %g\n", 0.001, c(0.001));132 //printf("I(Q=%g) = %g\n", 0.001, c(0.001));133 //printf("I(Qx=%g, Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));134 //printf("I(Q=%g, Phi=%g) = %g\n", 0.00447, .7854, c.evaluate_rphi(sqrt(0.00002), .7854));135 136 137 138 double i_avg = c(0.01, 0.01);139 double i_1d = c(sqrt(0.0002));140 141 printf("\nI(Qx=%g, Qy=%g) = %g\n", 0.01, 0.01, i_avg);142 printf("I(Q=%g) = %g\n", sqrt(0.0002), i_1d);143 printf("ratio %g %g\n", i_avg/i_1d, i_1d/i_avg);144 145 146 return 0;147 }148 **/
Note: See TracChangeset
for help on using the changeset viewer.