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 c09ace41 was
25a60dc1,
checked in by Jae Cho <jhjcho@…>, 13 years ago
|
moving a folder
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[ae3ce4e] | 1 | #include "../include/danse.h" |
---|
| 2 | #include <stdio.h> |
---|
| 3 | |
---|
| 4 | int main(){ |
---|
| 5 | double output; |
---|
| 6 | double pars[11]; |
---|
| 7 | double q, phi; |
---|
| 8 | double theta_vals[17]; |
---|
| 9 | double theta_w[17]; |
---|
| 10 | double phi_vals[17]; |
---|
| 11 | double phi_w[17]; |
---|
| 12 | int i; |
---|
| 13 | |
---|
| 14 | pars[0] = 1.0; |
---|
| 15 | pars[1] = 20.0; // radius |
---|
| 16 | pars[2] = 400.0; // length |
---|
| 17 | pars[3] = 1.0; // contrast |
---|
| 18 | pars[4] = 0.0; // bck |
---|
| 19 | pars[5] = 1.57; //theta |
---|
| 20 | pars[6] = 0.0; // phi |
---|
| 21 | pars[7] = 0.0; // disp theta |
---|
| 22 | pars[8] = 0.0; // disp phi |
---|
| 23 | pars[9] = 0.0; // disp radius |
---|
| 24 | pars[10] = 0.0; |
---|
| 25 | |
---|
| 26 | theta_vals[0] = 0.01; |
---|
| 27 | theta_vals[1] = 0.1; |
---|
| 28 | theta_vals[2] = 0.2; |
---|
| 29 | theta_vals[3] = 0.3; |
---|
| 30 | theta_vals[4] = 0.4; |
---|
| 31 | theta_vals[5] = 0.5; |
---|
| 32 | theta_vals[6] = 0.6; |
---|
| 33 | theta_vals[7] = 0.7; |
---|
| 34 | theta_vals[8] = 0.8; |
---|
| 35 | theta_vals[9] = 0.9; |
---|
| 36 | theta_vals[10] = 1.0; |
---|
| 37 | theta_vals[11] = 1.1; |
---|
| 38 | theta_vals[12] = 1.2; |
---|
| 39 | theta_vals[13] = 1.3; |
---|
| 40 | theta_vals[14] = 1.4; |
---|
| 41 | theta_vals[15] = 1.5; |
---|
| 42 | theta_vals[16] = 1.6; |
---|
| 43 | |
---|
| 44 | for(i=0; i<17; i++) { |
---|
| 45 | theta_w[i] = 1.0; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | q = 0.025; |
---|
| 49 | phi = 0.0; |
---|
| 50 | |
---|
| 51 | // Testing oriented cylinder |
---|
| 52 | output = oriented_cylinder_2D(pars, q, phi); |
---|
| 53 | printf("oriented output = %g\n", output); |
---|
| 54 | |
---|
| 55 | // Testing dispersed with no dispersion |
---|
| 56 | output = disperse_cylinder_analytical_2D(pars, q, phi); |
---|
| 57 | printf("disp output = %g\n", output); |
---|
| 58 | |
---|
| 59 | // Testing dispersed with dispersion |
---|
| 60 | pars[10] = 100.0; |
---|
| 61 | pars[7] = 3.0; |
---|
| 62 | output = disperse_cylinder_analytical_2D(pars, q, phi); |
---|
| 63 | printf("disp output = %g\n", output); |
---|
| 64 | |
---|
| 65 | // Testing input dist |
---|
| 66 | pars[10] = 0.0; |
---|
| 67 | pars[7] = 0.0; |
---|
| 68 | pars[1] = 20.0; |
---|
| 69 | output = cylinder_Weights(pars, phi_vals, phi_w, 0, |
---|
| 70 | theta_vals, theta_w, 17, |
---|
| 71 | q, phi); |
---|
| 72 | printf("weight output = %g\n", output); |
---|
| 73 | |
---|
| 74 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.