PLaSK library
Loading...
Searching...
No Matches
patterson-data.cpp
Go to the documentation of this file.
1/*
2 * This file is part of PLaSK (https://plask.app) by Photonics Group at TUL
3 * Copyright (c) 2022 Lodz University of Technology
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#include "patterson-data.hpp"
15
16namespace plask { namespace optical { namespace modal {
17
18const double patterson_points[] = {
19 0.000000000000000,
20 0.007047138459337,
21 0.014093886410782,
22 0.021139853378331,
23 0.028184648949746,
24 0.035227882808441,
25 0.042269164765364,
26 0.049308104790869,
27 0.056344313046593,
28 0.063377399917322,
29 0.070406976042855,
30 0.077432652349857,
31 0.084454040083711,
32 0.091470750840355,
33 0.098482396598119,
34 0.105488589749542,
35 0.112488943133187,
36 0.119483070065440,
37 0.126470584372302,
38 0.133451100421162,
39 0.140424233152560,
40 0.147389598111940,
41 0.154346811481378,
42 0.161295490111305,
43 0.168235251552207,
44 0.175165714086311,
45 0.182086496759252,
46 0.188997219411722,
47 0.195897502711100,
48 0.202786968183065,
49 0.209665238243181,
50 0.216531936228473,
51 0.223386686428967,
52 0.230229114119222,
53 0.237058845589830,
54 0.243875508178893,
55 0.250678730303483,
56 0.257468141491070,
57 0.264243372410927,
58 0.271004054905513,
59 0.277749822021824,
60 0.284480308042726,
61 0.291195148518247,
62 0.297893980296858,
63 0.304576441556714,
64 0.311242171836872,
65 0.317890812068477,
66 0.324522004605922,
67 0.331135393257977,
68 0.337730623318886,
69 0.344307341599438,
70 0.350865196458001,
71 0.357403837831532,
72 0.363922917266550,
73 0.370422087950078,
74 0.376901004740559,
75 0.383359324198730,
76 0.389796704618471,
77 0.396212806057616,
78 0.402607290368737,
79 0.408979821229889,
80 0.415330064175322,
81 0.421657686626163,
82 0.427962357921063,
83 0.434243749346803,
84 0.440501534168876,
85 0.446735387662028,
86 0.452944987140767,
87 0.459130011989832,
88 0.465290143694635,
89 0.471425065871659,
90 0.477534464298829,
91 0.483618026945841,
92 0.489675444004456,
93 0.495706407918761,
94 0.501710613415392,
95 0.507687757533717,
96 0.513637539655989,
97 0.519559661537457,
98 0.525453827336443,
99 0.531319743644376,
100 0.537157119515795,
101 0.542965666498311,
102 0.548745098662529,
103 0.554495132631933,
104 0.560215487612728,
105 0.565905885423654,
106 0.571566050525743,
107 0.577195710052046,
108 0.582794593837319,
109 0.588362434447663,
110 0.593898967210122,
111 0.599403930242243,
112 0.604877064481584,
113 0.610318113715186,
114 0.615726824608993,
115 0.621102946737226,
116 0.626446232611720,
117 0.631756437711194,
118 0.637033320510492,
119 0.642276642509759,
120 0.647486168263572,
121 0.652661665410017,
122 0.657802904699714,
123 0.662909660024781,
124 0.667981708447750,
125 0.673018830230419,
126 0.678020808862644,
127 0.682987431091079,
128 0.687918486947839,
129 0.692813769779115,
130 0.697673076273711,
131 0.702496206491527,
132 0.707282963891961,
133 0.712033155362252,
134 0.716746591245747,
135 0.721423085370099,
136 0.726062455075390,
137 0.730664521242181,
138 0.735229108319492,
139 0.739756044352695,
140 0.744245161011347,
141 0.748696293616937,
142 0.753109281170558,
143 0.757483966380514,
144 0.761820195689839,
145 0.766117819303760,
146 0.770376691217077,
147 0.774596669241483,
148 0.778777615032823,
149 0.782919394118283,
150 0.787021875923539,
151 0.791084933799848,
152 0.795108445051101,
153 0.799092290960841,
154 0.803036356819269,
155 0.806940531950218,
156 0.810804709738147,
157 0.814628787655137,
158 0.818412667287926,
159 0.822156254364980,
160 0.825859458783650,
161 0.829522194637401,
162 0.833144380243173,
163 0.836725938168869,
164 0.840266795261030,
165 0.843766882672709,
166 0.847226135891581,
167 0.850644494768350,
168 0.854021903545469,
169 0.857358310886232,
170 0.860653669904300,
171 0.863907938193690,
172 0.867121077859315,
173 0.870293055548114,
174 0.873423842480859,
175 0.876513414484705,
176 0.879561752026556,
177 0.882568840247342,
178 0.885534668997285,
179 0.888459232872257,
180 0.891342531251320,
181 0.894184568335559,
182 0.896985353188317,
183 0.899744899776940,
184 0.902463227016166,
185 0.905140358813262,
186 0.907776324115059,
187 0.910371156957004,
188 0.912924896514371,
189 0.915437587155765,
190 0.917909278499078,
191 0.920340025470012,
192 0.922729888363349,
193 0.925078932907076,
194 0.927387230329537,
195 0.929654857429740,
196 0.931881896650954,
197 0.934068436157726,
198 0.936214569916451,
199 0.938320397779593,
200 0.940386025573670,
201 0.942411565191083,
202 0.944397134685867,
203 0.946342858373403,
204 0.948248866934137,
205 0.950115297521295,
206 0.951942293872574,
207 0.953730006425761,
208 0.955478592438184,
209 0.957188216109861,
210 0.958859048710200,
211 0.960491268708020,
212 0.962085061904651,
213 0.963640621569812,
214 0.965158148579916,
215 0.966637851558417,
216 0.968079947017760,
217 0.969484659502459,
218 0.970852221732792,
219 0.972182874748582,
220 0.973476868052507,
221 0.974734459752403,
222 0.975955916702012,
223 0.977141514639706,
224 0.978291538324759,
225 0.979406281670863,
226 0.980486047876721,
227 0.981531149553740,
228 0.982541908851081,
229 0.983518657578633,
230 0.984461737328815,
231 0.985371499598520,
232 0.986248305913008,
233 0.987092527954034,
234 0.987904547695124,
235 0.988684757547429,
236 0.989433560520241,
237 0.990151370400770,
238 0.990838611958294,
239 0.991495721178106,
240 0.992123145530863,
241 0.992721344282789,
242 0.993290788851685,
243 0.993831963212755,
244 0.994345364356723,
245 0.994831502800621,
246 0.995290903148810,
247 0.995724104698407,
248 0.996131662079315,
249 0.996514145914890,
250 0.996872143485260,
251 0.997206259372222,
252 0.997517116063472,
253 0.997805354495957,
254 0.998071634524930,
255 0.998316635318407,
256 0.998541055697168,
257 0.998745614468095,
258 0.998931050830811,
259 0.999098124967668,
260 0.999247618943342,
261 0.999380338025024,
262 0.999497112467187,
263 0.999598799671911,
264 0.999686286448318,
265 0.999760490924432,
266 0.999822363679788,
267 0.999872888120358,
268 0.999913081144678,
269 0.999943996207054,
270 0.999966730098486,
271 0.999982430354892,
272 0.999992298136258,
273 0.999997596379748,
274 0.999999672956734
275};
276const double patterson_weights[][256] = {
277 { // n = 1
278 2.
279 },
280 { // n = 3
281 0.888888888888889,
282 0.555555555555556
283 },
284 { // n = 7
285 0.450916538658474,
286 0.401397414775962,
287 0.268488089868333,
288 0.104656226026467
289 },
290 { // n = 15
291 0.225510499798207,
292 0.219156858401587,
293 0.200628529376989,
294 0.171511909136391,
295 0.134415255243784,
296 0.0929271953151245,
297 0.0516032829970797,
298 0.0170017196299403
299 },
300 { // n = 31
301 0.112755256720769,
302 0.111956873020953,
303 0.109578421055925,
304 0.105669893580235,
305 0.100314278611796,
306 0.0936271099812645,
307 0.0857559200499903,
308 0.0768796204990035,
309 0.0672077542959907,
310 0.0569795094941234,
311 0.046462893261758,
312 0.0359571033071293,
313 0.0258075980961767,
314 0.0164460498543878,
315 0.00843456573932111,
316 0.00254478079156187
317 },
318 { // n = 63
319 0.0563776283603847,
320 0.0562776998312543,
321 0.0559784365104763,
322 0.0554814043565594,
323 0.0547892105279629,
324 0.0539054993352661,
325 0.0528349467901165,
326 0.0515832539520485,
327 0.0501571393058995,
328 0.0485643304066732,
329 0.046813554990628,
330 0.0449145316536322,
331 0.0428779600250077,
332 0.0407155101169443,
333 0.0384398102494555,
334 0.0360644327807826,
335 0.0336038771482077,
336 0.031073551111688,
337 0.0284897547458336,
338 0.0258696793272147,
339 0.0232314466399103,
340 0.0205942339159127,
341 0.0179785515681283,
342 0.0154067504665595,
343 0.0129038001003513,
344 0.0104982469096213,
345 0.00822300795723593,
346 0.00611550682211725,
347 0.00421763044155885,
348 0.00257904979468569,
349 0.00126515655623007,
350 0.000363221481845531
351 },
352 { // n = 127
353 0.0281888141801924,
354 0.0281763190330166,
355 0.0281388499156272,
356 0.0280764557938172,
357 0.0279892182552382,
358 0.0278772514766137,
359 0.0277407021782797,
360 0.0275797495664819,
361 0.0273946052639814,
362 0.0271855132296248,
363 0.026952749667633,
364 0.0266966229274504,
365 0.0264174733950583,
366 0.0261156733767061,
367 0.0257916269760242,
368 0.0254457699654648,
369 0.0250785696529498,
370 0.0246905247444877,
371 0.0242821652033366,
372 0.0238540521060385,
373 0.023406777495314,
374 0.0229409642293877,
375 0.0224572658268161,
376 0.0219563663053178,
377 0.0214389800125039,
378 0.020905851445812,
379 0.0203577550584722,
380 0.0197954950480975,
381 0.0192199051247278,
382 0.0186318482561388,
383 0.0180322163903913,
384 0.0174219301594642,
385 0.0168019385741039,
386 0.0161732187295777,
387 0.015536775555844,
388 0.0148936416648152,
389 0.0142448773729168,
390 0.0135915710097655,
391 0.0129348396636074,
392 0.0122758305600828,
393 0.0116157233199551,
394 0.0109557333878379,
395 0.0102971169579564,
396 0.00964117772970254,
397 0.00898927578406414,
398 0.00834283875396816,
399 0.00770337523327974,
400 0.00707248999543356,
401 0.00645190005017574,
402 0.00584344987583564,
403 0.00524912345480886,
404 0.00467105037211432,
405 0.00411150397865469,
406 0.0035728927835173,
407 0.00305775341017553,
408 0.00256876494379402,
409 0.00210881524572663,
410 0.00168114286542147,
411 0.00128952408261042,
412 0.000938369848542382,
413 0.000632607319362634,
414 0.000377746646326985,
415 0.000180739564445388,
416 5.05360952078625e-05
417 },
418 { // n = 255
419 0.0140944070900962,
420 0.0140928450691604,
421 0.0140881595165083,
422 0.0140803519625537,
423 0.0140694249578136,
424 0.01405538207265,
425 0.0140382278969086,
426 0.0140179680394566,
427 0.0139946091276191,
428 0.0139681588065169,
429 0.0139386257383069,
430 0.0139060196013255,
431 0.0138703510891398,
432 0.0138316319095064,
433 0.0137898747832409,
434 0.0137450934430019,
435 0.0136973026319907,
436 0.0136465181025713,
437 0.0135927566148124,
438 0.0135360359349562,
439 0.0134763748338165,
440 0.0134137930851101,
441 0.0133483114637252,
442 0.0132799517439305,
443 0.0132087366975291,
444 0.0131346900919602,
445 0.013057836688353,
446 0.0129782022395374,
447 0.0128958134880121,
448 0.0128106981638774,
449 0.0127228849827324,
450 0.0126324036435421,
451 0.0125392848264749,
452 0.012443560190714,
453 0.0123452623722438,
454 0.012244424981612,
455 0.0121410826016683,
456 0.0120352707852796,
457 0.0119270260530193,
458 0.0118163858908302,
459 0.011703388747657,
460 0.011588074033044,
461 0.0114704821146939,
462 0.0113506543159806,
463 0.011228632913408,
464 0.0111044611340069,
465 0.0109781831526589,
466 0.0108498440893373,
467 0.0107194900062519,
468 0.0105871679048852,
469 0.010452925722906,
470 0.0103168123309476,
471 0.0101788775292361,
472 0.0100391720440568,
473 0.00989774752404875,
474 0.00975465653631741,
475 0.00960995256236388,
476 0.00946368999383007,
477 0.0093159241280694,
478 0.00916671116356079,
479 0.00901610819519564,
480 0.0088641732094825,
481 0.00871096507973209,
482 0.00855654356130769,
483 0.00840096928705193,
484 0.00824430376303287,
485 0.00808660936478886,
486 0.00792794933429485,
487 0.00776838777792199,
488 0.00760798966571906,
489 0.00744682083240759,
490 0.00728494798055381,
491 0.00712243868645839,
492 0.00695936140939042,
493 0.00679578550488277,
494 0.00663178124290189,
495 0.00646741983180369,
496 0.00630277344908576,
497 0.00613791528004138,
498 0.00597291956550817,
499 0.00580786165997757,
500 0.00564281810138444,
501 0.00547786669391895,
502 0.00531308660518706,
503 0.00514855847897818,
504 0.00498436456476554,
505 0.00482058886485127,
506 0.00465731729975685,
507 0.00449463789203207,
508 0.00433264096809298,
509 0.00417141937698408,
510 0.00401106872407502,
511 0.00385168761663987,
512 0.00369337791702565,
513 0.00353624499771678,
514 0.00338039799108692,
515 0.00322595002508787,
516 0.00307301843470258,
517 0.00292172493791782,
518 0.00277219576459345,
519 0.00262456172740443,
520 0.00247895822665757,
521 0.00233552518605716,
522 0.00219440692536384,
523 0.00205575198932735,
524 0.00191971297101387,
525 0.00178644639175865,
526 0.00165611272815445,
527 0.00152887670508777,
528 0.00140490799565514,
529 0.00128438247189701,
530 0.00116748411742996,
531 0.00105440762286332,
532 0.000945361516858525,
533 0.000840571432710722,
534 0.000740282804244503,
535 0.000644762041305725,
536 0.000554295314930375,
537 0.00046918492424785,
538 0.000389745284473282,
539 0.000316303660822264,
540 0.000249212400482997,
541 0.000188873264506505,
542 0.000135754910949229,
543 9.03727346587511e-05,
544 5.32752936697806e-05,
545 2.51578703842807e-05,
546 6.93793643241083e-06
547 },
548 { // n = 511
549 0.00704720354504809,
550 0.00704700828844548,
551 0.0070464225345802,
552 0.00704544633127951,
553 0.00704407975825415,
554 0.00704232292709631,
555 0.00704017598127683,
556 0.00703763909614153,
557 0.00703471247890679,
558 0.00703139636865429,
559 0.00702769103632498,
560 0.00702359678471226,
561 0.00701911394845431,
562 0.00701424289402573,
563 0.0070089840197283,
564 0.00700333775568107,
565 0.00699730456380954,
566 0.00699088493783425,
567 0.00698407940325847,
568 0.0069768885173552,
569 0.00696931286915343,
570 0.00696135307942367,
571 0.00695300980066273,
572 0.00694428371707783,
573 0.00693517554456992,
574 0.00692568603071643,
575 0.00691581595475321,
576 0.00690556612755588,
577 0.00689493739162047,
578 0.00688393062104341,
579 0.00687254672150095,
580 0.00686078663022781,
581 0.00684865131599536,
582 0.00683614177908911,
583 0.00682325905128565,
584 0.00681000419582895,
585 0.0067963783074062,
586 0.00678238251212301,
587 0.00676801796747811,
588 0.00675328586233753,
589 0.00673818741690826,
590 0.00672272388271144,
591 0.00670689654255505,
592 0.00669070671050613,
593 0.00667415573186259,
594 0.00665724498312455,
595 0.00663997587196526,
596 0.00662234983720169,
597 0.00660436834876457,
598 0.00658603290766825,
599 0.00656734504598008,
600 0.00654830632678944,
601 0.00652891834417652,
602 0.00650918272318071,
603 0.0064891011197687,
604 0.00646867522080231,
605 0.00644790674400606,
606 0.00642679743793437,
607 0.00640534908193868,
608 0.00638356348613414,
609 0.00636144249136619,
610 0.0063389879691769,
611 0.00631620182177104,
612 0.00629308598198199,
613 0.00626964241323744,
614 0.00624587310952491,
615 0.00622178009535702,
616 0.00619736542573666,
617 0.00617263118612192,
618 0.00614757949239084,
619 0.00612221249080599,
620 0.00609653235797889,
621 0.00607054130083415,
622 0.00604424155657355,
623 0.00601763539263978,
624 0.0059907251066801,
625 0.00596351302650963,
626 0.0059360015100746,
627 0.00590819294541512,
628 0.00588008975062789,
629 0.0058516943738285,
630 0.00582300929311348,
631 0.00579403701652198,
632 0.00576478008199711,
633 0.00573524105734694,
634 0.00570542254020497,
635 0.0056753271579903,
636 0.00564495756786715,
637 0.00561431645670402,
638 0.00558340654103216,
639 0.00555223056700346,
640 0.00552079131034779,
641 0.00548909157632946,
642 0.0054571341997031,
643 0.00542492204466866,
644 0.00539245800482556,
645 0.00535974500312597,
646 0.00532678599182712,
647 0.0052935839524426,
648 0.00526014189569259,
649 0.00522646286145301,
650 0.00519254991870342,
651 0.00515840616547381,
652 0.00512403472879005,
653 0.00508943876461804,
654 0.0050546214578065,
655 0.00501958602202842,
656 0.00498433569972103,
657 0.00494887376202437,
658 0.00491320350871842,
659 0.00487732826815871,
660 0.00484125139721057,
661 0.00480497628118194,
662 0.00476850633375475,
663 0.00473184499691503,
664 0.00469499574088179,
665 0.0046579620640347,
666 0.00462074749284081,
667 0.00458335558178039,
668 0.00454578991327213,
669 0.00450805409759782,
670 0.00447015177282693,
671 0.00443208660474125,
672 0.00439386228676004,
673 0.00435548253986604,
674 0.0043169511125328,
675 0.00427827178065384,
676 0.00423944834747438,
677 0.00420048464352597,
678 0.0041613845265651,
679 0.00412215188151643,
680 0.00408279062042158,
681 0.00404330468239443,
682 0.00400369803358422,
683 0.00396397466714742,
684 0.00392413860322996,
685 0.003884193888961,
686 0.00384414459846013,
687 0.00380399483285953,
688 0.00376374872034296,
689 0.0037234104162038,
690 0.00368298410292404,
691 0.0036424739902769,
692 0.00360188431545532,
693 0.00356121934322919,
694 0.00352048336613418,
695 0.00347968070469521,
696 0.00343881570768791,
697 0.00339789275244139,
698 0.00335691624518617,
699 0.00331589062145094,
700 0.00327482034651234,
701 0.00323370991590184,
702 0.00319256385597435,
703 0.00315138672454288,
704 0.00311018311158428,
705 0.00306895764002069,
706 0.00302771496658199,
707 0.00298645978275408,
708 0.00294519681581858,
709 0.00290393082998878,
710 0.00286266662764758,
711 0.00282140905069222,
712 0.00278016298199139,
713 0.00273893334695948,
714 0.00269772511525295,
715 0.00265654330259353,
716 0.00261539297272236,
717 0.00257427923948909,
718 0.00253320726907925,
719 0.00249218228238277,
720 0.00245120955750556,
721 0.00241029443242563,
722 0.00236944230779381,
723 0.00232865864987843,
724 0.00228794899365196,
725 0.00224731894601603,
726 0.00220677418916003,
727 0.00216632048404649,
728 0.00212596367401473,
729 0.00208570968849204,
730 0.00204556454679958,
731 0.00200553436203751,
732 0.00196562534503151,
733 0.00192584380831994,
734 0.00188619617015808,
735 0.00184668895851283,
736 0.00180732881501809,
737 0.00176812249885839,
738 0.00172907689054462,
739 0.00169019899554346,
740 0.00165149594771915,
741 0.00161297501254393,
742 0.00157464359003212,
743 0.00153650921735129,
744 0.00149857957106457,
745 0.00146086246895891,
746 0.00142336587141721,
747 0.00138609788229673,
748 0.00134906674928353,
749 0.00131228086370221,
750 0.00127574875977347,
751 0.00123947911332878,
752 0.00120348074001266,
753 0.00116776259302858,
754 0.00113233376051598,
755 0.00109720346268192,
756 0.0010623810488534,
757 0.00102787599466367,
758 0.000993697899638761,
759 0.000959856485506936,
760 0.000926361595613111,
761 0.000893223195879325,
762 0.000860451377808528,
763 0.000828056364077226,
764 0.000796048517297551,
765 0.000764438352543883,
766 0.000733236554224768,
767 0.000702453997827572,
768 0.000672101776960108,
769 0.000642191235948505,
770 0.000612734008012225,
771 0.00058374205871498,
772 0.000555227733977308,
773 0.000527203811431658,
774 0.000499683553312801,
775 0.000472680758429263,
776 0.000446209810101403,
777 0.000420285716355361,
778 0.000394924138246874,
779 0.000370141402122252,
780 0.000345954492129904,
781 0.000322381020652862,
782 0.000299439176850912,
783 0.000277147657465187,
784 0.000255525589595237,
785 0.000234592462123925,
786 0.000214368090034217,
787 0.000194872642236641,
788 0.000176126765545083,
789 0.000158151830411132,
790 0.000140970302204105,
791 0.000124606200241498,
792 0.000109085545645742,
793 9.44366322532705e-05,
794 8.06899228014035e-05,
795 6.78774554733972e-05,
796 5.60319507856164e-05,
797 4.51863674126296e-05,
798 3.5375137205519e-05,
799 2.66376412339001e-05,
800 1.90213681905876e-05,
801 1.25792781889593e-05,
802 7.36624069102322e-06,
803 3.45456507169149e-06,
804 9.45715933950007e-07
805 }
806};
807
808}}} // namespace plask::optical::effective