-
Notifications
You must be signed in to change notification settings - Fork 1
/
Visio-SOD.nb
executable file
·3240 lines (3200 loc) · 173 KB
/
Visio-SOD.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 10.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 173608, 3232]
NotebookOptionsPosition[ 170475, 3150]
NotebookOutlinePosition[ 170810, 3165]
CellTagsIndexPosition[ 170767, 3162]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"SetDirectory", "[",
RowBox[{"NotebookDirectory", "[", "]"}], "]"}]], "Input",
CellChangeTimes->{{3.669918316704926*^9,
3.6699183233413057`*^9}},ExpressionUUID->"4ac51464-808f-450a-8730-\
3d1b2559e766"],
Cell[BoxData["\<\"/run/media/v.korchagova/Seagate Backup Plus \
Drive/BMSTU/RKDG/IK_code/RKDG1D\"\>"], "Output",
CellChangeTimes->{
3.669918324621379*^9, 3.6699183890920663`*^9, 3.6699186455267334`*^9,
3.669919059813429*^9, 3.6699198285663996`*^9, 3.6699231837273035`*^9,
3.6699240457496085`*^9, 3.669941994739232*^9, 3.6699423146285286`*^9,
3.6699423625132675`*^9, 3.670489580039255*^9, 3.6704897303698535`*^9,
3.670489938696769*^9, 3.6704900711423445`*^9, 3.6704901784174805`*^9,
3.670490488165197*^9, 3.6704906025897417`*^9, 3.6704906626441765`*^9,
3.6704912017820134`*^9, 3.6704914433988333`*^9, 3.6704915039022937`*^9,
3.670491545205656*^9, 3.6704915870210476`*^9, 3.6704917540696025`*^9,
3.670491797814104*^9, 3.67049283240228*^9, 3.670733591765873*^9,
3.6707585381124163`*^9, 3.6707608288273907`*^9, 3.6707787995737896`*^9,
3.6714737498098345`*^9, 3.671475663467289*^9, 3.6714766937152157`*^9,
3.671478381165733*^9, 3.67147862763483*^9, 3.671478774075206*^9,
3.6714819239523687`*^9, 3.6714819601834407`*^9, 3.6714827202249126`*^9,
3.6714827850606213`*^9, 3.671483146323284*^9, 3.6716336582422037`*^9,
3.671634884110319*^9, 3.6716349217904744`*^9, 3.671635650531156*^9,
3.671636153443921*^9, 3.671636721837431*^9, 3.671637553469998*^9,
3.6716376125043745`*^9, 3.6716377397536526`*^9, 3.67163781418791*^9,
3.6716379170507936`*^9, 3.6716380816002054`*^9, 3.6716383554308677`*^9,
3.6716394690335617`*^9, 3.6716814894286804`*^9, 3.6716833648589487`*^9,
3.6716863330747213`*^9, 3.6716864788610597`*^9, 3.671687088500929*^9,
3.6716871299893017`*^9, 3.671687186996563*^9, 3.671687221716549*^9,
3.67168772054908*^9, 3.671721342067326*^9, 3.671721815024378*^9,
3.671721935802286*^9, 3.6717221039849052`*^9, 3.671727195139103*^9,
3.6720376931999245`*^9, 3.6720407810065365`*^9, 3.672042112959959*^9,
3.6720434181931086`*^9, 3.6720443884796076`*^9, 3.6720444554504075`*^9,
3.6720447803838367`*^9, 3.6720448538744946`*^9, 3.6720809132491565`*^9,
3.6720813446958337`*^9, 3.672081385393162*^9, 3.6720815005967507`*^9,
3.672082893565424*^9, 3.67208309577999*^9, 3.6720831397555056`*^9,
3.672084599318988*^9, 3.6720846361850967`*^9, {3.6720846809776583`*^9,
3.672084718446801*^9}, 3.672085285810253*^9, 3.672085452275774*^9,
3.6720862578428497`*^9, 3.6720863355702953`*^9, 3.6720864196361036`*^9,
3.6726356950431156`*^9, 3.672636416053029*^9, {3.6726364734617653`*^9,
3.672636501230121*^9}, 3.6726365360497675`*^9, 3.672638792734994*^9,
3.672641344963578*^9, 3.6726413751863956`*^9, 3.67264145844413*^9,
3.672641558456371*^9, 3.6726444757575593`*^9, 3.672646285256755*^9,
3.672646529311573*^9, 3.672649401312481*^9, 3.672649451595852*^9, {
3.6726494864856977`*^9, 3.6726495113522573`*^9}, 3.6726495785571084`*^9,
3.672649886736902*^9, 3.6726500281206083`*^9, 3.672719660796982*^9,
3.672720055966572*^9, 3.6727203408473425`*^9, 3.672720827622513*^9,
3.6727209035542893`*^9, 3.6727213240902505`*^9, 3.672726665400969*^9,
3.672726793041113*^9, 3.6727328834812517`*^9, 3.6781795808281517`*^9,
3.6781801433238306`*^9, 3.678180504083044*^9, 3.678180641884038*^9,
3.6781812687189817`*^9, 3.6781818274579983`*^9, 3.6781822235905657`*^9,
3.6781828640142765`*^9, 3.6781833643191605`*^9, 3.67818371465189*^9,
3.6781838351705956`*^9, 3.6781843170116563`*^9, 3.6781843770926476`*^9,
3.6781872793817997`*^9, 3.6781885385979996`*^9, 3.6781886756046534`*^9,
3.6781887573501115`*^9, 3.6822429192299886`*^9, 3.6822431261666803`*^9,
3.6822433694480057`*^9, 3.6822436471877775`*^9, 3.6822439418952446`*^9,
3.6822439913751926`*^9, 3.682244373939445*^9, 3.6822445486329126`*^9,
3.682244580063055*^9, 3.6822458162190704`*^9, 3.6822492829485645`*^9,
3.6845804096844797`*^9, 3.6845805281771126`*^9, 3.6845807591422386`*^9,
3.684581082710058*^9, 3.684581124225916*^9, {3.6845813941032333`*^9,
3.684581418051536*^9}, 3.6845814490981216`*^9, 3.684581517511074*^9,
3.684581690906034*^9, 3.684582866614552*^9, 3.6845829351543074`*^9, {
3.6845829717395906`*^9, 3.684583026126071*^9}, 3.684583064693732*^9,
3.684583173669511*^9, 3.684583246310629*^9, 3.6845832834887657`*^9,
3.684583353289429*^9, {3.684583453685438*^9, 3.684583483312497*^9},
3.6845835183300467`*^9, 3.684583595886809*^9, 3.68458365217666*^9, {
3.6845836859536915`*^9, 3.684583730776513*^9}, 3.6846612136941233`*^9,
3.6846656391237364`*^9, 3.684665681290807*^9, 3.684665841065987*^9,
3.6846661542528286`*^9, 3.68466684835867*^9, 3.6846669662878485`*^9,
3.684667086623056*^9, {3.6847760354138575`*^9, 3.6847761211277604`*^9},
3.684776186816518*^9, {3.684777129258422*^9, 3.6847771860806723`*^9}, {
3.6847790781368914`*^9, 3.6847790935867753`*^9}, 3.6847814666965094`*^9,
3.684782677736777*^9, 3.684783598889464*^9, 3.6847851037115345`*^9,
3.684785359374158*^9, 3.684788163624552*^9, 3.684789388269597*^9,
3.6847894280648737`*^9, 3.6848181625506716`*^9, 3.6848182141833324`*^9,
3.6848182633800073`*^9, 3.6848183634932823`*^9, 3.68482026709009*^9,
3.6848203766435647`*^9, 3.6848204804064026`*^9, 3.6848205559022303`*^9,
3.6848206617746797`*^9, 3.684820882992185*^9, 3.684820959696402*^9, {
3.684821006698599*^9, 3.684821031205885*^9}, 3.684821070361472*^9,
3.6848211015458717`*^9, 3.684821132418272*^9, 3.684821199825872*^9,
3.684821341395872*^9, 3.6849419910269423`*^9, 3.68506719266574*^9,
3.690687944330942*^9, 3.690688300581192*^9, 3.690688349464738*^9, {
3.6906883992576466`*^9, 3.690688422464926*^9}, {3.6906884657702413`*^9,
3.6906885086513867`*^9}, 3.690688728967427*^9, 3.6906887941884685`*^9,
3.6906888844534388`*^9, 3.6906889274307365`*^9, 3.6906889717751703`*^9,
3.6906890119571877`*^9, 3.6906890594789395`*^9, {3.690689096272619*^9,
3.6906891164806395`*^9}, 3.6906981920172367`*^9, 3.6906982572002707`*^9,
3.6906987256842575`*^9, 3.69070111763666*^9, 3.6907013537854834`*^9,
3.690701420099372*^9, 3.6907017328472443`*^9, 3.6907029800951767`*^9,
3.6907030502082043`*^9, 3.6907030987897744`*^9, 3.690703163185087*^9,
3.6907033617556405`*^9, 3.690703435662806*^9, 3.6907081907299414`*^9,
3.690709693136528*^9, 3.6907099210921736`*^9, 3.6907101454823112`*^9,
3.690710399069178*^9, 3.690710451915462*^9, 3.690710506490919*^9,
3.690743559907817*^9, 3.6907436030882864`*^9, 3.6907448228850546`*^9,
3.690745260638093*^9, 3.6907457069426203`*^9, 3.6907458597623606`*^9,
3.691303666487562*^9, 3.691304117149755*^9, 3.6913043289634466`*^9,
3.6913045295944395`*^9, 3.6913046214754763`*^9, 3.6913046748847218`*^9,
3.691304899235722*^9, 3.691305669401402*^9, 3.6913188621126947`*^9,
3.6913189703593397`*^9, 3.6913190211604977`*^9, {3.6913190825097656`*^9,
3.69131910133553*^9}, 3.6913193750592637`*^9, {3.691319507773801*^9,
3.691319536208487*^9}, 3.693297156059641*^9, 3.69329726180505*^9,
3.693298255817523*^9, 3.693299708322379*^9, 3.6933101071796293`*^9,
3.6933104794717317`*^9, 3.693310869420681*^9, 3.693311453179756*^9,
3.693312106272626*^9, 3.693312309979719*^9, 3.694761759025447*^9,
3.6948653559350586`*^9, 3.694935684185026*^9, 3.694945520976152*^9,
3.695966976838907*^9, 3.695967250382845*^9, 3.695968224557116*^9,
3.696312906605833*^9, 3.696313941623442*^9, 3.696572611555287*^9,
3.6966463651891203`*^9, 3.6971109324538813`*^9, 3.7015254545555077`*^9,
3.702901985631571*^9, 3.7029023352481914`*^9, 3.702914014191622*^9,
3.7038293638143053`*^9, 3.703882032269373*^9, 3.7049631456092663`*^9,
3.704965013977288*^9, 3.7049667673196106`*^9, 3.7050336070128965`*^9,
3.7053518536254225`*^9, 3.705357320723464*^9, 3.7053585681144314`*^9,
3.7055910259482574`*^9, 3.705999272154393*^9, 3.706225566984624*^9,
3.7165436068289223`*^9, 3.716543715779397*^9, {3.7165437558484907`*^9,
3.716543783228559*^9}, 3.716543834378427*^9, 3.716543897579117*^9, {
3.716552041806097*^9, 3.7165520538527527`*^9}, 3.7165521284249907`*^9,
3.716552176509163*^9, 3.7165528799810457`*^9,
3.71655305519631*^9},ExpressionUUID->"47f8ade1-2881-4e17-a4f4-\
5c33ff5a31d8"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{"Data", " ", "=", " ",
RowBox[{"Import", "[",
RowBox[{"\"\<telefile.txt\>\"", ",", "\"\<Table\>\""}], "]"}]}],
";"}], "\n",
RowBox[{
RowBox[{"nx", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"1", ",", "2"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"hx", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"1", ",", "4"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"tau", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"1", ",", "6"}], "]"}], "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{"deltacnt", "=",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"1", ",", "8"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"nshape", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"1", ",", "10"}], "]"}], "]"}]}], "\n",
RowBox[{
RowBox[{"xcnt", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\n",
RowBox[{"nsteps", "=",
RowBox[{
RowBox[{"Length", "[", "Data", "]"}], "-", "2"}]}], "\n",
RowBox[{
RowBox[{"His", " ", "=", " ",
RowBox[{"Data", "[",
RowBox[{"[",
RowBox[{"3", ";;"}], "]"}], "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"PlotDGfile", "[",
RowBox[{"q_", ",", "t_", ",", "diap_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"H", ",", "sl", ",", "sr", ",", "otr"}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"H", "=",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"His", "[",
RowBox[{"[", "t", "]"}], "]"}], ",",
FractionBox[
RowBox[{
RowBox[{"Dimensions", "[", "His", "]"}], "[",
RowBox[{"[", "2", "]"}], "]"}], "nx"]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"sl", "=",
RowBox[{"Sum", "[",
RowBox[{
RowBox[{
SuperscriptBox[
RowBox[{"(",
RowBox[{"-", "1"}], ")"}],
RowBox[{"nshape", "-", "1", "-", "s"}]],
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape", " ", "q"}], "-", "s"}]}], "]"}], "]"}]}],
",",
RowBox[{"{",
RowBox[{"s", ",", "0", ",",
RowBox[{"nshape", "-", "1"}]}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"sr", "=",
RowBox[{"Sum", "[",
RowBox[{
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape", " ", "q"}], "-", "s"}]}], "]"}], "]"}], ",",
RowBox[{"{",
RowBox[{"s", ",", "0", ",",
RowBox[{"nshape", "-", "1"}]}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"Print", "[",
RowBox[{
RowBox[{"ToString", "[", "sl", "]"}], "<>", "\"\< \>\"", "<>",
RowBox[{"ToString", "[", "sr", "]"}]}], "]"}], ";"}], "*)"}],
"\[IndentingNewLine]",
RowBox[{"otr", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"xcnt", "[",
RowBox[{"[", "i", "]"}], "]"}], "-",
FractionBox["hx", "2"]}], ",",
RowBox[{"sl", "[",
RowBox[{"[", "i", "]"}], "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"xcnt", "[",
RowBox[{"[", "i", "]"}], "]"}], "+",
FractionBox["hx", "2"]}], ",",
RowBox[{"sr", "[",
RowBox[{"[", "i", "]"}], "]"}]}], "}"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "nx"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"ListLinePlot", "[",
RowBox[{"otr", ",",
RowBox[{"PlotRange", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"diap", "[",
RowBox[{"[", "1", "]"}], "]"}], ",",
RowBox[{"diap", "[",
RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"Directive", "[",
RowBox[{"{", "Thick", "}"}], "]"}]}], ",",
RowBox[{"AxesStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"Directive", "[", "16", "]"}], ",", "Thick"}], "}"}],
",",
RowBox[{"{",
RowBox[{
RowBox[{"Directive", "[", "16", "]"}], ",", "Thick"}], "}"}]}],
"}"}]}], ",",
RowBox[{"AxesOrigin", "\[Rule]",
RowBox[{"{",
RowBox[{"0", ",",
RowBox[{"-", "0.1"}]}], "}"}]}]}], "]"}]}]}], "]"}]}], ";"}],
"\n",
RowBox[{"(*",
RowBox[{
RowBox[{
"\:0412\:043e\:0441\:0441\:0442\:0430\:043d\:043e\:0432\:043b\:0435\:043d\
\:043d\:043e\:0435", " ", "\:0440\:0435\:0448\:0435\:043d\:0438\:0435"}], " ",
"-", " ", "\:043a\:0443\:0441\:043e\:0447\:043d\:043e", "-",
"\:043b\:0438\:043d\:0435\:0439\:043d\:043e\:0435"}], "*)"}]}], "\n",
RowBox[{
RowBox[{
RowBox[{"numsollin", "[",
RowBox[{"q_", ",", "x_", ",", "t_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"H", ",", "u", ",", "v", ",", "w", ",", "cell", ",", "sl", ",", "sr",
",", "otr"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"H", "=",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"His", "[",
RowBox[{"[", "t", "]"}], "]"}], ",",
FractionBox[
RowBox[{
RowBox[{"Dimensions", "[", "His", "]"}], "[",
RowBox[{"[", "2", "]"}], "]"}], "nx"]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"u", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "1"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"v", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "2"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"If", "[",
RowBox[{
RowBox[{"nshape", "\[Equal]", "3"}], ",",
RowBox[{"w", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}], ",",
RowBox[{"w", "=",
RowBox[{"0", " ",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]",
RowBox[{"cell", "=",
RowBox[{
RowBox[{"Floor", "[",
RowBox[{"x", "/", "hx"}], "]"}], "+", "1"}]}], ";",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"u", "[",
RowBox[{"[", "cell", "]"}], "]"}], "+",
RowBox[{
FractionBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}],
RowBox[{"hx", "/", "2"}]],
RowBox[{"v", "[",
RowBox[{"[", "cell", "]"}], "]"}]}], "+",
RowBox[{"0",
RowBox[{"(",
RowBox[{
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}], "2"],
RowBox[{
SuperscriptBox["hx", "2"], "/", "6"}]], "-",
FractionBox["1", "2"]}], ")"}],
RowBox[{"w", "[",
RowBox[{"[", "cell", "]"}], "]"}]}]}]}]}], "\[IndentingNewLine]",
"]"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"numsol", "[",
RowBox[{"q_", ",", "x_", ",", "t_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"H", ",", "u", ",", "v", ",", "w", ",", "cell", ",", "sl", ",", "sr",
",", "otr"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"H", "=",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"His", "[",
RowBox[{"[", "t", "]"}], "]"}], ",",
FractionBox[
RowBox[{
RowBox[{"Dimensions", "[", "His", "]"}], "[",
RowBox[{"[", "2", "]"}], "]"}], "nx"]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"u", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "1"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"v", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "2"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"If", "[",
RowBox[{
RowBox[{"nshape", "\[Equal]", "3"}], ",",
RowBox[{"w", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}], ",",
RowBox[{"w", "=",
RowBox[{"0", " ",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]",
RowBox[{"cell", "=",
RowBox[{
RowBox[{"Floor", "[",
RowBox[{"x", "/", "hx"}], "]"}], "+", "1"}]}], ";",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"u", "[",
RowBox[{"[", "cell", "]"}], "]"}], "+",
RowBox[{
FractionBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}],
RowBox[{"hx", "/", "2"}]],
RowBox[{"v", "[",
RowBox[{"[", "cell", "]"}], "]"}]}], "+",
RowBox[{
RowBox[{"(",
RowBox[{
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}], "2"],
RowBox[{
SuperscriptBox["hx", "2"], "/", "6"}]], "-",
FractionBox["1", "2"]}], ")"}],
RowBox[{"w", "[",
RowBox[{"[", "cell", "]"}], "]"}]}]}]}]}], "\[IndentingNewLine]",
"]"}]}], ";"}]}], "Input",
CellChangeTimes->{{3.6699183264744844`*^9, 3.669918347076663*^9}, {
3.6947617815404634`*^9, 3.694761814812092*^9}, {3.6949441277687287`*^9,
3.694944131545414*^9}, {3.6949458817555537`*^9, 3.6949458893409424`*^9}, {
3.7029388728778276`*^9, 3.7029388736590815`*^9}, {3.7045260123667088`*^9,
3.704526013075212*^9}, {3.704963174312654*^9, 3.704963174831028*^9}, {
3.7053579924475775`*^9,
3.705357994028683*^9}},ExpressionUUID->"5b183156-5448-4109-918e-\
f244b7a47153"],
Cell[BoxData["3"], "Output",
CellChangeTimes->{{3.694761799025874*^9, 3.6947618196815543`*^9},
3.6947620030088415`*^9, 3.69476215726947*^9, 3.694865074381962*^9,
3.694865359226396*^9, 3.6949356881318164`*^9, 3.6949362353857408`*^9,
3.6949364497300715`*^9, 3.6949403341256495`*^9, 3.6949404049079523`*^9,
3.6949404756972632`*^9, 3.694940526104085*^9, 3.6949405827423363`*^9,
3.694940694242578*^9, 3.694940822976068*^9, 3.694942408688008*^9,
3.6949424837033243`*^9, 3.6949425839955945`*^9, 3.6949426848522716`*^9, {
3.6949427890092945`*^9, 3.6949427953768196`*^9}, 3.6949435832447443`*^9,
3.694943981485768*^9, 3.694944057591855*^9, 3.694944136013589*^9,
3.694944255191286*^9, 3.694944556813644*^9, 3.694945389667541*^9,
3.6949455258355885`*^9, 3.694945589109557*^9, 3.6949456446019936`*^9,
3.694945688447152*^9, 3.6949458318230476`*^9, 3.694945890505752*^9,
3.694946004620852*^9, {3.694946046453582*^9, 3.69494606893656*^9},
3.694946102991763*^9, 3.6959669802139397`*^9, 3.6959671945551157`*^9,
3.695968240338876*^9, 3.696312949168794*^9, 3.6963139469778013`*^9,
3.6963141336857104`*^9, 3.696314246865906*^9, 3.6963143584654827`*^9,
3.696572636869007*^9, 3.696637691501759*^9, 3.6966378778268547`*^9,
3.696637973862893*^9, 3.696638857439565*^9, {3.6966463618288636`*^9,
3.6966463668572044`*^9}, 3.6966545454837265`*^9, 3.6966546751436963`*^9,
3.6966548220757165`*^9, 3.6966548599823017`*^9, 3.6966550414945745`*^9,
3.696655324313429*^9, 3.6966555461305037`*^9, 3.6966557043228464`*^9,
3.696667073734584*^9, 3.6966674004913435`*^9, 3.6966676152077007`*^9,
3.696667717552846*^9, 3.6966680535516725`*^9, 3.69666852543235*^9, {
3.696668573403612*^9, 3.6966685986493287`*^9}, 3.6966687743115172`*^9,
3.696668903711506*^9, 3.6966691618064957`*^9, 3.696669698901623*^9,
3.6966698873424363`*^9, 3.6966699690481606`*^9, 3.6966700137391987`*^9,
3.6966700634145765`*^9, 3.696670613179714*^9, 3.696670763074579*^9,
3.6971109357781086`*^9, 3.6971111158815765`*^9, 3.6971112467504735`*^9,
3.697111669880378*^9, 3.697112176372035*^9, 3.7015254657059345`*^9,
3.7029019888510613`*^9, 3.7029020245671377`*^9, 3.70290213279194*^9,
3.702902299633201*^9, 3.7029023369264917`*^9, 3.7029024445108604`*^9,
3.7029025208829246`*^9, {3.7029025579755898`*^9, 3.7029025867087307`*^9},
3.702902775083962*^9, 3.7029127226673994`*^9, {3.7029140108512588`*^9,
3.7029140168795843`*^9}, 3.702914096942294*^9, 3.702914275550105*^9,
3.702914341123105*^9, 3.702914439668206*^9, 3.7029145029839854`*^9,
3.7029145604612975`*^9, 3.7029157196592155`*^9, 3.70293887683179*^9,
3.7029389814986515`*^9, 3.7029391405034285`*^9, 3.702939424622772*^9,
3.702939765831732*^9, 3.7029403374930587`*^9, 3.7029404177131863`*^9,
3.7029405496872745`*^9, 3.702940791027217*^9, 3.7029410739598527`*^9,
3.7029750633595743`*^9, 3.703829365658081*^9, 3.7038297270738487`*^9,
3.7038297680626097`*^9, 3.70382982254936*^9, 3.703829989743739*^9,
3.7038302932617693`*^9, 3.7038308923000207`*^9, 3.70383102146551*^9,
3.7038311723111925`*^9, 3.7038312347472057`*^9, 3.703831384188266*^9,
3.703831432407628*^9, 3.703831489576618*^9, 3.7038351581147747`*^9,
3.7038352284485264`*^9, 3.7038352874649043`*^9, 3.7038353532458115`*^9,
3.7038354900005317`*^9, 3.7038355658289247`*^9, 3.7038356439795785`*^9,
3.703835710792919*^9, 3.703835835696487*^9, 3.7038360255651007`*^9,
3.7038360993818746`*^9, 3.7038365755774097`*^9, 3.7038371471057005`*^9,
3.703837598772865*^9, 3.7038389063486686`*^9, 3.7038617241921225`*^9,
3.7038631735535026`*^9, 3.70386327462133*^9, {3.703882027731588*^9,
3.703882033899849*^9}, 3.703882121021566*^9, 3.7038823873738923`*^9,
3.7038824701549*^9, 3.7038854813897777`*^9, 3.7038860042785287`*^9,
3.7038882886981916`*^9, 3.7038884019468713`*^9, 3.7038884354003897`*^9,
3.70388850859566*^9, 3.704170414173745*^9, 3.704170722809621*^9,
3.7041708971096325`*^9, 3.7041726293637085`*^9, 3.704426938469243*^9,
3.7044270733736577`*^9, 3.704427185740593*^9, 3.7044272796395226`*^9,
3.7044274874930573`*^9, 3.704440925320387*^9, 3.7044411132371473`*^9,
3.7044413712780867`*^9, 3.7044418678648105`*^9, 3.7044491779966164`*^9,
3.704513583195146*^9, 3.704513849270129*^9, 3.7045140202425575`*^9,
3.7045143142884064`*^9, 3.704514529445223*^9, 3.7045145887743597`*^9,
3.7045146460550456`*^9, 3.704514726230991*^9, 3.704514840789357*^9,
3.7045148716993084`*^9, 3.704514908140191*^9, 3.704515265758192*^9,
3.70451563750823*^9, 3.7045156733006516`*^9, 3.704515818407716*^9,
3.704516069273895*^9, {3.7045163379527254`*^9, 3.7045163649188795`*^9},
3.704516565361245*^9, 3.7045167070148554`*^9, 3.7045236179768286`*^9,
3.7045236942800245`*^9, 3.704523995238781*^9, 3.7045240499726562`*^9,
3.7045241025379953`*^9, 3.704524238449524*^9, 3.7045256358652964`*^9,
3.70452609350834*^9, 3.7049633873749847`*^9, 3.7049634927928567`*^9,
3.7049636687067995`*^9, 3.7049645290808897`*^9, 3.7049650149589834`*^9,
3.7049651677735214`*^9, 3.704966777253667*^9, 3.7049669304034443`*^9,
3.7049675591570177`*^9, 3.704971271139476*^9, 3.7050336091113853`*^9,
3.705033837270441*^9, 3.7053518558289876`*^9, 3.705352408385443*^9,
3.7053535492637587`*^9, 3.705354485294591*^9, 3.7053547663071737`*^9,
3.7053548379750757`*^9, 3.70535532484988*^9, 3.7053554374958878`*^9,
3.7053560599119625`*^9, 3.7053567499971013`*^9, 3.7053569545974197`*^9,
3.70535699730075*^9, {3.7053570832507954`*^9, 3.705357113052963*^9},
3.7053571646546135`*^9, 3.7053572064102707`*^9, {3.705357316331343*^9,
3.7053573215340567`*^9}, 3.705357368373306*^9, 3.7053574994444*^9,
3.705357611919286*^9, 3.705357997172934*^9, 3.7053581664471426`*^9,
3.705358459264118*^9, 3.7053593892586546`*^9, 3.7053767576729*^9,
3.705377129925297*^9, 3.7053814005764413`*^9, 3.7055910819310074`*^9,
3.705999276122208*^9, 3.7059994386847386`*^9, 3.7059995061036525`*^9,
3.7059995774143333`*^9, 3.7060000148532124`*^9, 3.7062255738995104`*^9,
3.716543607441601*^9, 3.71654371614924*^9, {3.7165437563357353`*^9,
3.716543783713189*^9}, 3.716543834725276*^9, 3.7165438979399548`*^9, {
3.716552042319249*^9, 3.716552054300879*^9}, 3.71655212892889*^9,
3.7165521771183367`*^9, 3.7165528817947607`*^9,
3.716553057021512*^9},ExpressionUUID->"a3e139be-c12e-49db-8c2f-\
ddbaea43f00d"],
Cell[BoxData["401"], "Output",
CellChangeTimes->{{3.694761799025874*^9, 3.6947618196815543`*^9},
3.6947620030088415`*^9, 3.69476215726947*^9, 3.694865074381962*^9,
3.694865359226396*^9, 3.6949356881318164`*^9, 3.6949362353857408`*^9,
3.6949364497300715`*^9, 3.6949403341256495`*^9, 3.6949404049079523`*^9,
3.6949404756972632`*^9, 3.694940526104085*^9, 3.6949405827423363`*^9,
3.694940694242578*^9, 3.694940822976068*^9, 3.694942408688008*^9,
3.6949424837033243`*^9, 3.6949425839955945`*^9, 3.6949426848522716`*^9, {
3.6949427890092945`*^9, 3.6949427953768196`*^9}, 3.6949435832447443`*^9,
3.694943981485768*^9, 3.694944057591855*^9, 3.694944136013589*^9,
3.694944255191286*^9, 3.694944556813644*^9, 3.694945389667541*^9,
3.6949455258355885`*^9, 3.694945589109557*^9, 3.6949456446019936`*^9,
3.694945688447152*^9, 3.6949458318230476`*^9, 3.694945890505752*^9,
3.694946004620852*^9, {3.694946046453582*^9, 3.69494606893656*^9},
3.694946102991763*^9, 3.6959669802139397`*^9, 3.6959671945551157`*^9,
3.695968240338876*^9, 3.696312949168794*^9, 3.6963139469778013`*^9,
3.6963141336857104`*^9, 3.696314246865906*^9, 3.6963143584654827`*^9,
3.696572636869007*^9, 3.696637691501759*^9, 3.6966378778268547`*^9,
3.696637973862893*^9, 3.696638857439565*^9, {3.6966463618288636`*^9,
3.6966463668572044`*^9}, 3.6966545454837265`*^9, 3.6966546751436963`*^9,
3.6966548220757165`*^9, 3.6966548599823017`*^9, 3.6966550414945745`*^9,
3.696655324313429*^9, 3.6966555461305037`*^9, 3.6966557043228464`*^9,
3.696667073734584*^9, 3.6966674004913435`*^9, 3.6966676152077007`*^9,
3.696667717552846*^9, 3.6966680535516725`*^9, 3.69666852543235*^9, {
3.696668573403612*^9, 3.6966685986493287`*^9}, 3.6966687743115172`*^9,
3.696668903711506*^9, 3.6966691618064957`*^9, 3.696669698901623*^9,
3.6966698873424363`*^9, 3.6966699690481606`*^9, 3.6966700137391987`*^9,
3.6966700634145765`*^9, 3.696670613179714*^9, 3.696670763074579*^9,
3.6971109357781086`*^9, 3.6971111158815765`*^9, 3.6971112467504735`*^9,
3.697111669880378*^9, 3.697112176372035*^9, 3.7015254657059345`*^9,
3.7029019888510613`*^9, 3.7029020245671377`*^9, 3.70290213279194*^9,
3.702902299633201*^9, 3.7029023369264917`*^9, 3.7029024445108604`*^9,
3.7029025208829246`*^9, {3.7029025579755898`*^9, 3.7029025867087307`*^9},
3.702902775083962*^9, 3.7029127226673994`*^9, {3.7029140108512588`*^9,
3.7029140168795843`*^9}, 3.702914096942294*^9, 3.702914275550105*^9,
3.702914341123105*^9, 3.702914439668206*^9, 3.7029145029839854`*^9,
3.7029145604612975`*^9, 3.7029157196592155`*^9, 3.70293887683179*^9,
3.7029389814986515`*^9, 3.7029391405034285`*^9, 3.702939424622772*^9,
3.702939765831732*^9, 3.7029403374930587`*^9, 3.7029404177131863`*^9,
3.7029405496872745`*^9, 3.702940791027217*^9, 3.7029410739598527`*^9,
3.7029750633595743`*^9, 3.703829365658081*^9, 3.7038297270738487`*^9,
3.7038297680626097`*^9, 3.70382982254936*^9, 3.703829989743739*^9,
3.7038302932617693`*^9, 3.7038308923000207`*^9, 3.70383102146551*^9,
3.7038311723111925`*^9, 3.7038312347472057`*^9, 3.703831384188266*^9,
3.703831432407628*^9, 3.703831489576618*^9, 3.7038351581147747`*^9,
3.7038352284485264`*^9, 3.7038352874649043`*^9, 3.7038353532458115`*^9,
3.7038354900005317`*^9, 3.7038355658289247`*^9, 3.7038356439795785`*^9,
3.703835710792919*^9, 3.703835835696487*^9, 3.7038360255651007`*^9,
3.7038360993818746`*^9, 3.7038365755774097`*^9, 3.7038371471057005`*^9,
3.703837598772865*^9, 3.7038389063486686`*^9, 3.7038617241921225`*^9,
3.7038631735535026`*^9, 3.70386327462133*^9, {3.703882027731588*^9,
3.703882033899849*^9}, 3.703882121021566*^9, 3.7038823873738923`*^9,
3.7038824701549*^9, 3.7038854813897777`*^9, 3.7038860042785287`*^9,
3.7038882886981916`*^9, 3.7038884019468713`*^9, 3.7038884354003897`*^9,
3.70388850859566*^9, 3.704170414173745*^9, 3.704170722809621*^9,
3.7041708971096325`*^9, 3.7041726293637085`*^9, 3.704426938469243*^9,
3.7044270733736577`*^9, 3.704427185740593*^9, 3.7044272796395226`*^9,
3.7044274874930573`*^9, 3.704440925320387*^9, 3.7044411132371473`*^9,
3.7044413712780867`*^9, 3.7044418678648105`*^9, 3.7044491779966164`*^9,
3.704513583195146*^9, 3.704513849270129*^9, 3.7045140202425575`*^9,
3.7045143142884064`*^9, 3.704514529445223*^9, 3.7045145887743597`*^9,
3.7045146460550456`*^9, 3.704514726230991*^9, 3.704514840789357*^9,
3.7045148716993084`*^9, 3.704514908140191*^9, 3.704515265758192*^9,
3.70451563750823*^9, 3.7045156733006516`*^9, 3.704515818407716*^9,
3.704516069273895*^9, {3.7045163379527254`*^9, 3.7045163649188795`*^9},
3.704516565361245*^9, 3.7045167070148554`*^9, 3.7045236179768286`*^9,
3.7045236942800245`*^9, 3.704523995238781*^9, 3.7045240499726562`*^9,
3.7045241025379953`*^9, 3.704524238449524*^9, 3.7045256358652964`*^9,
3.70452609350834*^9, 3.7049633873749847`*^9, 3.7049634927928567`*^9,
3.7049636687067995`*^9, 3.7049645290808897`*^9, 3.7049650149589834`*^9,
3.7049651677735214`*^9, 3.704966777253667*^9, 3.7049669304034443`*^9,
3.7049675591570177`*^9, 3.704971271139476*^9, 3.7050336091113853`*^9,
3.705033837270441*^9, 3.7053518558289876`*^9, 3.705352408385443*^9,
3.7053535492637587`*^9, 3.705354485294591*^9, 3.7053547663071737`*^9,
3.7053548379750757`*^9, 3.70535532484988*^9, 3.7053554374958878`*^9,
3.7053560599119625`*^9, 3.7053567499971013`*^9, 3.7053569545974197`*^9,
3.70535699730075*^9, {3.7053570832507954`*^9, 3.705357113052963*^9},
3.7053571646546135`*^9, 3.7053572064102707`*^9, {3.705357316331343*^9,
3.7053573215340567`*^9}, 3.705357368373306*^9, 3.7053574994444*^9,
3.705357611919286*^9, 3.705357997172934*^9, 3.7053581664471426`*^9,
3.705358459264118*^9, 3.7053593892586546`*^9, 3.7053767576729*^9,
3.705377129925297*^9, 3.7053814005764413`*^9, 3.7055910819310074`*^9,
3.705999276122208*^9, 3.7059994386847386`*^9, 3.7059995061036525`*^9,
3.7059995774143333`*^9, 3.7060000148532124`*^9, 3.7062255738995104`*^9,
3.716543607441601*^9, 3.71654371614924*^9, {3.7165437563357353`*^9,
3.716543783713189*^9}, 3.716543834725276*^9, 3.7165438979399548`*^9, {
3.716552042319249*^9, 3.716552054300879*^9}, 3.71655212892889*^9,
3.7165521771183367`*^9, 3.7165528817947607`*^9,
3.7165530570228*^9},ExpressionUUID->"8cea844d-a8b3-4d5b-ad85-b9f14037795c"]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"numsolListPlot", "[",
RowBox[{"q_", ",", "t_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"H", ",", "u", ",", "v", ",", "w", ",", "cell", ",", "sl", ",", "sr",
",", "otr", ",", "i"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"H", "=",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"His", "[",
RowBox[{"[", "t", "]"}], "]"}], ",",
FractionBox[
RowBox[{
RowBox[{"Dimensions", "[", "His", "]"}], "[",
RowBox[{"[", "2", "]"}], "]"}], "nx"]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"u", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "1"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"v", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "2"}]}], "]"}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"If", "[",
RowBox[{
RowBox[{"nshape", "\[Equal]", "3"}], ",",
RowBox[{"w", "=",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}], ",",
RowBox[{"w", "=",
RowBox[{"0", " ",
RowBox[{"H", "[",
RowBox[{"[",
RowBox[{"All", ",",
RowBox[{
RowBox[{"nshape",
RowBox[{"(",
RowBox[{"q", "-", "1"}], ")"}]}], "+", "nshape"}]}], "]"}],
"]"}]}]}]}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]",
RowBox[{"ListPlot", "[",
RowBox[{
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"hx",
RowBox[{"(",
RowBox[{"i", "-",
FractionBox["1", "2"]}], ")"}]}], ",",
RowBox[{"u", "[",
RowBox[{"[", "i", "]"}], "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",",
RowBox[{"Length", "[", "u", "]"}]}], "}"}]}], "]"}], ",", " ",
RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}]}],
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"cell", "=",
RowBox[{
RowBox[{"Floor", "[",
RowBox[{"x", "/", "hx"}], "]"}], "+", "1"}]}], ";",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"u", "[",
RowBox[{"[", "cell", "]"}], "]"}], "+",
RowBox[{
FractionBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}],
RowBox[{"hx", "/", "2"}]],
RowBox[{"v", "[",
RowBox[{"[", "cell", "]"}], "]"}]}], "+",
RowBox[{
RowBox[{"(",
RowBox[{
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-",
RowBox[{"hx",
RowBox[{"(",
RowBox[{"cell", "-",
FractionBox["1", "2"]}], ")"}]}]}], ")"}], "2"],
RowBox[{
SuperscriptBox["hx", "2"], "/", "6"}]], "-",
FractionBox["1", "2"]}], ")"}],
RowBox[{"w", "[",
RowBox[{"[", "cell", "]"}], "]"}]}]}]}], "*)"}],
"\[IndentingNewLine]", "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.694944341362528*^9, 3.694944468898183*^9}, {
3.6966685490179515`*^9,
3.6966685521501646`*^9}},ExpressionUUID->"b4b61ac8-3b97-4361-b062-\
242873d43229"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"numsolListPlot", "[",
RowBox[{"1", ",", "nsteps"}], "]"}]], "Input",
CellChangeTimes->{{3.694944476746744*^9, 3.694944488437069*^9}, {
3.7165436328506927`*^9,
3.7165436443134403`*^9}},ExpressionUUID->"852b2d9f-f0b3-464f-9028-\
c32293a8b859"],
Cell[BoxData[
GraphicsBox[{{}, {{},
{RGBColor[0.368417, 0.506779, 0.709798], PointSize[0.009166666666666668],
AbsoluteThickness[1.6], PointBox[CompressedData["
1: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
xA==
"]]}, {}}, {}, {}, {{}, {}}, {{}, {}}},
AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
Axes->{True, True},
AxesLabel->{None, None},
AxesOrigin->{0, 0},
DisplayFunction->Identity,
Frame->{{False, False}, {False, False}},
FrameLabel->{{None, None}, {None, None}},
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
GridLines->{None, None},
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
ImagePadding->All,
ImageSize->{629., Automatic},
Method->{"CoordinatesToolOptions" -> {"DisplayFunction" -> ({
(Identity[#]& )[
Part[#, 1]],
(Identity[#]& )[
Part[#, 2]]}& ), "CopiedValueFunction" -> ({
(Identity[#]& )[
Part[#, 1]],
(Identity[#]& )[
Part[#, 2]]}& )}},
PlotRange->{{0, 0.9975}, {0, 1.000103506608}},
PlotRangeClipping->True,
PlotRangePadding->{{
Scaled[0.02],
Scaled[0.02]}, {
Scaled[0.02],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Output",
CellChangeTimes->{
3.6949444889174104`*^9, 3.6949445598688154`*^9, 3.694945394631068*^9,
3.69494553664427*^9, 3.694945590964876*^9, 3.694945647592119*^9,
3.6949456908668733`*^9, {3.69494584069337*^9, 3.6949458482747393`*^9},
3.694945893530902*^9, 3.694946007609977*^9, {3.694946047276167*^9,
3.694946069279804*^9}, 3.694946103983469*^9, 3.6959669890518875`*^9,
3.695967201870536*^9, 3.6963139576045103`*^9, 3.696314138921236*^9,
3.6963142510350456`*^9, 3.6963143643571253`*^9, 3.6965726427654247`*^9,
3.6966377005583754`*^9, 3.6966378837072716`*^9, 3.696637981287429*^9,
3.696638868172295*^9, 3.696646371989572*^9, 3.696654549768017*^9,
3.696654679656004*^9, 3.6966548266440287`*^9, 3.696654864462599*^9,
3.6966550505191956`*^9, 3.6966553306698585`*^9, 3.696655551046849*^9,
3.696655707219033*^9, 3.6966670839792805`*^9, 3.6966674054156976`*^9,
3.696667619696024*^9, 3.6966677215851173`*^9, 3.6966680628603215`*^9, {
3.6966685313927546`*^9, 3.6966685776759005`*^9}, 3.6966687775997405`*^9,
3.6966689074397545`*^9, 3.696669166138789*^9, 3.6966697011337767`*^9,
3.696669889822623*^9, 3.6966699713843384`*^9, 3.69667002079568*^9,
3.6966700656667304`*^9, 3.6966706152358513`*^9, {3.6966707655267534`*^9,
3.696670768966998*^9}, 3.697111701890552*^9, 3.697112181564415*^9,
3.69711227779893*^9, 3.7015254659999933`*^9, 3.7029019925002613`*^9,
3.7029020284073753`*^9, 3.702902135809934*^9, 3.7029023031815214`*^9,
3.702902339689066*^9, 3.7029024467244105`*^9, 3.702902524261978*^9, {
3.702902560116246*^9, 3.702902589197558*^9}, 3.7029027803202705`*^9,
3.7029127282668743`*^9, 3.702914021272751*^9, 3.7029141045344563`*^9,
3.7029142800866804`*^9, 3.702914344823355*^9, 3.702914443450823*^9,
3.7029145060623302`*^9, 3.7029145638025227`*^9, 3.7029157243010845`*^9,
3.7029388801648397`*^9, 3.7029389847303514`*^9, 3.70293914758788*^9,
3.702939428971686*^9, 3.7029397680981927`*^9, 3.7029403408256254`*^9,
3.702940421811393*^9, 3.7029405516716604`*^9, 3.7029407934728575`*^9,
3.70294107624992*^9, 3.7029750664785795`*^9, 3.70382937073627*^9,
3.7038297320270534`*^9, 3.7038297722345448`*^9, 3.7038298673715544`*^9,
3.7038299932594123`*^9, 3.703830303590027*^9, 3.703830897346961*^9,
3.703831024824954*^9, 3.7038311763112507`*^9, 3.7038312366847305`*^9,
3.703831387547675*^9, 3.7038314347982826`*^9, 3.7038314935766883`*^9,
3.703835165114862*^9, 3.7038352331204557`*^9, 3.7038352927149773`*^9,
3.7038353594958925`*^9, 3.7038354944224615`*^9, 3.7038358494623175`*^9,
3.703836030049533*^9, 3.70383611742898*^9, 3.703836587530671*^9,
3.7038371822624025`*^9, 3.7038376013510237`*^9, 3.7038389197707124`*^9,
3.7038617285523787`*^9, 3.703863177491927*^9, 3.7038632784983916`*^9,
3.7038820388775334`*^9, 3.703882124877966*^9, 3.7038823916637115`*^9,
3.703882473379935*^9, 3.70388548493716*^9, 3.7038860066539574`*^9,
3.703888292610405*^9, 3.70388840597237*^9, 3.703888440287088*^9,
3.703888510345459*^9, 3.7041704221898403`*^9, 3.7041707276834555`*^9,
3.7041709046491303`*^9, 3.7041726389095645`*^9, 3.7044269436101203`*^9,
3.7044270833336806`*^9, 3.7044271912527866`*^9, 3.704427311903098*^9,
3.704427520778816*^9, 3.704440934119034*^9, 3.7044411246324205`*^9,
3.7044414112013116`*^9, 3.704441973815646*^9, 3.704449281732323*^9,
3.704513593478445*^9, 3.704513852479401*^9, 3.704514023801086*^9,
3.704514318436351*^9, 3.7045145527027445`*^9, 3.704514592194789*^9,
3.70451464924631*^9, 3.704514730145769*^9, 3.704514844205782*^9,
3.704514874922599*^9, 3.7045149111453257`*^9, 3.704515295174095*^9,
3.704515640033023*^9, 3.7045156764068584`*^9, 3.7045158239536533`*^9,
3.7045160728304214`*^9, {3.704516341613324*^9, 3.7045163692409477`*^9},
3.7045165685184884`*^9, 3.7045167116811867`*^9, 3.704523622406975*^9,
3.704523699042405*^9, 3.7045239982649307`*^9, 3.704524052173218*^9,
3.704524106347703*^9, 3.7045242412845545`*^9, 3.7045256392016673`*^9,
3.7045261040628366`*^9, 3.7049636738324413`*^9, 3.70496453373419*^9,
3.704965021146397*^9, 3.704965171780368*^9, {3.7049665723521347`*^9,
3.7049665797493916`*^9}, 3.7049667801146965`*^9, 3.7049669369811115`*^9,
3.7049675735492387`*^9, 3.70497147868989*^9, 3.7050336123927345`*^9,
3.705033840962061*^9, 3.7053518632042294`*^9, 3.705352411154411*^9,
3.705353552285907*^9, 3.7053545924416847`*^9, 3.7053547738245106`*^9,
3.705354839864417*^9, 3.705355361735078*^9, 3.705355441744908*^9,
3.7053560634965467`*^9, 3.705356780454751*^9, 3.7053569575054855`*^9,
3.7053569997124624`*^9, {3.705357085914706*^9, 3.705357115837943*^9},
3.705357166315794*^9, 3.7053572081024723`*^9, 3.705357328963315*^9,
3.7053573764870687`*^9, 3.7053575073320026`*^9, 3.705357615861085*^9,
3.7053580005723295`*^9, 3.705358168375514*^9, 3.7053584643157067`*^9,
3.705360246504519*^9, 3.705376764409685*^9, 3.705377179638608*^9,
3.7053817562750916`*^9, 3.7055911157420416`*^9, 3.7059992802661533`*^9,
3.705999442988799*^9, 3.7059995079810047`*^9, 3.7059995800872498`*^9,
3.706000019400462*^9, 3.7062255760450363`*^9, {3.716543608008183*^9,
3.716543644882161*^9}, 3.7165437162303753`*^9, {3.716543756414976*^9,
3.7165437837797422`*^9}, 3.716543834795204*^9, 3.716543898018268*^9, {
3.716552042666233*^9, 3.71655205437745*^9}, 3.7165521290013742`*^9,
3.716552177279807*^9, 3.716552881862605*^9,
3.7165530570979958`*^9},ExpressionUUID->"e2ce393d-4fc8-4dc6-862b-\
2e1b7789c1f4"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Manipulate", "[",
RowBox[{
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"numsol", "[",
RowBox[{"1", ",", "x", ",", "t"}], "]"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"PlotPoints", "\[Rule]", "100"}]}], "]"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "1", ",", "nsteps", ",", "1"}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.693298274705412*^9, 3.6932982851974607`*^9}, {
3.6932983229762383`*^9, 3.693298345367477*^9}, {3.6933108897537794`*^9,