Changeset 834 for sans/XOP_Dev/SANSAnalysis/XOP/Sphere.c
 Timestamp:
 Jan 31, 2012 12:13:39 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/XOP_Dev/SANSAnalysis/XOP/Sphere.c
r592 r834 30 30 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 31 31 case NT_FP32: 32 fp= WaveData(p>waveHandle);33 SetNaN64(&p>result); 34 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 35 case NT_FP64: 36 dp= WaveData(p>waveHandle);32 fp= (float*)WaveData(p>waveHandle); 33 SetNaN64(&p>result); 34 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 35 case NT_FP64: 36 dp= (double*)WaveData(p>waveHandle); 37 37 p>result = SphereForm(dp,q); 38 38 return 0; … … 62 62 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 63 63 case NT_FP32: 64 fp= WaveData(p>waveHandle);65 SetNaN64(&p>result); 66 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 67 case NT_FP64: 68 dp= WaveData(p>waveHandle);64 fp= (float*)WaveData(p>waveHandle); 65 SetNaN64(&p>result); 66 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 67 case NT_FP64: 68 dp= (double*)WaveData(p>waveHandle); 69 69 p>result = CoreShellForm(dp,q); 70 70 return 0; … … 94 94 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 95 95 case NT_FP32: 96 fp= WaveData(p>waveHandle);97 SetNaN64(&p>result); 98 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 99 case NT_FP64: 100 dp= WaveData(p>waveHandle);96 fp= (float*)WaveData(p>waveHandle); 97 SetNaN64(&p>result); 98 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 99 case NT_FP64: 100 dp= (double*)WaveData(p>waveHandle); 101 101 p>result = VesicleForm(dp,q); 102 102 return 0; … … 127 127 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 128 128 case NT_FP32: 129 fp= WaveData(p>waveHandle);130 SetNaN64(&p>result); 131 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 132 case NT_FP64: 133 dp= WaveData(p>waveHandle);129 fp= (float*)WaveData(p>waveHandle); 130 SetNaN64(&p>result); 131 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 132 case NT_FP64: 133 dp= (double*)WaveData(p>waveHandle); 134 134 p>result = PolyCoreForm(dp,q); 135 135 return 0; … … 161 161 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 162 162 case NT_FP32: 163 fp= WaveData(p>waveHandle);164 SetNaN64(&p>result); 165 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 166 case NT_FP64: 167 dp= WaveData(p>waveHandle);163 fp= (float*)WaveData(p>waveHandle); 164 SetNaN64(&p>result); 165 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 166 case NT_FP64: 167 dp= (double*)WaveData(p>waveHandle); 168 168 p>result = PolyHardSphereIntensity(dp,q); 169 169 return 0; … … 194 194 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 195 195 case NT_FP32: 196 fp= WaveData(p>waveHandle);197 SetNaN64(&p>result); 198 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 199 case NT_FP64: 200 dp= WaveData(p>waveHandle);196 fp= (float*)WaveData(p>waveHandle); 197 SetNaN64(&p>result); 198 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 199 case NT_FP64: 200 dp= (double*)WaveData(p>waveHandle); 201 201 p>result = BimodalSchulzSpheres(dp,q); 202 202 return 0; … … 227 227 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 228 228 case NT_FP32: 229 fp= WaveData(p>waveHandle);230 SetNaN64(&p>result); 231 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 232 case NT_FP64: 233 dp= WaveData(p>waveHandle);229 fp= (float*)WaveData(p>waveHandle); 230 SetNaN64(&p>result); 231 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 232 case NT_FP64: 233 dp= (double*)WaveData(p>waveHandle); 234 234 p>result = SchulzSpheres(dp,q); 235 235 return 0; … … 261 261 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 262 262 case NT_FP32: 263 fp= WaveData(p>waveHandle);264 SetNaN64(&p>result); 265 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 266 case NT_FP64: 267 dp= WaveData(p>waveHandle);263 fp= (float*)WaveData(p>waveHandle); 264 SetNaN64(&p>result); 265 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 266 case NT_FP64: 267 dp= (double*)WaveData(p>waveHandle); 268 268 p>result = PolyRectSpheres(dp,q); 269 269 return 0; … … 294 294 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 295 295 case NT_FP32: 296 fp= WaveData(p>waveHandle);297 SetNaN64(&p>result); 298 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 299 case NT_FP64: 300 dp= WaveData(p>waveHandle);296 fp= (float*)WaveData(p>waveHandle); 297 SetNaN64(&p>result); 298 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 299 case NT_FP64: 300 dp= (double*)WaveData(p>waveHandle); 301 301 p>result = GaussPolySphere(dp,q); 302 302 return 0; … … 327 327 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 328 328 case NT_FP32: 329 fp= WaveData(p>waveHandle);330 SetNaN64(&p>result); 331 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 332 case NT_FP64: 333 dp= WaveData(p>waveHandle);329 fp= (float*)WaveData(p>waveHandle); 330 SetNaN64(&p>result); 331 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 332 case NT_FP64: 333 dp= (double*)WaveData(p>waveHandle); 334 334 p>result = LogNormalPolySphere(dp,q); 335 335 return 0; … … 361 361 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 362 362 case NT_FP32: 363 fp= WaveData(p>waveHandle);364 SetNaN64(&p>result); 365 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 366 case NT_FP64: 367 dp= WaveData(p>waveHandle);363 fp= (float*)WaveData(p>waveHandle); 364 SetNaN64(&p>result); 365 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 366 case NT_FP64: 367 dp= (double*)WaveData(p>waveHandle); 368 368 p>result = PolyCoreShellRatio(dp,q); 369 369 return 0; … … 404 404 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 405 405 case NT_FP32: 406 fp= WaveData(p>waveHandle);407 SetNaN64(&p>result); 408 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 409 case NT_FP64: 410 dp= WaveData(p>waveHandle);406 fp= (float*)WaveData(p>waveHandle); 407 SetNaN64(&p>result); 408 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 409 case NT_FP64: 410 dp= (double*)WaveData(p>waveHandle); 411 411 p>result = BinaryHS(dp,q); 412 412 return 0; … … 434 434 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 435 435 case NT_FP32: 436 fp= WaveData(p>waveHandle);437 SetNaN64(&p>result); 438 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 439 case NT_FP64: 440 dp= WaveData(p>waveHandle);436 fp= (float*)WaveData(p>waveHandle); 437 SetNaN64(&p>result); 438 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 439 case NT_FP64: 440 dp= (double*)WaveData(p>waveHandle); 441 441 p>result = BinaryHS_PSF11(dp,q); 442 442 return 0; … … 464 464 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 465 465 case NT_FP32: 466 fp= WaveData(p>waveHandle);467 SetNaN64(&p>result); 468 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 469 case NT_FP64: 470 dp= WaveData(p>waveHandle);466 fp= (float*)WaveData(p>waveHandle); 467 SetNaN64(&p>result); 468 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 469 case NT_FP64: 470 dp= (double*)WaveData(p>waveHandle); 471 471 p>result = BinaryHS_PSF12(dp,q); 472 472 return 0; … … 495 495 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 496 496 case NT_FP32: 497 fp= WaveData(p>waveHandle);498 SetNaN64(&p>result); 499 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 500 case NT_FP64: 501 dp= WaveData(p>waveHandle);497 fp= (float*)WaveData(p>waveHandle); 498 SetNaN64(&p>result); 499 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 500 case NT_FP64: 501 dp= (double*)WaveData(p>waveHandle); 502 502 p>result = BinaryHS_PSF22(dp,q); 503 503 return 0; … … 520 520 521 521 Warning: 522 The call to WaveData() below returns a pointer to the middle522 The call to (float*)WaveData() below returns a pointer to the middle 523 523 of an unlocked Macintosh handle. In the unlikely event that your 524 524 calculations could cause memory to move, you should copy the coefficient … … 541 541 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 542 542 case NT_FP32: 543 fp= WaveData(p>waveHandle);544 SetNaN64(&p>result); 545 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 546 case NT_FP64: 547 dp= WaveData(p>waveHandle);543 fp= (float*)WaveData(p>waveHandle); 544 SetNaN64(&p>result); 545 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 546 case NT_FP64: 547 dp= (double*)WaveData(p>waveHandle); 548 548 p>result = MultiShell(dp,q); 549 549 return 0; … … 568 568 // 569 569 Warning: 570 The call to WaveData() below returns a pointer to the middle570 The call to (float*)WaveData() below returns a pointer to the middle 571 571 of an unlocked Macintosh handle. In the unlikely event that your 572 572 calculations could cause memory to move, you should copy the coefficient … … 589 589 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 590 590 case NT_FP32: 591 fp= WaveData(p>waveHandle);592 SetNaN64(&p>result); 593 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 594 case NT_FP64: 595 dp= WaveData(p>waveHandle);591 fp= (float*)WaveData(p>waveHandle); 592 SetNaN64(&p>result); 593 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 594 case NT_FP64: 595 dp= (double*)WaveData(p>waveHandle); 596 596 p>result = PolyMultiShell(dp,q); 597 597 return 0; … … 621 621 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 622 622 case NT_FP32: 623 fp= WaveData(p>waveHandle);624 SetNaN64(&p>result); 625 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 626 case NT_FP64: 627 dp= WaveData(p>waveHandle);623 fp= (float*)WaveData(p>waveHandle); 624 SetNaN64(&p>result); 625 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 626 case NT_FP64: 627 dp= (double*)WaveData(p>waveHandle); 628 628 p>result = OneShell(dp,q); 629 629 return 0; … … 651 651 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 652 652 case NT_FP32: 653 fp= WaveData(p>waveHandle);654 SetNaN64(&p>result); 655 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 656 case NT_FP64: 657 dp= WaveData(p>waveHandle);653 fp= (float*)WaveData(p>waveHandle); 654 SetNaN64(&p>result); 655 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 656 case NT_FP64: 657 dp= (double*)WaveData(p>waveHandle); 658 658 p>result = TwoShell(dp,q); 659 659 return 0; … … 681 681 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 682 682 case NT_FP32: 683 fp= WaveData(p>waveHandle);684 SetNaN64(&p>result); 685 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 686 case NT_FP64: 687 dp= WaveData(p>waveHandle);683 fp= (float*)WaveData(p>waveHandle); 684 SetNaN64(&p>result); 685 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 686 case NT_FP64: 687 dp= (double*)WaveData(p>waveHandle); 688 688 p>result = ThreeShell(dp,q); 689 689 return 0; … … 711 711 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 712 712 case NT_FP32: 713 fp= WaveData(p>waveHandle);714 SetNaN64(&p>result); 715 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 716 case NT_FP64: 717 dp= WaveData(p>waveHandle);713 fp= (float*)WaveData(p>waveHandle); 714 SetNaN64(&p>result); 715 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 716 case NT_FP64: 717 dp= (double*)WaveData(p>waveHandle); 718 718 p>result = FourShell(dp,q); 719 719 return 0; … … 743 743 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 744 744 case NT_FP32: 745 fp= WaveData(p>waveHandle);746 SetNaN64(&p>result); 747 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 748 case NT_FP64: 749 dp= WaveData(p>waveHandle);745 fp= (float*)WaveData(p>waveHandle); 746 SetNaN64(&p>result); 747 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 748 case NT_FP64: 749 dp= (double*)WaveData(p>waveHandle); 750 750 p>result = PolyOneShell(dp,q); 751 751 return 0; … … 773 773 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 774 774 case NT_FP32: 775 fp= WaveData(p>waveHandle);776 SetNaN64(&p>result); 777 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 778 case NT_FP64: 779 dp= WaveData(p>waveHandle);775 fp= (float*)WaveData(p>waveHandle); 776 SetNaN64(&p>result); 777 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 778 case NT_FP64: 779 dp= (double*)WaveData(p>waveHandle); 780 780 p>result = PolyTwoShell(dp,q); 781 781 return 0; … … 803 803 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 804 804 case NT_FP32: 805 fp= WaveData(p>waveHandle);806 SetNaN64(&p>result); 807 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 808 case NT_FP64: 809 dp= WaveData(p>waveHandle);805 fp= (float*)WaveData(p>waveHandle); 806 SetNaN64(&p>result); 807 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 808 case NT_FP64: 809 dp= (double*)WaveData(p>waveHandle); 810 810 p>result = PolyThreeShell(dp,q); 811 811 return 0; … … 833 833 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 834 834 case NT_FP32: 835 fp= WaveData(p>waveHandle);836 SetNaN64(&p>result); 837 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 838 case NT_FP64: 839 dp= WaveData(p>waveHandle);835 fp= (float*)WaveData(p>waveHandle); 836 SetNaN64(&p>result); 837 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 838 case NT_FP64: 839 dp= (double*)WaveData(p>waveHandle); 840 840 p>result = PolyFourShell(dp,q); 841 841 return 0; … … 864 864 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 865 865 case NT_FP32: 866 fp= WaveData(p>waveHandle);867 SetNaN64(&p>result); 868 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 869 case NT_FP64: 870 dp= WaveData(p>waveHandle);866 fp= (float*)WaveData(p>waveHandle); 867 SetNaN64(&p>result); 868 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 869 case NT_FP64: 870 dp= (double*)WaveData(p>waveHandle); 871 871 p>result = BCC_ParaCrystal(dp,q); 872 872 return 0; … … 895 895 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 896 896 case NT_FP32: 897 fp= WaveData(p>waveHandle);898 SetNaN64(&p>result); 899 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 900 case NT_FP64: 901 dp= WaveData(p>waveHandle);897 fp= (float*)WaveData(p>waveHandle); 898 SetNaN64(&p>result); 899 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 900 case NT_FP64: 901 dp= (double*)WaveData(p>waveHandle); 902 902 p>result = FCC_ParaCrystal(dp,q); 903 903 return 0; … … 926 926 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 927 927 case NT_FP32: 928 fp= WaveData(p>waveHandle);929 SetNaN64(&p>result); 930 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 931 case NT_FP64: 932 dp= WaveData(p>waveHandle);928 fp= (float*)WaveData(p>waveHandle); 929 SetNaN64(&p>result); 930 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 931 case NT_FP64: 932 dp= (double*)WaveData(p>waveHandle); 933 933 p>result = SC_ParaCrystal(dp,q); 934 934 return 0; … … 956 956 switch(WaveType(p>waveHandle)){ // We can handle single and double precision coefficient waves. 957 957 case NT_FP32: 958 fp= WaveData(p>waveHandle);959 SetNaN64(&p>result); 960 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 961 case NT_FP64: 962 dp= WaveData(p>waveHandle);958 fp= (float*)WaveData(p>waveHandle); 959 SetNaN64(&p>result); 960 return REQUIRES_SP_OR_DP_WAVE; //not quite true, but good enough for now AJJ 4/23/07 961 case NT_FP64: 962 dp= (double*)WaveData(p>waveHandle); 963 963 p>result = FuzzySpheres(dp,q); 964 964 return 0;
Note: See TracChangeset
for help on using the changeset viewer.