Last active
May 30, 2021 06:08
-
-
Save genkuroki/2985deeb80a6ee8eb4e4ea63096710e7 to your computer and use it in GitHub Desktop.
Wave equation on the pentagon Version 3 Part 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "@show VERSION\n@time using DifferentialEquations\n@time using Plots\n@time using ProgressMeter\n@time using Parameters\n@time using Fmt", | |
"execution_count": 1, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "VERSION = v\"1.7.0-DEV.1129\"\n 8.195601 seconds (18.92 M allocations: 1.416 GiB, 5.15% gc time)\n 3.705994 seconds (7.99 M allocations: 575.859 MiB, 8.32% gc time, 0.58% compilation time)\n 0.008682 seconds (7.40 k allocations: 541.883 KiB)\n 0.000537 seconds (251 allocations: 16.391 KiB)\n 0.005529 seconds (5.58 k allocations: 473.102 KiB)\n", | |
"name": "stdout" | |
}, | |
{ | |
"output_type": "stream", | |
"text": "WARNING: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).\n", | |
"name": "stderr" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "x ⪅ y = x < y || x ≈ y\n\nfunction isin_ngon(n, R, x, y)\n α = 2π/n\n θ = mod(angle(x + im*y), α)\n r = √(x^2 + y^2) / R\n X, Y = r*cos(θ), r*sin(θ)\n (1 - cos(α))*Y ⪅ sin(α)*(1 - X)\nend\n\nisin_unit_pentagon(x, y) = isin_ngon(5, 1, x, y)\n\nx = -1:0.1:1\ny = -1:0.1:1\nD = isin_unit_pentagon.(x, y')\nheatmap(x, y, D'; colorbar=false, size=(200, 200))", | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 2, | |
"data": { | |
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\" viewBox=\"0 0 800 800\">\n<defs>\n <clipPath id=\"clip730\">\n <rect x=\"0\" y=\"0\" width=\"800\" height=\"800\"/>\n </clipPath>\n</defs>\n<path clip-path=\"url(#clip730)\" d=\"\nM0 800 L800 800 L800 0 L0 0 Z\n \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n<defs>\n <clipPath id=\"clip731\">\n <rect x=\"160\" y=\"80\" width=\"561\" height=\"561\"/>\n </clipPath>\n</defs>\n<path clip-path=\"url(#clip730)\" d=\"\nM177.936 677.168 L752.756 677.168 L752.756 47.2441 L177.936 47.2441 Z\n \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n<defs>\n <clipPath id=\"clip732\">\n <rect x=\"177\" y=\"47\" width=\"576\" height=\"631\"/>\n </clipPath>\n</defs>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 191.622,677.168 191.622,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 328.484,677.168 328.484,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 465.346,677.168 465.346,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 602.208,677.168 602.208,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 739.07,677.168 739.07,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,677.168 752.756,677.168 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 191.622,677.168 191.622,669.609 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 328.484,677.168 328.484,669.609 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 465.346,677.168 465.346,669.609 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 602.208,677.168 602.208,669.609 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 739.07,677.168 739.07,669.609 \n \"/>\n<path clip-path=\"url(#clip730)\" d=\"M138.15 708.211 L167.826 708.211 L167.826 712.146 L138.15 712.146 L138.15 708.211 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M178.729 721.105 L186.368 721.105 L186.368 694.739 L178.057 696.406 L178.057 692.147 L186.321 690.48 L190.997 690.48 L190.997 721.105 L198.636 721.105 L198.636 725.04 L178.729 725.04 L178.729 721.105 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M208.08 719.16 L212.965 719.16 L212.965 725.04 L208.08 725.04 L208.08 719.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M233.15 693.559 Q229.539 693.559 227.71 697.123 Q225.904 700.665 225.904 707.795 Q225.904 714.901 227.71 718.466 Q229.539 722.007 233.15 722.007 Q236.784 722.007 238.59 718.466 Q240.418 714.901 240.418 707.795 Q240.418 700.665 238.59 697.123 Q236.784 693.559 233.15 693.559 M233.15 689.855 Q238.96 689.855 242.015 694.461 Q245.094 699.045 245.094 707.795 Q245.094 716.521 242.015 721.128 Q238.96 725.711 233.15 725.711 Q227.34 725.711 224.261 721.128 Q221.205 716.521 221.205 707.795 Q221.205 699.045 224.261 694.461 Q227.34 689.855 233.15 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M275.51 708.211 L305.186 708.211 L305.186 712.146 L275.51 712.146 L275.51 708.211 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M325.278 693.559 Q321.667 693.559 319.838 697.123 Q318.033 700.665 318.033 707.795 Q318.033 714.901 319.838 718.466 Q321.667 722.007 325.278 722.007 Q328.912 722.007 330.718 718.466 Q332.547 714.901 332.547 707.795 Q332.547 700.665 330.718 697.123 Q328.912 693.559 325.278 693.559 M325.278 689.855 Q331.088 689.855 334.144 694.461 Q337.222 699.045 337.222 707.795 Q337.222 716.521 334.144 721.128 Q331.088 725.711 325.278 725.711 Q319.468 725.711 316.389 721.128 Q313.334 716.521 313.334 707.795 Q313.334 699.045 316.389 694.461 Q319.468 689.855 325.278 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M345.44 719.16 L350.324 719.16 L350.324 725.04 L345.44 725.04 L345.44 719.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M360.556 690.48 L378.912 690.48 L378.912 694.415 L364.838 694.415 L364.838 702.887 Q365.857 702.54 366.875 702.378 Q367.894 702.193 368.912 702.193 Q374.699 702.193 378.079 705.364 Q381.458 708.535 381.458 713.952 Q381.458 719.531 377.986 722.632 Q374.514 725.711 368.195 725.711 Q366.019 725.711 363.75 725.341 Q361.505 724.97 359.097 724.23 L359.097 719.531 Q361.181 720.665 363.403 721.22 Q365.625 721.776 368.102 721.776 Q372.107 721.776 374.444 719.67 Q376.782 717.563 376.782 713.952 Q376.782 710.341 374.444 708.234 Q372.107 706.128 368.102 706.128 Q366.227 706.128 364.352 706.545 Q362.5 706.961 360.556 707.841 L360.556 690.48 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M442.73 693.559 Q439.119 693.559 437.291 697.123 Q435.485 700.665 435.485 707.795 Q435.485 714.901 437.291 718.466 Q439.119 722.007 442.73 722.007 Q446.365 722.007 448.17 718.466 Q449.999 714.901 449.999 707.795 Q449.999 700.665 448.17 697.123 Q446.365 693.559 442.73 693.559 M442.73 689.855 Q448.54 689.855 451.596 694.461 Q454.675 699.045 454.675 707.795 Q454.675 716.521 451.596 721.128 Q448.54 725.711 442.73 725.711 Q436.92 725.711 433.841 721.128 Q430.786 716.521 430.786 707.795 Q430.786 699.045 433.841 694.461 Q436.92 689.855 442.73 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M462.892 719.16 L467.776 719.16 L467.776 725.04 L462.892 725.04 L462.892 719.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M487.962 693.559 Q484.35 693.559 482.522 697.123 Q480.716 700.665 480.716 707.795 Q480.716 714.901 482.522 718.466 Q484.35 722.007 487.962 722.007 Q491.596 722.007 493.401 718.466 Q495.23 714.901 495.23 707.795 Q495.23 700.665 493.401 697.123 Q491.596 693.559 487.962 693.559 M487.962 689.855 Q493.772 689.855 496.827 694.461 Q499.906 699.045 499.906 707.795 Q499.906 716.521 496.827 721.128 Q493.772 725.711 487.962 725.711 Q482.151 725.711 479.073 721.128 Q476.017 716.521 476.017 707.795 Q476.017 699.045 479.073 694.461 Q482.151 689.855 487.962 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M580.09 693.559 Q576.479 693.559 574.65 697.123 Q572.845 700.665 572.845 707.795 Q572.845 714.901 574.65 718.466 Q576.479 722.007 580.09 722.007 Q583.724 722.007 585.53 718.466 Q587.358 714.901 587.358 707.795 Q587.358 700.665 585.53 697.123 Q583.724 693.559 580.09 693.559 M580.09 689.855 Q585.9 689.855 588.956 694.461 Q592.034 699.045 592.034 707.795 Q592.034 716.521 588.956 721.128 Q585.9 725.711 580.09 725.711 Q574.28 725.711 571.201 721.128 Q568.146 716.521 568.146 707.795 Q568.146 699.045 571.201 694.461 Q574.28 689.855 580.09 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M600.252 719.16 L605.136 719.16 L605.136 725.04 L600.252 725.04 L600.252 719.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M615.367 690.48 L633.724 690.48 L633.724 694.415 L619.65 694.415 L619.65 702.887 Q620.668 702.54 621.687 702.378 Q622.705 702.193 623.724 702.193 Q629.511 702.193 632.891 705.364 Q636.27 708.535 636.27 713.952 Q636.27 719.531 632.798 722.632 Q629.326 725.711 623.006 725.711 Q620.83 725.711 618.562 725.341 Q616.317 724.97 613.909 724.23 L613.909 719.531 Q615.992 720.665 618.215 721.22 Q620.437 721.776 622.914 721.776 Q626.918 721.776 629.256 719.67 Q631.594 717.563 631.594 713.952 Q631.594 710.341 629.256 708.234 Q626.918 706.128 622.914 706.128 Q621.039 706.128 619.164 706.545 Q617.312 706.961 615.367 707.841 L615.367 690.48 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M706.223 721.105 L713.862 721.105 L713.862 694.739 L705.551 696.406 L705.551 692.147 L713.815 690.48 L718.491 690.48 L718.491 721.105 L726.13 721.105 L726.13 725.04 L706.223 725.04 L706.223 721.105 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M735.574 719.16 L740.459 719.16 L740.459 725.04 L735.574 725.04 L735.574 719.16 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M760.644 693.559 Q757.033 693.559 755.204 697.123 Q753.398 700.665 753.398 707.795 Q753.398 714.901 755.204 718.466 Q757.033 722.007 760.644 722.007 Q764.278 722.007 766.083 718.466 Q767.912 714.901 767.912 707.795 Q767.912 700.665 766.083 697.123 Q764.278 693.559 760.644 693.559 M760.644 689.855 Q766.454 689.855 769.509 694.461 Q772.588 699.045 772.588 707.795 Q772.588 716.521 769.509 721.128 Q766.454 725.711 760.644 725.711 Q754.834 725.711 751.755 721.128 Q748.699 716.521 748.699 707.795 Q748.699 699.045 751.755 694.461 Q754.834 689.855 760.644 689.855 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 177.936,662.17 752.756,662.17 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 177.936,512.188 752.756,512.188 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 177.936,362.206 752.756,362.206 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 177.936,212.224 752.756,212.224 \n \"/>\n<polyline clip-path=\"url(#clip732)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n 177.936,62.2423 752.756,62.2423 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,677.168 177.936,47.2441 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,662.17 184.834,662.17 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,512.188 184.834,512.188 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,362.206 184.834,362.206 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,212.224 184.834,212.224 \n \"/>\n<polyline clip-path=\"url(#clip730)\" style=\"stroke:#000000; stroke-linecap:butt; stroke-linejoin:round; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n 177.936,62.2423 184.834,62.2423 \n \"/>\n<path clip-path=\"url(#clip730)\" d=\"M58.9921 662.621 L88.6679 662.621 L88.6679 666.556 L58.9921 666.556 L58.9921 662.621 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M99.5706 675.515 L107.209 675.515 L107.209 649.149 L98.8993 650.816 L98.8993 646.556 L107.163 644.89 L111.839 644.89 L111.839 675.515 L119.478 675.515 L119.478 679.45 L99.5706 679.45 L99.5706 675.515 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M128.922 673.57 L133.807 673.57 L133.807 679.45 L128.922 679.45 L128.922 673.57 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M153.992 647.968 Q150.381 647.968 148.552 651.533 Q146.746 655.075 146.746 662.204 Q146.746 669.311 148.552 672.876 Q150.381 676.417 153.992 676.417 Q157.626 676.417 159.431 672.876 Q161.26 669.311 161.26 662.204 Q161.26 655.075 159.431 651.533 Q157.626 647.968 153.992 647.968 M153.992 644.265 Q159.802 644.265 162.857 648.871 Q165.936 653.454 165.936 662.204 Q165.936 670.931 162.857 675.538 Q159.802 680.121 153.992 680.121 Q148.181 680.121 145.103 675.538 Q142.047 670.931 142.047 662.204 Q142.047 653.454 145.103 648.871 Q148.181 644.265 153.992 644.265 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M59.9875 512.639 L89.6633 512.639 L89.6633 516.574 L59.9875 516.574 L59.9875 512.639 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M109.756 497.987 Q106.145 497.987 104.316 501.551 Q102.51 505.093 102.51 512.223 Q102.51 519.329 104.316 522.894 Q106.145 526.435 109.756 526.435 Q113.39 526.435 115.196 522.894 Q117.024 519.329 117.024 512.223 Q117.024 505.093 115.196 501.551 Q113.39 497.987 109.756 497.987 M109.756 494.283 Q115.566 494.283 118.621 498.889 Q121.7 503.473 121.7 512.223 Q121.7 520.949 118.621 525.556 Q115.566 530.139 109.756 530.139 Q103.946 530.139 100.867 525.556 Q97.8114 520.949 97.8114 512.223 Q97.8114 503.473 100.867 498.889 Q103.946 494.283 109.756 494.283 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M129.918 523.588 L134.802 523.588 L134.802 529.468 L129.918 529.468 L129.918 523.588 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M145.033 494.908 L163.39 494.908 L163.39 498.843 L149.316 498.843 L149.316 507.315 Q150.334 506.968 151.353 506.806 Q152.371 506.621 153.39 506.621 Q159.177 506.621 162.556 509.792 Q165.936 512.963 165.936 518.38 Q165.936 523.959 162.464 527.06 Q158.992 530.139 152.672 530.139 Q150.496 530.139 148.228 529.769 Q145.982 529.398 143.575 528.658 L143.575 523.959 Q145.658 525.093 147.881 525.648 Q150.103 526.204 152.58 526.204 Q156.584 526.204 158.922 524.097 Q161.26 521.991 161.26 518.38 Q161.26 514.769 158.922 512.662 Q156.584 510.556 152.58 510.556 Q150.705 510.556 148.83 510.973 Q146.978 511.389 145.033 512.269 L145.033 494.908 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M108.76 348.005 Q105.149 348.005 103.321 351.569 Q101.515 355.111 101.515 362.241 Q101.515 369.347 103.321 372.912 Q105.149 376.454 108.76 376.454 Q112.395 376.454 114.2 372.912 Q116.029 369.347 116.029 362.241 Q116.029 355.111 114.2 351.569 Q112.395 348.005 108.76 348.005 M108.76 344.301 Q114.571 344.301 117.626 348.907 Q120.705 353.491 120.705 362.241 Q120.705 370.968 117.626 375.574 Q114.571 380.157 108.76 380.157 Q102.95 380.157 99.8715 375.574 Q96.816 370.968 96.816 362.241 Q96.816 353.491 99.8715 348.907 Q102.95 344.301 108.76 344.301 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M128.922 373.606 L133.807 373.606 L133.807 379.486 L128.922 379.486 L128.922 373.606 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M153.992 348.005 Q150.381 348.005 148.552 351.569 Q146.746 355.111 146.746 362.241 Q146.746 369.347 148.552 372.912 Q150.381 376.454 153.992 376.454 Q157.626 376.454 159.431 372.912 Q161.26 369.347 161.26 362.241 Q161.26 355.111 159.431 351.569 Q157.626 348.005 153.992 348.005 M153.992 344.301 Q159.802 344.301 162.857 348.907 Q165.936 353.491 165.936 362.241 Q165.936 370.968 162.857 375.574 Q159.802 380.157 153.992 380.157 Q148.181 380.157 145.103 375.574 Q142.047 370.968 142.047 362.241 Q142.047 353.491 145.103 348.907 Q148.181 344.301 153.992 344.301 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M109.756 198.023 Q106.145 198.023 104.316 201.588 Q102.51 205.129 102.51 212.259 Q102.51 219.365 104.316 222.93 Q106.145 226.472 109.756 226.472 Q113.39 226.472 115.196 222.93 Q117.024 219.365 117.024 212.259 Q117.024 205.129 115.196 201.588 Q113.39 198.023 109.756 198.023 M109.756 194.319 Q115.566 194.319 118.621 198.926 Q121.7 203.509 121.7 212.259 Q121.7 220.986 118.621 225.592 Q115.566 230.175 109.756 230.175 Q103.946 230.175 100.867 225.592 Q97.8114 220.986 97.8114 212.259 Q97.8114 203.509 100.867 198.926 Q103.946 194.319 109.756 194.319 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M129.918 223.625 L134.802 223.625 L134.802 229.504 L129.918 229.504 L129.918 223.625 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M145.033 194.944 L163.39 194.944 L163.39 198.879 L149.316 198.879 L149.316 207.351 Q150.334 207.004 151.353 206.842 Q152.371 206.657 153.39 206.657 Q159.177 206.657 162.556 209.828 Q165.936 213 165.936 218.416 Q165.936 223.995 162.464 227.097 Q158.992 230.175 152.672 230.175 Q150.496 230.175 148.228 229.805 Q145.982 229.435 143.575 228.694 L143.575 223.995 Q145.658 225.129 147.881 225.685 Q150.103 226.24 152.58 226.24 Q156.584 226.24 158.922 224.134 Q161.26 222.027 161.26 218.416 Q161.26 214.805 158.922 212.699 Q156.584 210.592 152.58 210.592 Q150.705 210.592 148.83 211.009 Q146.978 211.426 145.033 212.305 L145.033 194.944 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M99.5706 75.5871 L107.209 75.5871 L107.209 49.2215 L98.8993 50.8882 L98.8993 46.6289 L107.163 44.9623 L111.839 44.9623 L111.839 75.5871 L119.478 75.5871 L119.478 79.5223 L99.5706 79.5223 L99.5706 75.5871 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M128.922 73.6427 L133.807 73.6427 L133.807 79.5223 L128.922 79.5223 L128.922 73.6427 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip730)\" d=\"M153.992 48.041 Q150.381 48.041 148.552 51.6058 Q146.746 55.1474 146.746 62.277 Q146.746 69.3834 148.552 72.9482 Q150.381 76.4899 153.992 76.4899 Q157.626 76.4899 159.431 72.9482 Q161.26 69.3834 161.26 62.277 Q161.26 55.1474 159.431 51.6058 Q157.626 48.041 153.992 48.041 M153.992 44.3373 Q159.802 44.3373 162.857 48.9437 Q165.936 53.527 165.936 62.277 Q165.936 71.0038 162.857 75.6103 Q159.802 80.1936 153.992 80.1936 Q148.181 80.1936 145.103 75.6103 Q142.047 71.0038 142.047 62.277 Q142.047 53.527 145.103 48.9437 Q148.181 44.3373 153.992 44.3373 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><g clip-path=\"url(#clip732)\">\n<image width=\"575\" height=\"630\" xlink:href=\"data:image/png;base64,\niVBORw0KGgoAAAANSUhEUgAAAj8AAAJ2CAYAAACw++OTAAALw0lEQVR4nO3YQY4UMRBFQRv5oHW0\nOmhJZjdCrEBi2k2/iAvkXz7lHGPtAQAQ8eP0AACAVxI/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAg\nRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQ\nIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAlHV6AMA7e/Z9esK3WfM6PQGO\n8PkBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAg\nRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQ\nIn4AgBTxAwCkiB8AIGWOsfbpEcC/9+z79AT4suZ1egJ88fkBAFLEDwCQIn4AgBTxAwCkiB8AIEX8\nAAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8AQIr4AQBSxA8AkCJ+\nAIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4AgBTxAwCkiB8AIGWdHgC/e/Z9egIA\nH8znBwBIET8AQIr4AQBSxA8AkCJ+AIAU8QMApIgfACBF/AAAKeIHAEgRPwBAivgBAFLEDwCQIn4A\ngBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAUsQPAJAifgCAFPEDAKSIHwAgRfwAACniBwBIET8A\nQIr4AQBSxA8AkCJ+AICUOcbap0d8imffpycAMMZY8zo9gTfm8wMApIgfACBF/AAAKeIHAEgRPwBA\nivgBAFLEDwCQIn4AgBTxAwCkiB8AIEX8AAAp4gcASBE/AECK+AEAU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
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "module My\n\nusing Parameters: @unpack\n\nstruct Param{TX, TY, TH, TV, TE, TV_dic}\n x::TX\n y::TY\n h⁻²::TH\n V::TV\n E::TE\n V_dic::TV_dic\nend\n\nBase.length(p::Param) = length(p.V)\nBase.size(p::Param) = (length(p.x), length(p.y))\n\nmystep(x::AbstractVector) = x[2] - x[1]\nmystep(x::StepRangeLen) = step(x)\n\nfunction Param(isin_func, x::AbstractVector, y::AbstractVector)\n @assert mystep(x) == mystep(y)\n h⁻² = 1/mystep(x)^2\n I, J = eachindex(x), eachindex(y)\n D = isin_func.(x, y')\n V = Tuple{Int64, Int64}[]\n E_mat = [Tuple{Int64, Int64}[] for i in I, j in J]\n B_mat = zeros(Int64, length(I), length(J))\n for j in J, i in I\n if D[i, j]\n push!(V, (i, j))\n for q in (-1, 1), p in (-1, 1)\n if i+p in I && j+q in J && D[i+p, j+q]\n push!(E_mat[i, j], (i+p, j+q))\n end\n end\n end\n end\n V_dic = Dict(V[k] => k for k in eachindex(V))\n E = [getindex.(Ref(V_dic), E_mat[V[k]...]) for k in eachindex(V)]\n Param(x, y, h⁻², V, E, V_dic)\nend\n\nfunction vec2mat!(p::Param, u, U)\n @unpack V = p\n for k in eachindex(V)\n U[V[k]...] = u[k]\n end\n U\nend\n \nfunction vec2mat(p::Param, u; default_value=NaN)\n U = fill(eltype(u)(default_value), size(p))\n vec2mat!(p, u, U)\nend\n\nfunction mat2vec!(p::Param, U, u)\n @unpack V_dic = p\n for t in keys(V_dic)\n u[V_dic[t]] = U[t...]\n end\n u\nend\n\nfunction mat2vec(p::Param, U)\n u = similar(eltype(U)[], length(p))\n mat2vec!(p, U, u)\nend\n\nend\n\nx = -1:0.1:1\ny = -1:0.1:1\np = My.Param(isin_unit_pentagon, x, y)\n\n@unpack h⁻², V, E = p\n@show h⁻²\n@show V[50]\n@show E[50]\n@show V[E[50]]\n\nu0 = collect(1.0:length(V))\nU0 = My.vec2mat(p, u0; default_value=0)\n@show My.mat2vec(p, U0) == u0\nU0'", | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "h⁻² = 99.99999999999999\nV[50] = (7, 7)\nE[50] = [34, 36, 65, 67]\nV[E[50]] = [(6, 6), (8, 6), (6, 8), (8, 8)]\nMy.mat2vec(p, U0) == u0 = true\n", | |
"name": "stdout" | |
}, | |
{ | |
"output_type": "execute_result", | |
"execution_count": 3, | |
"data": { | |
"text/plain": "21×21 adjoint(::Matrix{Float64}) with eltype Float64:\n 0.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 18.0 19.0 20.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 31.0 32.0 33.0 34.0 … 45.0 0.0 0.0 0.0 0.0\n 0.0 0.0 46.0 47.0 48.0 49.0 60.0 61.0 0.0 0.0 0.0\n 0.0 0.0 62.0 63.0 64.0 65.0 76.0 77.0 0.0 0.0 0.0\n 0.0 0.0 78.0 79.0 80.0 81.0 92.0 93.0 94.0 0.0 0.0\n 0.0 0.0 95.0 96.0 97.0 98.0 109.0 110.0 111.0 112.0 0.0\n 0.0 0.0 113.0 114.0 115.0 116.0 … 127.0 128.0 129.0 130.0 131.0\n 0.0 0.0 132.0 133.0 134.0 135.0 146.0 147.0 148.0 149.0 0.0\n 0.0 0.0 150.0 151.0 152.0 153.0 164.0 165.0 166.0 0.0 0.0\n 0.0 0.0 167.0 168.0 169.0 170.0 181.0 182.0 0.0 0.0 0.0\n 0.0 0.0 183.0 184.0 185.0 186.0 197.0 198.0 0.0 0.0 0.0\n 0.0 0.0 199.0 200.0 201.0 202.0 … 213.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 214.0 215.0 216.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "function anim_sol2D(sol; L = 101, clim=(-0.03, 0.03), color=:bwr, bg=:lightgray)\n @unpack prob, u = sol\n @unpack tspan, p = prob\n @unpack x, y = p\n ts = range(tspan...; length=L) |> r -> [fill(r[1], 20); r; fill(r[end], 20)]\n prog = Progress(length(ts), 0)\n @gif for t in ts\n U = My.vec2mat(p, sol(t).x[2])\n heatmap(x, y, U'; colorbar=false, clim, color, bg)\n title!(f\"t = {$t:4.2f}\"; titlefontsize=12)\n plot!(size=(420, 440), xlim=extrema(x), ylim=extrema(y), aspectratio=1)\n next!(prog)\n end\nend\n\nfunction plot_sol(sol, t;\n color=:bwr, bg=:lightgray, camera=(30, 85), size=(720, 540), kwargs...)\n @unpack prob, u = sol\n @unpack tspan, p = prob\n @unpack x, y = p\n U = My.vec2mat(p, sol(t).x[2])\n surface(x, y, U'; colorbar=false, color, bg, camera, size)\n title!(f\"t = {$t:5.2f}\"; titlefontsize=12)\n plot!(; kwargs...)\nend\n\nfunction anim_sol(sol; L=101, fps=10, fn=\"tmp.gif\",\n color=:bwr, bg=:lightgray, camera=(30, 85), size=(720, 540), kwargs...)\n @unpack prob, u = sol\n @unpack tspan, p = prob\n @unpack x, y = p\n umin = minimum(minimum(u.x[2]) for u in u)\n umax = maximum(maximum(u.x[2]) for u in u)\n ts = range(tspan...; length=L) |> r -> [fill(r[1], 20); r; fill(r[end], 20)]\n prog = Progress(length(ts), 0)\n anim = @animate for t in ts\n plot_sol(sol, t; color, bg, camera, size, kwargs...)\n next!(prog)\n end\n gif(anim, fn; fps)\nend", | |
"execution_count": 4, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 4, | |
"data": { | |
"text/plain": "anim_sol (generic function with 1 method)" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "function g_neumann!(dv, v, u, p, t)\n @unpack h⁻², E = p\n @inbounds for k in eachindex(dv)\n dv[k] = h⁻² * sum(u[l] - u[k] for l in E[k])\n end\nend", | |
"execution_count": 5, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 5, | |
"data": { | |
"text/plain": "g_neumann! (generic function with 1 method)" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"scrolled": false, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "x = y = range(-1, 1; length=401)\np = My.Param(isin_unit_pentagon, x, y)\ntspan = (0.0, 1.0)\n\nF(a, b, c, x, y) = exp(-((x-a)^2+(y-b)^2)/(2c^2))\nf(x, y) = F(0.5, 0, 0.01, x, y) + F(-0.2, 0.4, 0.01, x, y) + F(-0.2, -0.4, 0.01, x, y)\nU0 = f.(x, y')\nV0 = zero(U0)\n\nu0 = My.mat2vec(p, U0)\nv0 = My.mat2vec(p, V0)\n\n@time prob = SecondOrderODEProblem(g_neumann!, v0, u0, tspan, p)\n\nsol = nothing; GC.gc()\n@time sol = solve(prob)\n\n@unpack u = sol\numin = minimum(minimum(u.x[2]) for u in u)\numax = maximum(maximum(u.x[2]) for u in u)\numin, umax", | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": " 0.326729 seconds (1.15 M allocations: 103.016 MiB, 5.57% gc time, 99.16% compilation time)\n 12.537843 seconds (31.34 M allocations: 5.681 GiB, 9.05% gc time)\n", | |
"name": "stdout" | |
}, | |
{ | |
"output_type": "execute_result", | |
"execution_count": 6, | |
"data": { | |
"text/plain": "(-0.3315672956313261, 1.0)" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "anim_sol2D(sol)", | |
"execution_count": 7, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "\u001b[32mProgress: 100%|█████████████████████████████████████████| Time: 0:00:33\u001b[39m\n┌ Info: Saved animation to \n│ fn = C:\\Users\\genkuroki\\OneDrive\\Math\\Math0052\\tmp.gif\n└ @ Plots C:\\Users\\genkuroki\\.julia\\packages\\Plots\\iYDwd\\src\\animation.jl:104\n", | |
"name": "stderr" | |
}, | |
{ | |
"output_type": "execute_result", | |
"execution_count": 7, | |
"data": { | |
"text/plain": "Plots.AnimatedGif(\"C:\\\\Users\\\\genkuroki\\\\OneDrive\\\\Math\\\\Math0052\\\\tmp.gif\")", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment