init
This commit is contained in:
469
scratch/c_legendrecoefs.c
Normal file
469
scratch/c_legendrecoefs.c
Normal file
@ -0,0 +1,469 @@
|
||||
static const int amslegendre_ndegree = 20;
|
||||
static const int amslegendre_maxporder = 20;
|
||||
static const float amslegendrecoefsf[] = {
|
||||
1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.50000000,0,1.5000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.7320508,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.86602540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-1.5000000,0,2.5000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.61237244,0,3.0618622,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.9364917,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.79056942,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.37500000,0,-3.7500000,0,4.3750000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.3717082,0,5.5339859,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.55901699,0,3.9131190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.0916501,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.73950997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.8750000,0,-8.7500000,0,7.8750000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.48412292,0,-6.7777209,0,10.166581,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.5617377,0,7.6852131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.52291252,0,4.7062126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.2185299,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.70156076,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31250000,0,6.5625000,0,-19.687500,0,14.437500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8641098,0,-17.184659,0,18.903125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.45285552,0,-8.1513994,0,14.944232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.7171331,0,9.9628215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.49607837,0,5.4568621,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.3268138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.67169329,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.1875000,0,19.687500,0,-43.312500,0,26.812500,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41339864,0,11.161763,0,-40.926466,0,35.469604,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0378472,0,-22.277546,0,28.960810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.42961647,0,-9.4515624,0,20.478385,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.8497533,0,12.348931,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.47495888,0,6.1744654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.4218246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.64725985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.27343750,0,-9.8437500,0,54.140625,0,-93.843750,0,50.273438,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.2812500,0,36.093750,0,-93.843750,0,67.031250,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.39218439,0,12.942085,0,-56.082367,0,56.082367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1861210,0,-27.613049,0,41.419573,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.41132646,0,-10.694488,0,26.736220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.9661173,0,14.830586,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.45768183,0,6.8652274,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.5068266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.62670665,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.4609375,0,-36.093750,0,140.76562,0,-201.09375,0,94.960938,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.36685490,0,-16.141616,0,104.92050,0,-209.84100,0,127.40347,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4414040,0,44.738252,0,-134.21476,0,108.65004,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.37548796,0,14.644031,0,-73.220153,0,82.982840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.3162199,0,-33.162199,0,56.375738,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.39636409,0,-11.890923,0,33.690948,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.0702230,0,17.397931,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.44314853,0,7.5335249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.5839777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.60904939,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.24609375,0,13.535156,0,-117.30469,0,351.91406,0,-427.32422,0,180.42578,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.6501602,0,-63.269443,0,284.71250,0,-460.96309,0,243.28607,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.35123683,0,-18.264315,0,136.98236,0,-310.49336,0,210.69192,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5819269,0,53.728903,0,-182.67827,0,165.28034,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36182926,0,16.282316,0,-92.266460,0,116.87085,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.4326137,0,-38.902955,0,73.915615,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.38377788,0,-13.048448,0,41.320085,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.1647135,0,20.043185,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.43066296,0,8.1825962,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.6547848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.59362792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.7070312,0,58.652344,0,-351.91406,0,854.64844,0,-902.12891,0,344.44922,0,0,0,0,0,0,0,0,0,
|
||||
-0.33321251,0,21.658813,0,-216.58813,0,736.39965,0,-999.39953,0,466.38645,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.7992072,0,-75.984144,0,387.51913,0,-701.22510,0,409.04797,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.33846028,0,-20.307617,0,172.61474,0,-437.29068,0,327.96801,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7076466,0,63.029992,0,-239.51397,0,239.51397,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.35033967,0,17.867323,0,-113.15971,0,158.42360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.5382572,0,-44.817925,0,94.117642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.37296506,0,-14.172672,0,49.604353,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.2514340,0,22.760038,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41975833,0,8.8149248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.7203449,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.57997947,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.22558594,0,-17.595703,0,219.94629,0,-997.08984,0,2029.7900,0,-1894.4707,0,660.19434,0,0,0,0,0,0,0,0,
|
||||
0,-3.9846421,0,99.616053,0,-677.38916,0,1838.6277,0,-2145.0657,0,897.02746,0,0,0,0,0,0,0,0,0,
|
||||
-0.32109161,0,24.081871,0,-272.92787,0,1037.1259,0,-1555.6889,0,795.12986,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.9325530,0,-89.137869,0,508.08585,0,-1016.1717,0,649.22081,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32771275,0,-22.284467,0,211.70244,0,-592.76683,0,486.91561,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.8217546,0,72.613337,0,-304.97602,0,334.02135,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.34046896,0,19.406731,0,-135.84712,0,208.29891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.6352137,0,-50.892992,0,117.05388,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.36352137,0,-15.267898,0,58.526941,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.3317284,0,25.543251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41010742,0,9.4324706,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.7814838,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.56776801,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9326172,0,-87.978516,0,747.81738,0,-2706.3867,0,4736.1768,0,-3961.1660,0,1269.6045,0,0,0,0,0,0,0,
|
||||
0.30742181,0,-27.667963,0,391.96281,0,-1985.9449,0,4468.3761,0,-4567.6733,0,1730.1793,0,0,0,0,0,0,0,0,
|
||||
0,-4.1244964,0,116.86073,0,-888.14156,0,2664.4247,0,-3404.5427,0,1547.5194,0,0,0,0,0,0,0,0,0,
|
||||
-0.31089562,0,26.426127,0,-334.73095,0,1405.8700,0,-2309.6435,0,1283.1353,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0535829,0,-102.69077,0,646.95183,0,-1417.1326,0,984.11985,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31847955,0,-24.204446,0,254.14668,0,-779.38316,0,695.87782,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.9264796,0,82.456072,0,-379.29793,0,451.54515,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.33184809,0,20.906430,0,-160.28263,0,267.13772,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.7249856,0,-57.116446,0,142.79112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.35516344,0,-16.337518,0,68.072993,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4066081,0,28.388401,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.40147261,0,10.036815,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8388401,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.55674234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.20947266,0,21.994629,0,-373.90869,0,2368.0884,0,-7104.2651,0,10893.207,0,-8252.4292,0,2448.5229,0,0,0,0,0,0,
|
||||
0,4.2929120,0,-145.95901,0,1386.6106,0,-5546.4423,0,10630.681,0,-9664.2555,0,3345.3192,0,0,0,0,0,0,0,
|
||||
0.29765989,0,-30.361309,0,480.72072,0,-2692.0360,0,6633.9460,0,-7371.0511,0,3015.4300,0,0,0,0,0,0,0,0,
|
||||
0,-4.2514336,0,134.62873,0,-1130.8813,0,3715.7530,0,-5160.7680,0,2533.4679,0,0,0,0,0,0,0,0,0,
|
||||
-0.30213623,0,28.702942,0,-401.84119,0,1848.4695,0,-3300.8383,0,1980.5030,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.1646605,0,-116.61049,0,804.61241,0,-1915.7438,0,1436.8079,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31041547,0,-26.074899,0,299.86134,0,-999.53781,0,963.84003,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.0234443,0,92.539219,0,-462.69610,0,594.89498,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.32421838,0,22.371068,0,-186.42557,0,335.56603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.8087036,0,-63.478394,0,171.39166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.34768548,0,-17.384274,0,78.229233,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4768548,0,31.291693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.39367628,0,10.629260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8929181,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.54671013,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.1420898,0,124.63623,0,-1420.8530,0,7104.2651,0,-18155.344,0,24757.288,0,-17139.661,0,4733.8110,0,0,0,0,0,
|
||||
-0.28683225,0,34.133037,0,-648.52771,0,4539.6940,0,-14916.137,0,24860.229,0,-20340.187,0,6482.0377,0,0,0,0,0,0,
|
||||
0,4.4250324,0,-168.15123,0,1765.5879,0,-7734.9566,0,16114.493,0,-15821.502,0,5882.3534,0,0,0,0,0,0,0,
|
||||
0.28927342,0,-32.977170,0,577.10047,0,-3539.5495,0,9480.9362,0,-11377.123,0,4999.0391,0,0,0,0,0,0,0,0,
|
||||
0,-4.3679328,0,152.87765,0,-1406.4744,0,5023.1227,0,-7534.6841,0,3972.8334,0,0,0,0,0,0,0,0,0,
|
||||
-0.29448597,0,30.921027,0,-474.12241,0,2370.6121,0,-4571.8947,0,2946.3321,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.2675071,0,-130.87022,0,981.52664,0,-2523.9257,0,2033.1623,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.30327853,0,-27.901624,0,348.77031,0,-1255.5731,0,1300.4150,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.1138701,0,102.84675,0,-555.37246,0,766.94292,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31739197,0,23.804398,0,-214.23958,0,414.19652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.8872418,0,-69.970353,0,202.91402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.34093366,0,-18.410418,0,88.983686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5430866,0,34.249837,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.38658244,0,11.210891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9441241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.53752107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.19638062,0,-26.707764,0,592.02209,0,-4972.9856,0,20424.762,0,-45388.361,0,55703.897,0,-35503.583,0,9171.7589,0,0,0,0,
|
||||
0,-4.5803437,0,203.06190,0,-2558.5800,0,14011.271,0,-38920.198,0,57318.837,0,-42621.699,0,12583.549,0,0,0,0,0,
|
||||
-0.27875084,0,37.073862,0,-778.55109,0,5968.8917,0,-21317.470,0,38371.447,0,-33720.362,0,11487.156,0,0,0,0,0,0,
|
||||
0,4.5462886,0,-190.94412,0,2195.8574,0,-10456.464,0,23527.044,0,-24810.337,0,9860.5185,0,0,0,0,0,0,0,
|
||||
0.28194885,0,-35.525555,0,680.90647,0,-4539.3765,0,13131.768,0,-16925.389,0,7949.8042,0,0,0,0,0,0,0,0,
|
||||
0,-4.4757992,0,171.57230,0,-1715.7230,0,6617.7889,0,-10661.993,0,6009.4871,0,0,0,0,0,0,0,0,0,
|
||||
-0.28771527,0,33.087256,0,-551.45427,0,2977.8531,0,-6168.4099,0,4249.3491,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.3634182,0,-145.44727,0,1178.1229,0,-3253.8632,0,2801.9378,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.29689300,0,-29.689300,0,400.80555,0,-1549.7815,0,1715.8295,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.1987011,0,113.36493,0,-657.51659,0,970.61973,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31122843,0,25.209503,0,-243.69186,0,503.62985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.9612912,0,-76.584963,0,237.41339,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.33479021,0,-19.417832,0,100.32547,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.6058009,0,37.259943,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.38008479,0,11.782629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9927906,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.52905564,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.3384705,0,-169.14917,0,2486.4928,0,-16339.810,0,56735.451,0,-111407.79,0,124262.54,0,-73374.071,0,17804.003,0,0,0,
|
||||
0.26989934,0,-41.024700,0,1005.1051,0,-9246.9673,0,41281.104,0,-99074.650,0,130598.40,0,-88979.131,0,24469.261,0,0,0,0,
|
||||
0,-4.7058558,0,230.58693,0,-3182.0997,0,18941.070,0,-56823.209,0,89883.985,0,-71446.244,0,22454.534,0,0,0,0,0,
|
||||
-0.27169271,0,39.938828,0,-918.59305,0,7654.9421,0,-29526.205,0,57083.997,0,-53624.361,0,19446.197,0,0,0,0,0,0,
|
||||
0,4.6585596,0,-214.29374,0,2678.6717,0,-13776.026,0,33292.063,0,-37529.235,0,15877.753,0,0,0,0,0,0,0,
|
||||
0.27546640,0,-38.014363,0,791.96590,0,-5702.1545,0,17717.409,0,-24410.652,0,12205.326,0,0,0,0,0,0,0,0,
|
||||
0,-4.5763916,0,190.68298,0,-2059.3762,0,8531.7014,0,-14693.486,0,8816.0915,0,0,0,0,0,0,0,0,0,
|
||||
-0.28165743,0,35.207179,0,-633.72922,0,3675.6295,0,-8138.8938,0,5968.5221,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.4533950,0,-160.32222,0,1394.8033,0,-4117.9907,0,3774.8248,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.29112754,0,-31.441774,0,455.90573,0,-1884.4103,0,2220.9122,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.2786835,0,124.08182,0,-769.30730,0,1208.9115,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.30562025,0,26.588962,0,-274.75261,0,604.45573,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0314080,0,-83.315765,0,274.94203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32916308,0,-20.408111,0,112.24461,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.6654050,0,40.319455,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.37409883,0,12.345261,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0391933,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.52121734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.18547058,0,31.715469,0,-888.03314,0,9531.5557,0,-51061.906,0,153185.72,0,-269235.50,0,275152.77,0,-151334.02,0,34618.894,0,0,
|
||||
0,4.8506851,0,-271.63837,0,4373.3777,0,-31238.412,0,117144.05,0,-247067.44,0,294580.41,0,-185164.83,0,47652.714,0,0,0,
|
||||
0.26306534,0,-44.194976,0,1185.8985,0,-11858.985,0,57177.251,0,-147390.25,0,207686.26,0,-150629.59,0,43933.631,0,0,0,0,
|
||||
0,-4.8220673,0,258.78428,0,-3881.7641,0,24954.198,0,-80407.972,0,135962.57,0,-115045.25,0,38348.417,0,0,0,0,0,
|
||||
-0.26544607,0,42.736817,0,-1068.4204,0,9615.7837,0,-39836.818,0,82329.425,0,-82329.425,0,31665.163,0,0,0,0,0,0,
|
||||
0,4.7632594,0,-238.16297,0,3215.2001,0,-17760.153,0,45880.395,0,-55056.474,0,24704.828,0,0,0,0,0,0,0,
|
||||
0.26966646,0,-40.449969,0,910.12430,0,-7038.2946,0,23377.193,0,-34286.549,0,18182.261,0,0,0,0,0,0,0,0,
|
||||
0,-4.6707601,0,210.18420,0,-2438.1368,0,10797.463,0,-19795.348,0,12597.040,0,0,0,0,0,0,0,0,0,
|
||||
-0.27618783,0,37.285358,0,-720.85025,0,4469.2715,0,-10534.711,0,8193.6645,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.5382292,0,-175.47820,0,1631.9472,0,-5128.9770,0,4986.5054,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.28588157,0,-33.162262,0,514.01506,0,-2261.6663,0,2827.0828,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.3544183,0,134.98697,0,-890.91399,0,1484.8566,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.30048341,0,27.944957,0,-307.39453,0,717.25390,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0980474,0,-90.157042,0,315.54965,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32397909,0,-21.382620,0,124.73195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7222364,0,43.426091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36855632,0,12.899471,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0835634,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.51392723,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5239410,0,222.00829,0,-4084.9525,0,34041.270,0,-153185.72,0,403853.25,0,-642023.12,0,605336.09,0,-311570.04,0,67415.741,0,
|
||||
-0.25565355,0,48.318522,0,-1481.7680,0,17287.293,0,-100019.34,0,322284.54,0,-605504.28,0,658735.43,0,-384262.33,0,92926.185,0,0,
|
||||
0,4.9704732,0,-304.85569,0,5334.9745,0,-41155.518,0,165765.28,0,-373725.36,0,474343.72,0,-316229.15,0,86032.930,0,0,0,
|
||||
0.25701705,0,-47.291137,0,1379.3248,0,-14896.708,0,77143.667,0,-212573.66,0,318860.49,0,-245277.30,0,75627.168,0,0,0,0,
|
||||
0,-4.9304419,0,287.60911,0,-4659.2675,0,32171.133,0,-110811.68,0,199461.03,0,-179003.48,0,63077.418,0,0,0,0,0,
|
||||
-0.25985710,0,45.474993,0,-1227.8248,0,11868.973,0,-52562.595,0,115637.71,0,-122646.06,0,49867.078,0,0,0,0,0,0,
|
||||
0,4.8614812,0,-262.51999,0,3806.5398,0,-22476.711,0,61810.956,0,-78668.489,0,37317.104,0,0,0,0,0,0,0,
|
||||
0.26442972,0,-42.837614,0,1035.2423,0,-8558.0034,0,30258.655,0,-47069.019,0,26387.177,0,0,0,0,0,0,0,0,
|
||||
0,-4.7597349,0,230.05386,0,-2852.6678,0,13448.291,0,-26149.455,0,17591.451,0,0,0,0,0,0,0,0,0,
|
||||
-0.27121107,0,39.325605,0,-812.72917,0,5364.0125,0,-13410.031,0,11026.026,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.6185581,0,-190.90040,0,1889.9140,0,-6299.7132,0,6474.7052,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.28107649,0,-34.853485,0,575.08251,0,-2683.7184,0,3546.3421,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.4263970,0,146.07110,0,-1022.4977,0,1801.5436,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.29575109,0,29.279358,0,-341.59251,0,842.59486,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.1615868,0,-97.103691,0,359.28366,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31917913,0,-22.342539,0,137.77899,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7765784,0,46.577801,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36340143,0,13.445853,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1260973,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.50711995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.17619705,0,-37.001381,0,1276.5476,0,-17020.635,0,114889.29,0,-444238.58,0,1043287.6,0,-1513340.2,0,1324172.7,0,-640449.54,0,131460.69,
|
||||
0,-5.1066757,0,352.36062,0,-7047.2125,0,63424.912,0,-306553.74,0,863924.19,0,-1462025.5,0,1462025.5,0,-795513.90,0,181432.99,0,
|
||||
-0.24977567,0,51.703565,0,-1723.4522,0,21715.497,0,-134946.30,0,464815.05,0,-929630.09,0,1072650.1,0,-661467.56,0,168609.38,0,0,
|
||||
0,5.0821831,0,-338.81221,0,6403.5507,0,-53057.992,0,228444.13,0,-548265.92,0,738050.27,0,-520149.72,0,149160.58,0,0,0,
|
||||
0.25160556,0,-50.321111,0,1585.1150,0,-18387.334,0,101787.03,0,-298575.28,0,475006.13,0,-386268.72,0,125537.33,0,0,0,0,
|
||||
0,-5.0321111,0,317.02300,0,-5516.2002,0,40714.811,0,-149287.64,0,285003.68,0,-270388.11,0,100429.87,0,0,0,0,0,
|
||||
-0.25481085,0,48.159251,0,-1396.6183,0,14431.722,0,-68035.262,0,158748.94,0,-177991.24,0,76281.961,0,0,0,0,0,0,
|
||||
0,4.9540892,0,-287.33717,0,4453.7262,0,-27994.850,0,81651.647,0,-109858.58,0,54929.290,0,0,0,0,0,0,0,
|
||||
0.25966483,0,-45.181680,0,1167.1934,0,-10271.302,0,38517.382,0,-63339.695,0,37428.002,0,0,0,0,0,0,0,0,
|
||||
0,-4.8439846,0,250.27254,0,-3303.5975,0,16517.987,0,-33953.641,0,24076.218,0,0,0,0,0,0,0,0,0,
|
||||
-0.26665257,0,41.331149,0,-909.28528,0,6364.9970,0,-16821.778,0,14578.874,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.6949030,0,-206.57573,0,2169.0452,0,-7643.3022,0,8280.2440,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.27664982,0,-36.517776,0,639.06107,0,-3152.7013,0,4391.2625,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.4950274,0,157.32596,0,-1164.2121,0,2162.1082,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.29136935,0,30.593782,0,-377.32331,0,981.04061,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.2223431,0,-104.15113,0,406.18940,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31471487,0,-23.288900,0,151.37785,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.8286716,0,49.772731,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.35858795,0,13.984930,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1669631,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.50074083,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const double amslegendrecoefs[] = {
|
||||
1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
1.0000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.50000000,0,1.5000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.7320508,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.86602540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-1.5000000,0,2.5000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.61237244,0,3.0618622,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.9364917,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.79056942,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.37500000,0,-3.7500000,0,4.3750000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.3717082,0,5.5339859,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.55901699,0,3.9131190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.0916501,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.73950997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,1.8750000,0,-8.7500000,0,7.8750000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.48412292,0,-6.7777209,0,10.166581,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.5617377,0,7.6852131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.52291252,0,4.7062126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.2185299,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.70156076,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31250000,0,6.5625000,0,-19.687500,0,14.437500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8641098,0,-17.184659,0,18.903125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.45285552,0,-8.1513994,0,14.944232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.7171331,0,9.9628215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.49607837,0,5.4568621,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.3268138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.67169329,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.1875000,0,19.687500,0,-43.312500,0,26.812500,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41339864,0,11.161763,0,-40.926466,0,35.469604,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0378472,0,-22.277546,0,28.960810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.42961647,0,-9.4515624,0,20.478385,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.8497533,0,12.348931,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.47495888,0,6.1744654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.4218246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.64725985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.27343750,0,-9.8437500,0,54.140625,0,-93.843750,0,50.273438,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.2812500,0,36.093750,0,-93.843750,0,67.031250,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.39218439,0,12.942085,0,-56.082367,0,56.082367,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1861210,0,-27.613049,0,41.419573,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.41132646,0,-10.694488,0,26.736220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.9661173,0,14.830586,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.45768183,0,6.8652274,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.5068266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.62670665,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.4609375,0,-36.093750,0,140.76562,0,-201.09375,0,94.960938,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.36685490,0,-16.141616,0,104.92050,0,-209.84100,0,127.40347,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4414040,0,44.738252,0,-134.21476,0,108.65004,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.37548796,0,14.644031,0,-73.220153,0,82.982840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.3162199,0,-33.162199,0,56.375738,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.39636409,0,-11.890923,0,33.690948,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.0702230,0,17.397931,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.44314853,0,7.5335249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.5839777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.60904939,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.24609375,0,13.535156,0,-117.30469,0,351.91406,0,-427.32422,0,180.42578,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.6501602,0,-63.269443,0,284.71250,0,-460.96309,0,243.28607,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.35123683,0,-18.264315,0,136.98236,0,-310.49336,0,210.69192,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5819269,0,53.728903,0,-182.67827,0,165.28034,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36182926,0,16.282316,0,-92.266460,0,116.87085,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.4326137,0,-38.902955,0,73.915615,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.38377788,0,-13.048448,0,41.320085,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.1647135,0,20.043185,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.43066296,0,8.1825962,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.6547848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.59362792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-2.7070312,0,58.652344,0,-351.91406,0,854.64844,0,-902.12891,0,344.44922,0,0,0,0,0,0,0,0,0,
|
||||
-0.33321251,0,21.658813,0,-216.58813,0,736.39965,0,-999.39953,0,466.38645,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.7992072,0,-75.984144,0,387.51913,0,-701.22510,0,409.04797,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.33846028,0,-20.307617,0,172.61474,0,-437.29068,0,327.96801,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7076466,0,63.029992,0,-239.51397,0,239.51397,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.35033967,0,17.867323,0,-113.15971,0,158.42360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.5382572,0,-44.817925,0,94.117642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.37296506,0,-14.172672,0,49.604353,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.2514340,0,22.760038,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41975833,0,8.8149248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.7203449,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.57997947,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.22558594,0,-17.595703,0,219.94629,0,-997.08984,0,2029.7900,0,-1894.4707,0,660.19434,0,0,0,0,0,0,0,0,
|
||||
0,-3.9846421,0,99.616053,0,-677.38916,0,1838.6277,0,-2145.0657,0,897.02746,0,0,0,0,0,0,0,0,0,
|
||||
-0.32109161,0,24.081871,0,-272.92787,0,1037.1259,0,-1555.6889,0,795.12986,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.9325530,0,-89.137869,0,508.08585,0,-1016.1717,0,649.22081,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32771275,0,-22.284467,0,211.70244,0,-592.76683,0,486.91561,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.8217546,0,72.613337,0,-304.97602,0,334.02135,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.34046896,0,19.406731,0,-135.84712,0,208.29891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.6352137,0,-50.892992,0,117.05388,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.36352137,0,-15.267898,0,58.526941,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.3317284,0,25.543251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.41010742,0,9.4324706,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.7814838,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.56776801,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9326172,0,-87.978516,0,747.81738,0,-2706.3867,0,4736.1768,0,-3961.1660,0,1269.6045,0,0,0,0,0,0,0,
|
||||
0.30742181,0,-27.667963,0,391.96281,0,-1985.9449,0,4468.3761,0,-4567.6733,0,1730.1793,0,0,0,0,0,0,0,0,
|
||||
0,-4.1244964,0,116.86073,0,-888.14156,0,2664.4247,0,-3404.5427,0,1547.5194,0,0,0,0,0,0,0,0,0,
|
||||
-0.31089562,0,26.426127,0,-334.73095,0,1405.8700,0,-2309.6435,0,1283.1353,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0535829,0,-102.69077,0,646.95183,0,-1417.1326,0,984.11985,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31847955,0,-24.204446,0,254.14668,0,-779.38316,0,695.87782,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.9264796,0,82.456072,0,-379.29793,0,451.54515,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.33184809,0,20.906430,0,-160.28263,0,267.13772,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.7249856,0,-57.116446,0,142.79112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.35516344,0,-16.337518,0,68.072993,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4066081,0,28.388401,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.40147261,0,10.036815,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8388401,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.55674234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.20947266,0,21.994629,0,-373.90869,0,2368.0884,0,-7104.2651,0,10893.207,0,-8252.4292,0,2448.5229,0,0,0,0,0,0,
|
||||
0,4.2929120,0,-145.95901,0,1386.6106,0,-5546.4423,0,10630.681,0,-9664.2555,0,3345.3192,0,0,0,0,0,0,0,
|
||||
0.29765989,0,-30.361309,0,480.72072,0,-2692.0360,0,6633.9460,0,-7371.0511,0,3015.4300,0,0,0,0,0,0,0,0,
|
||||
0,-4.2514336,0,134.62873,0,-1130.8813,0,3715.7530,0,-5160.7680,0,2533.4679,0,0,0,0,0,0,0,0,0,
|
||||
-0.30213623,0,28.702942,0,-401.84119,0,1848.4695,0,-3300.8383,0,1980.5030,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.1646605,0,-116.61049,0,804.61241,0,-1915.7438,0,1436.8079,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31041547,0,-26.074899,0,299.86134,0,-999.53781,0,963.84003,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.0234443,0,92.539219,0,-462.69610,0,594.89498,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.32421838,0,22.371068,0,-186.42557,0,335.56603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.8087036,0,-63.478394,0,171.39166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.34768548,0,-17.384274,0,78.229233,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.4768548,0,31.291693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.39367628,0,10.629260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.8929181,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.54671013,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.1420898,0,124.63623,0,-1420.8530,0,7104.2651,0,-18155.344,0,24757.288,0,-17139.661,0,4733.8110,0,0,0,0,0,
|
||||
-0.28683225,0,34.133037,0,-648.52771,0,4539.6940,0,-14916.137,0,24860.229,0,-20340.187,0,6482.0377,0,0,0,0,0,0,
|
||||
0,4.4250324,0,-168.15123,0,1765.5879,0,-7734.9566,0,16114.493,0,-15821.502,0,5882.3534,0,0,0,0,0,0,0,
|
||||
0.28927342,0,-32.977170,0,577.10047,0,-3539.5495,0,9480.9362,0,-11377.123,0,4999.0391,0,0,0,0,0,0,0,0,
|
||||
0,-4.3679328,0,152.87765,0,-1406.4744,0,5023.1227,0,-7534.6841,0,3972.8334,0,0,0,0,0,0,0,0,0,
|
||||
-0.29448597,0,30.921027,0,-474.12241,0,2370.6121,0,-4571.8947,0,2946.3321,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.2675071,0,-130.87022,0,981.52664,0,-2523.9257,0,2033.1623,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.30327853,0,-27.901624,0,348.77031,0,-1255.5731,0,1300.4150,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.1138701,0,102.84675,0,-555.37246,0,766.94292,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31739197,0,23.804398,0,-214.23958,0,414.19652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.8872418,0,-69.970353,0,202.91402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.34093366,0,-18.410418,0,88.983686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5430866,0,34.249837,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.38658244,0,11.210891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9441241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.53752107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.19638062,0,-26.707764,0,592.02209,0,-4972.9856,0,20424.762,0,-45388.361,0,55703.897,0,-35503.583,0,9171.7589,0,0,0,0,
|
||||
0,-4.5803437,0,203.06190,0,-2558.5800,0,14011.271,0,-38920.198,0,57318.837,0,-42621.699,0,12583.549,0,0,0,0,0,
|
||||
-0.27875084,0,37.073862,0,-778.55109,0,5968.8917,0,-21317.470,0,38371.447,0,-33720.362,0,11487.156,0,0,0,0,0,0,
|
||||
0,4.5462886,0,-190.94412,0,2195.8574,0,-10456.464,0,23527.044,0,-24810.337,0,9860.5185,0,0,0,0,0,0,0,
|
||||
0.28194885,0,-35.525555,0,680.90647,0,-4539.3765,0,13131.768,0,-16925.389,0,7949.8042,0,0,0,0,0,0,0,0,
|
||||
0,-4.4757992,0,171.57230,0,-1715.7230,0,6617.7889,0,-10661.993,0,6009.4871,0,0,0,0,0,0,0,0,0,
|
||||
-0.28771527,0,33.087256,0,-551.45427,0,2977.8531,0,-6168.4099,0,4249.3491,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.3634182,0,-145.44727,0,1178.1229,0,-3253.8632,0,2801.9378,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.29689300,0,-29.689300,0,400.80555,0,-1549.7815,0,1715.8295,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.1987011,0,113.36493,0,-657.51659,0,970.61973,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.31122843,0,25.209503,0,-243.69186,0,503.62985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.9612912,0,-76.584963,0,237.41339,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.33479021,0,-19.417832,0,100.32547,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.6058009,0,37.259943,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.38008479,0,11.782629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,2.9927906,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.52905564,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.3384705,0,-169.14917,0,2486.4928,0,-16339.810,0,56735.451,0,-111407.79,0,124262.54,0,-73374.071,0,17804.003,0,0,0,
|
||||
0.26989934,0,-41.024700,0,1005.1051,0,-9246.9673,0,41281.104,0,-99074.650,0,130598.40,0,-88979.131,0,24469.261,0,0,0,0,
|
||||
0,-4.7058558,0,230.58693,0,-3182.0997,0,18941.070,0,-56823.209,0,89883.985,0,-71446.244,0,22454.534,0,0,0,0,0,
|
||||
-0.27169271,0,39.938828,0,-918.59305,0,7654.9421,0,-29526.205,0,57083.997,0,-53624.361,0,19446.197,0,0,0,0,0,0,
|
||||
0,4.6585596,0,-214.29374,0,2678.6717,0,-13776.026,0,33292.063,0,-37529.235,0,15877.753,0,0,0,0,0,0,0,
|
||||
0.27546640,0,-38.014363,0,791.96590,0,-5702.1545,0,17717.409,0,-24410.652,0,12205.326,0,0,0,0,0,0,0,0,
|
||||
0,-4.5763916,0,190.68298,0,-2059.3762,0,8531.7014,0,-14693.486,0,8816.0915,0,0,0,0,0,0,0,0,0,
|
||||
-0.28165743,0,35.207179,0,-633.72922,0,3675.6295,0,-8138.8938,0,5968.5221,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.4533950,0,-160.32222,0,1394.8033,0,-4117.9907,0,3774.8248,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.29112754,0,-31.441774,0,455.90573,0,-1884.4103,0,2220.9122,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.2786835,0,124.08182,0,-769.30730,0,1208.9115,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.30562025,0,26.588962,0,-274.75261,0,604.45573,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0314080,0,-83.315765,0,274.94203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32916308,0,-20.408111,0,112.24461,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.6654050,0,40.319455,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.37409883,0,12.345261,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0391933,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.52121734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.18547058,0,31.715469,0,-888.03314,0,9531.5557,0,-51061.906,0,153185.72,0,-269235.50,0,275152.77,0,-151334.02,0,34618.894,0,0,
|
||||
0,4.8506851,0,-271.63837,0,4373.3777,0,-31238.412,0,117144.05,0,-247067.44,0,294580.41,0,-185164.83,0,47652.714,0,0,0,
|
||||
0.26306534,0,-44.194976,0,1185.8985,0,-11858.985,0,57177.251,0,-147390.25,0,207686.26,0,-150629.59,0,43933.631,0,0,0,0,
|
||||
0,-4.8220673,0,258.78428,0,-3881.7641,0,24954.198,0,-80407.972,0,135962.57,0,-115045.25,0,38348.417,0,0,0,0,0,
|
||||
-0.26544607,0,42.736817,0,-1068.4204,0,9615.7837,0,-39836.818,0,82329.425,0,-82329.425,0,31665.163,0,0,0,0,0,0,
|
||||
0,4.7632594,0,-238.16297,0,3215.2001,0,-17760.153,0,45880.395,0,-55056.474,0,24704.828,0,0,0,0,0,0,0,
|
||||
0.26966646,0,-40.449969,0,910.12430,0,-7038.2946,0,23377.193,0,-34286.549,0,18182.261,0,0,0,0,0,0,0,0,
|
||||
0,-4.6707601,0,210.18420,0,-2438.1368,0,10797.463,0,-19795.348,0,12597.040,0,0,0,0,0,0,0,0,0,
|
||||
-0.27618783,0,37.285358,0,-720.85025,0,4469.2715,0,-10534.711,0,8193.6645,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.5382292,0,-175.47820,0,1631.9472,0,-5128.9770,0,4986.5054,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.28588157,0,-33.162262,0,514.01506,0,-2261.6663,0,2827.0828,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.3544183,0,134.98697,0,-890.91399,0,1484.8566,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.30048341,0,27.944957,0,-307.39453,0,717.25390,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.0980474,0,-90.157042,0,315.54965,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.32397909,0,-21.382620,0,124.73195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7222364,0,43.426091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36855632,0,12.899471,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.0835634,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.51392723,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.5239410,0,222.00829,0,-4084.9525,0,34041.270,0,-153185.72,0,403853.25,0,-642023.12,0,605336.09,0,-311570.04,0,67415.741,0,
|
||||
-0.25565355,0,48.318522,0,-1481.7680,0,17287.293,0,-100019.34,0,322284.54,0,-605504.28,0,658735.43,0,-384262.33,0,92926.185,0,0,
|
||||
0,4.9704732,0,-304.85569,0,5334.9745,0,-41155.518,0,165765.28,0,-373725.36,0,474343.72,0,-316229.15,0,86032.930,0,0,0,
|
||||
0.25701705,0,-47.291137,0,1379.3248,0,-14896.708,0,77143.667,0,-212573.66,0,318860.49,0,-245277.30,0,75627.168,0,0,0,0,
|
||||
0,-4.9304419,0,287.60911,0,-4659.2675,0,32171.133,0,-110811.68,0,199461.03,0,-179003.48,0,63077.418,0,0,0,0,0,
|
||||
-0.25985710,0,45.474993,0,-1227.8248,0,11868.973,0,-52562.595,0,115637.71,0,-122646.06,0,49867.078,0,0,0,0,0,0,
|
||||
0,4.8614812,0,-262.51999,0,3806.5398,0,-22476.711,0,61810.956,0,-78668.489,0,37317.104,0,0,0,0,0,0,0,
|
||||
0.26442972,0,-42.837614,0,1035.2423,0,-8558.0034,0,30258.655,0,-47069.019,0,26387.177,0,0,0,0,0,0,0,0,
|
||||
0,-4.7597349,0,230.05386,0,-2852.6678,0,13448.291,0,-26149.455,0,17591.451,0,0,0,0,0,0,0,0,0,
|
||||
-0.27121107,0,39.325605,0,-812.72917,0,5364.0125,0,-13410.031,0,11026.026,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.6185581,0,-190.90040,0,1889.9140,0,-6299.7132,0,6474.7052,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.28107649,0,-34.853485,0,575.08251,0,-2683.7184,0,3546.3421,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.4263970,0,146.07110,0,-1022.4977,0,1801.5436,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.29575109,0,29.279358,0,-341.59251,0,842.59486,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.1615868,0,-97.103691,0,359.28366,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31917913,0,-22.342539,0,137.77899,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.7765784,0,46.577801,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.36340143,0,13.445853,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1260973,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.50711995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.17619705,0,-37.001381,0,1276.5476,0,-17020.635,0,114889.29,0,-444238.58,0,1043287.6,0,-1513340.2,0,1324172.7,0,-640449.54,0,131460.69,
|
||||
0,-5.1066757,0,352.36062,0,-7047.2125,0,63424.912,0,-306553.74,0,863924.19,0,-1462025.5,0,1462025.5,0,-795513.90,0,181432.99,0,
|
||||
-0.24977567,0,51.703565,0,-1723.4522,0,21715.497,0,-134946.30,0,464815.05,0,-929630.09,0,1072650.1,0,-661467.56,0,168609.38,0,0,
|
||||
0,5.0821831,0,-338.81221,0,6403.5507,0,-53057.992,0,228444.13,0,-548265.92,0,738050.27,0,-520149.72,0,149160.58,0,0,0,
|
||||
0.25160556,0,-50.321111,0,1585.1150,0,-18387.334,0,101787.03,0,-298575.28,0,475006.13,0,-386268.72,0,125537.33,0,0,0,0,
|
||||
0,-5.0321111,0,317.02300,0,-5516.2002,0,40714.811,0,-149287.64,0,285003.68,0,-270388.11,0,100429.87,0,0,0,0,0,
|
||||
-0.25481085,0,48.159251,0,-1396.6183,0,14431.722,0,-68035.262,0,158748.94,0,-177991.24,0,76281.961,0,0,0,0,0,0,
|
||||
0,4.9540892,0,-287.33717,0,4453.7262,0,-27994.850,0,81651.647,0,-109858.58,0,54929.290,0,0,0,0,0,0,0,
|
||||
0.25966483,0,-45.181680,0,1167.1934,0,-10271.302,0,38517.382,0,-63339.695,0,37428.002,0,0,0,0,0,0,0,0,
|
||||
0,-4.8439846,0,250.27254,0,-3303.5975,0,16517.987,0,-33953.641,0,24076.218,0,0,0,0,0,0,0,0,0,
|
||||
-0.26665257,0,41.331149,0,-909.28528,0,6364.9970,0,-16821.778,0,14578.874,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.6949030,0,-206.57573,0,2169.0452,0,-7643.3022,0,8280.2440,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.27664982,0,-36.517776,0,639.06107,0,-3152.7013,0,4391.2625,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-4.4950274,0,157.32596,0,-1164.2121,0,2162.1082,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.29136935,0,30.593782,0,-377.32331,0,981.04061,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,4.2223431,0,-104.15113,0,406.18940,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.31471487,0,-23.288900,0,151.37785,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,-3.8286716,0,49.772731,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-0.35858795,0,13.984930,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,3.1669631,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0.50074083,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
267
scratch/c_legendrefn.c
Normal file
267
scratch/c_legendrefn.c
Normal file
@ -0,0 +1,267 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "c_legendrecoefs.c"
|
||||
|
||||
static const float amsleg_pif = 3.14159265359;
|
||||
static const double amsleg_pi = 3.14159265359;
|
||||
|
||||
|
||||
float amsleg_polyvalf(float x, const float *coefs, int polyorder)
|
||||
{
|
||||
float ret = 0.0f;
|
||||
float xv = 1.0f;
|
||||
int I;
|
||||
|
||||
for(I=0;I<=polyorder;I++)
|
||||
{
|
||||
//printf("debug: %d %1.6g\n",I,coefs[I]);
|
||||
ret = ret + coefs[I]*xv;
|
||||
xv = xv * x;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
double amsleg_polyval(double x, const double *coefs, int polyorder)
|
||||
{
|
||||
double ret = 0.0;
|
||||
double xv = 1.0;
|
||||
int I;
|
||||
|
||||
for(I=0;I<=polyorder;I++)
|
||||
{
|
||||
ret = ret + coefs[I]*xv;
|
||||
xv = xv * x;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//Schmidt Quasi-Normalized Legendre Function P^n_m(x)
|
||||
//for degree n, and order m, m<=n
|
||||
//n from 0 to 20
|
||||
//m from 0 to n
|
||||
float amsleg_legendref(float x, int n, int m)
|
||||
{
|
||||
float ret = 0.0f;
|
||||
int I, mo2, mr, ind;
|
||||
|
||||
float mpart = 1.0f;
|
||||
float ppart = 0.0f;
|
||||
|
||||
const float *coefptr = NULL;
|
||||
|
||||
if(x<-1.0f) x=-1.0f;
|
||||
if(x>1.0f) x = 1.0f;
|
||||
|
||||
if(m<0)
|
||||
{
|
||||
m = -m;
|
||||
}
|
||||
if(m>n || n<0 || n>20)
|
||||
{
|
||||
ret = 0.0f;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(m>0)
|
||||
{
|
||||
mo2 = m/2;
|
||||
mr = (m%2==1);
|
||||
for(I=0;I<mo2;I++)
|
||||
{
|
||||
mpart = mpart*(1.0f-x*x);
|
||||
}
|
||||
if(mr==1)
|
||||
{
|
||||
mpart = mpart*sqrt(1.0f-x*x);
|
||||
}
|
||||
}
|
||||
|
||||
ind = n*(n+1)/2 + m;
|
||||
//printf("debug: ind=%d\n",ind);
|
||||
coefptr = &(amslegendrecoefsf[ind*(amslegendre_maxporder+1)]);
|
||||
|
||||
// printf("debug ");
|
||||
// for(I=0;I<amslegendre_maxporder+1;I++)
|
||||
// {
|
||||
// printf("%1.6g,",coefptr[I]);
|
||||
// }
|
||||
// printf("\n");
|
||||
|
||||
ppart = amsleg_polyvalf(x,coefptr,amslegendre_maxporder);
|
||||
|
||||
|
||||
ret = ppart*mpart;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//Schmidt Quasi-Normalized Legendre Function P^n_m(x)
|
||||
//for degree n, and order m, m<=n
|
||||
//n from 0 to 20
|
||||
//m from 0 to n
|
||||
double amsleg_legendre(double x, int n, int m)
|
||||
{
|
||||
double ret = 0.0;
|
||||
int I, mo2, mr, ind;
|
||||
|
||||
double mpart = 1.0;
|
||||
double ppart = 0.0;
|
||||
|
||||
const double *coefptr = NULL;
|
||||
|
||||
if(x<-1.0f) x=-1.0f;
|
||||
if(x>1.0f) x = 1.0f;
|
||||
|
||||
if(m<0)
|
||||
{
|
||||
m = -m;
|
||||
}
|
||||
if(m>n || n<0 || n>20)
|
||||
{
|
||||
ret = 0.0f;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(m>0)
|
||||
{
|
||||
mo2 = m/2;
|
||||
mr = (m%2==1);
|
||||
for(I=0;I<mo2;I++)
|
||||
{
|
||||
mpart = mpart*(1.0f-x*x);
|
||||
}
|
||||
if(mr==1)
|
||||
{
|
||||
mpart = mpart*sqrt(1.0f-x*x);
|
||||
}
|
||||
}
|
||||
|
||||
ind = n*(n+1)/2 + m;
|
||||
coefptr = &(amslegendrecoefs[ind*(amslegendre_maxporder+1)]);
|
||||
ppart = amsleg_polyval(x,coefptr,amslegendre_maxporder);
|
||||
|
||||
|
||||
ret = ppart*mpart;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
float amsleg_rsphcosf(float theta,float phi,int n,int m)
|
||||
{
|
||||
float ret = 0.0f;
|
||||
float p;
|
||||
|
||||
ret = amsleg_legendref(cosf(theta),n,m)*cosf(m*phi);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
float amsleg_rsphsinf(float theta,float phi,int n,int m)
|
||||
{
|
||||
float ret = 0.0f;
|
||||
float p;
|
||||
|
||||
ret = amsleg_legendref(cosf(theta),n,m)*sinf(m*phi);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
float amsleg_dotprodf(int n1, int m1, int sc1, int n2, int m2, int sc2)
|
||||
{
|
||||
float ret = 0.0f;
|
||||
float p1,p2;
|
||||
int Ntheta = 360;
|
||||
int Nphi = 720;
|
||||
int I,J;
|
||||
float dtheta,dphi,theta,phi;
|
||||
float domega = 0.0f;
|
||||
|
||||
dtheta = amsleg_pif/(Ntheta);
|
||||
dphi = 2.0f*amsleg_pif/(Nphi);
|
||||
for(I=0;I<Ntheta;I++)
|
||||
{
|
||||
for(J=0;J<Nphi;J++)
|
||||
{
|
||||
theta = dtheta*I;
|
||||
phi = dphi*J;
|
||||
domega = dtheta*dphi*sin(theta);
|
||||
|
||||
if(sc1==0)
|
||||
p1 = amsleg_rsphcosf(theta,phi,n1,m1);
|
||||
else
|
||||
p1 = amsleg_rsphsinf(theta,phi,n1,m1);
|
||||
|
||||
if(sc2==0)
|
||||
p2 = amsleg_rsphcosf(theta,phi,n2,m2);
|
||||
else
|
||||
p2 = amsleg_rsphsinf(theta,phi,n2,m2);
|
||||
|
||||
ret = ret + p1*p2*domega;
|
||||
//ret = ret + domega;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void amsleg_test1()
|
||||
{
|
||||
int n = 20;
|
||||
int m = 20;
|
||||
float p;
|
||||
float x;
|
||||
|
||||
printf("Test legendre fn %d %d \n",n,m);
|
||||
for(x=-1.0f; x<=1.005f; x = x + 0.01f)
|
||||
{
|
||||
p = amsleg_legendref(x,n,m);
|
||||
printf("%1.4g\t\t%1.4g\n",x,p);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void amsleg_test2()
|
||||
{
|
||||
int n1 = 3;
|
||||
int m1 = 1;
|
||||
|
||||
int n2;
|
||||
int m2;
|
||||
|
||||
float dp;
|
||||
|
||||
//for Schmidt quasi normalized spherical harmonics:
|
||||
// 1/4pi * integral( C_mn C_MN sin(th)dthdphi ) = 1/(2n+1) del_nN del_mM
|
||||
// there is a factor of 1/(2n+1)
|
||||
|
||||
printf("dot products with (%d,%d).\n",n1,m1);
|
||||
|
||||
for(n2 = 0; n2<5; n2++)
|
||||
{
|
||||
for(m2 = 0; m2<=n2; m2++)
|
||||
{
|
||||
dp = amsleg_dotprodf(n2,m2,1,n2,m2,1);
|
||||
if(dp<1E-4) dp = 0;
|
||||
dp = dp/4.0f/amsleg_pif;
|
||||
dp = dp * (2*n2+1);
|
||||
printf("(%d,%d): %1.6g\n",n2,m2,dp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
printf("Legendre Function Tests\n");
|
||||
|
||||
amsleg_test2();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
90
scratch/legendre.sage
Normal file
90
scratch/legendre.sage
Normal file
@ -0,0 +1,90 @@
|
||||
#!/usr/bin/sage
|
||||
|
||||
# Schmidt Quasi-Normalized Legendre Functions for Spherical Harmonics
|
||||
|
||||
x = var('x');
|
||||
|
||||
def polypart(n,m):
|
||||
pol = (x^2-1)^n
|
||||
for I in range(1,n+1):
|
||||
pol = diff(pol,x)
|
||||
for I in range(1,m+1):
|
||||
pol = diff(pol,x)
|
||||
return pol
|
||||
|
||||
def normpart(n,m):
|
||||
if(m==0):
|
||||
nrm = 1/2^n/factorial(n)
|
||||
else:
|
||||
nrm = (1/2^n/factorial(n)) * sqrt(2*factorial(n-m)/factorial(n+m))
|
||||
return nrm
|
||||
|
||||
NN = 20
|
||||
|
||||
|
||||
lns = []
|
||||
coefs = []
|
||||
nmaxcoefs = 0
|
||||
for I in range(0,NN+1):
|
||||
for J in range(0,I+1):
|
||||
pol = polypart(I,J)
|
||||
nrm = normpart(I,J)
|
||||
pol2 = expand(pol)
|
||||
p2c = pol2.coefficients(sparse=False)
|
||||
|
||||
pol3 = nrm*pol2
|
||||
p3c = pol3.coefficients(sparse=False)
|
||||
for K in range(0,len(p3c)):
|
||||
p3c[K] = p3c[K].n()
|
||||
|
||||
coefs.append(p3c)
|
||||
if(nmaxcoefs<len(p3c)):
|
||||
nmaxcoefs = len(p3c)
|
||||
|
||||
#print("{:d}\t{:d}\t{}\t\t{}".format(I,J,nrm,p2c))
|
||||
|
||||
s = ""
|
||||
s = s + "{:d}\t{:d}\t".format(I,J)
|
||||
for K in range(0,len(p3c)):
|
||||
nn = p3c[K]
|
||||
if(abs(nn)<1E-14):
|
||||
nn = 0
|
||||
s = s + "{:1.8g}\t".format(nn)
|
||||
s = s + "\n"
|
||||
print(s)
|
||||
lns.append(s)
|
||||
|
||||
##C style coefficient output
|
||||
|
||||
fout = "c_legendrecoefs2.c"
|
||||
fp = open(fout,"w+")
|
||||
|
||||
|
||||
pref1 = "static const int amslegendre_ndegree = {:d};\n".format(NN)
|
||||
pref2 = "static const int amslegendre_maxporder = {:d};\n".format(nmaxcoefs-1)
|
||||
pref = pref1 + pref2 + "static const float amslegendrecoefs[] = { \n"
|
||||
|
||||
for I in range(0,NN+1):
|
||||
for J in range(0,I+1):
|
||||
ind = I*(I+1)/2+J
|
||||
for K in range(0,nmaxcoefs):
|
||||
if(K<len(coefs[ind])):
|
||||
nn = coefs[ind][K]
|
||||
if(abs(nn)<1E-14):
|
||||
nn = 0
|
||||
else:
|
||||
nn = 0
|
||||
|
||||
if(ind<len(coefs)-1):
|
||||
if(K<nmaxcoefs-1):
|
||||
pref = pref + "{:1.8g},".format(nn)
|
||||
else:
|
||||
pref = pref + "{:1.8g},\n".format(nn)
|
||||
else:
|
||||
if(K<nmaxcoefs-1):
|
||||
pref = pref + "{:1.8g},".format(nn)
|
||||
else:
|
||||
pref = pref + "{:1.8g}".format(nn) + "\n};\n\n"
|
||||
|
||||
fp.writelines(pref)
|
||||
fp.close()
|
96
scratch/legendre.sage.py
Normal file
96
scratch/legendre.sage.py
Normal file
@ -0,0 +1,96 @@
|
||||
|
||||
|
||||
# This file was *autogenerated* from the file ./legendre.sage
|
||||
from sage.all_cmdline import * # import sage library
|
||||
|
||||
_sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_20 = Integer(20); _sage_const_1En14 = RealNumber('1E-14')#!/usr/bin/sage
|
||||
|
||||
# Schmidt Quasi-Normalized Legendre Functions for Spherical Harmonics
|
||||
|
||||
x = var('x');
|
||||
|
||||
def polypart(n,m):
|
||||
pol = (x**_sage_const_2 -_sage_const_1 )**n
|
||||
for I in range(_sage_const_1 ,n+_sage_const_1 ):
|
||||
pol = diff(pol,x)
|
||||
for I in range(_sage_const_1 ,m+_sage_const_1 ):
|
||||
pol = diff(pol,x)
|
||||
return pol
|
||||
|
||||
def normpart(n,m):
|
||||
if(m==_sage_const_0 ):
|
||||
nrm = _sage_const_1 /_sage_const_2 **n/factorial(n)
|
||||
else:
|
||||
nrm = (_sage_const_1 /_sage_const_2 **n/factorial(n)) * sqrt(_sage_const_2 *factorial(n-m)/factorial(n+m))
|
||||
return nrm
|
||||
|
||||
NN = _sage_const_20
|
||||
|
||||
|
||||
lns = []
|
||||
coefs = []
|
||||
nmaxcoefs = _sage_const_0
|
||||
for I in range(_sage_const_0 ,NN+_sage_const_1 ):
|
||||
for J in range(_sage_const_0 ,I+_sage_const_1 ):
|
||||
pol = polypart(I,J)
|
||||
nrm = normpart(I,J)
|
||||
pol2 = expand(pol)
|
||||
p2c = pol2.coefficients(sparse=False)
|
||||
|
||||
pol3 = nrm*pol2
|
||||
p3c = pol3.coefficients(sparse=False)
|
||||
for K in range(_sage_const_0 ,len(p3c)):
|
||||
p3c[K] = p3c[K].n()
|
||||
|
||||
coefs.append(p3c)
|
||||
if(nmaxcoefs<len(p3c)):
|
||||
nmaxcoefs = len(p3c)
|
||||
|
||||
#print("{:d}\t{:d}\t{}\t\t{}".format(I,J,nrm,p2c))
|
||||
|
||||
s = ""
|
||||
s = s + "{:d}\t{:d}\t".format(I,J)
|
||||
for K in range(_sage_const_0 ,len(p3c)):
|
||||
nn = p3c[K]
|
||||
if(abs(nn)<_sage_const_1En14 ):
|
||||
nn = _sage_const_0
|
||||
s = s + "{:1.8g}\t".format(nn)
|
||||
s = s + "\n"
|
||||
print(s)
|
||||
lns.append(s)
|
||||
|
||||
##C style coefficient output
|
||||
|
||||
fout = "c_legendrecoefs.c"
|
||||
fp = open(fout,"w+")
|
||||
|
||||
|
||||
pref1 = "static const int amslegendre_ndegree = {:d};\n".format(NN)
|
||||
pref2 = "static const int amslegendre_maxporder = {:d};\n".format(nmaxcoefs-_sage_const_1 )
|
||||
pref = pref1 + pref2 + "static const float amslegendrecoefs[] = { \n"
|
||||
|
||||
for I in range(_sage_const_0 ,NN+_sage_const_1 ):
|
||||
for J in range(_sage_const_0 ,I+_sage_const_1 ):
|
||||
ind = I*(I+_sage_const_1 )/_sage_const_2 +J
|
||||
for K in range(_sage_const_0 ,nmaxcoefs):
|
||||
if(K<len(coefs[ind])):
|
||||
nn = coefs[ind][K]
|
||||
if(abs(nn)<_sage_const_1En14 ):
|
||||
nn = _sage_const_0
|
||||
else:
|
||||
nn = _sage_const_0
|
||||
|
||||
if(ind<len(coefs)-_sage_const_1 ):
|
||||
if(K<nmaxcoefs-_sage_const_1 ):
|
||||
pref = pref + "{:1.8g},".format(nn)
|
||||
else:
|
||||
pref = pref + "{:1.8g},\n".format(nn)
|
||||
else:
|
||||
if(K<nmaxcoefs-_sage_const_1 ):
|
||||
pref = pref + "{:1.8g},".format(nn)
|
||||
else:
|
||||
pref = pref + "{:1.8g}".format(nn) + "\n};\n\n"
|
||||
|
||||
fp.writelines(pref)
|
||||
fp.close()
|
||||
|
0
scratch/legendre_equations.tex
Normal file
0
scratch/legendre_equations.tex
Normal file
0
scratch/new file
Normal file
0
scratch/new file
Normal file
BIN
scratch/testcl
Normal file
BIN
scratch/testcl
Normal file
Binary file not shown.
5
scratch/testcl.sh
Normal file
5
scratch/testcl.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
gcc c_legendrefn.c -o testcl -lm
|
||||
|
||||
./testcl
|
Reference in New Issue
Block a user