|
615 | 615 | " ├── @\n",
|
616 | 616 | " │ ├── Sparse Matrix (42, 40)\n",
|
617 | 617 | " │ └── y[0:40]\n",
|
618 |
| - " └── numpy concatenation\n", |
619 |
| - " ├── Column vector of length 0\n", |
620 |
| - " ├── *\n", |
621 |
| - " │ ├── *\n", |
622 |
| - " │ │ ├── 2.0\n", |
623 |
| - " │ │ └── 1.0\n", |
624 |
| - " │ └── Column vector of length 1\n", |
625 |
| - " ├── Column vector of length 40\n", |
626 |
| - " └── *\n", |
627 |
| - " ├── *\n", |
628 |
| - " │ ├── 2.0\n", |
629 |
| - " │ └── 2.0\n", |
630 |
| - " └── Column vector of length 1\n", |
| 618 | + " └── Column vector of length 42\n", |
631 | 619 | "The value of u on the left-hand boundary is [1.]\n",
|
632 | 620 | "The value of u on the right-hand boundary is [2.]\n"
|
633 | 621 | ]
|
|
663 | 651 | "output_type": "stream",
|
664 | 652 | "text": [
|
665 | 653 | "The gradient object is:\n",
|
666 |
| - "@\n", |
667 |
| - "├── Sparse Matrix (41, 42)\n", |
668 |
| - "└── +\n", |
669 |
| - " ├── @\n", |
670 |
| - " │ ├── Sparse Matrix (42, 40)\n", |
671 |
| - " │ └── y[0:40]\n", |
672 |
| - " └── numpy concatenation\n", |
673 |
| - " ├── Column vector of length 0\n", |
674 |
| - " ├── *\n", |
675 |
| - " │ ├── *\n", |
676 |
| - " │ │ ├── -0.024999999999999998\n", |
677 |
| - " │ │ └── 3.0\n", |
678 |
| - " │ └── Column vector of length 1\n", |
679 |
| - " ├── Column vector of length 40\n", |
680 |
| - " └── *\n", |
681 |
| - " ├── *\n", |
682 |
| - " │ ├── 0.02499999999999991\n", |
683 |
| - " │ └── 4.0\n", |
684 |
| - " └── Column vector of length 1\n", |
| 654 | + "+\n", |
| 655 | + "├── @\n", |
| 656 | + "│ ├── Sparse Matrix (41, 39)\n", |
| 657 | + "│ └── @\n", |
| 658 | + "│ ├── Sparse Matrix (39, 40)\n", |
| 659 | + "│ └── y[0:40]\n", |
| 660 | + "└── Column vector of length 41\n", |
685 | 661 | "The gradient on the left-hand boundary is [3.]\n",
|
686 | 662 | "The gradient of u on the right-hand boundary is [4.]\n"
|
687 | 663 | ]
|
|
714 | 690 | "output_type": "stream",
|
715 | 691 | "text": [
|
716 | 692 | "The gradient object is:\n",
|
717 |
| - "@\n", |
718 |
| - "├── Sparse Matrix (41, 42)\n", |
719 |
| - "└── +\n", |
720 |
| - " ├── @\n", |
721 |
| - " │ ├── Sparse Matrix (42, 40)\n", |
722 |
| - " │ └── y[0:40]\n", |
723 |
| - " └── numpy concatenation\n", |
724 |
| - " ├── Column vector of length 0\n", |
725 |
| - " ├── *\n", |
726 |
| - " │ ├── *\n", |
727 |
| - " │ │ ├── 2.0\n", |
728 |
| - " │ │ └── 5.0\n", |
729 |
| - " │ └── Column vector of length 1\n", |
730 |
| - " ├── Column vector of length 40\n", |
731 |
| - " └── *\n", |
732 |
| - " ├── *\n", |
733 |
| - " │ ├── 0.02499999999999991\n", |
734 |
| - " │ └── 6.0\n", |
735 |
| - " └── Column vector of length 1\n", |
736 |
| - "The value of u on the left-hand boundary is [5.]\n", |
| 693 | + "+\n", |
| 694 | + "├── @\n", |
| 695 | + "│ ├── Sparse Matrix (41, 40)\n", |
| 696 | + "│ └── @\n", |
| 697 | + "│ ├── Sparse Matrix (40, 41)\n", |
| 698 | + "│ └── +\n", |
| 699 | + "│ ├── @\n", |
| 700 | + "│ │ ├── Sparse Matrix (41, 40)\n", |
| 701 | + "│ │ └── y[0:40]\n", |
| 702 | + "│ └── Column vector of length 41\n", |
| 703 | + "└── Column vector of length 41\n", |
| 704 | + "The value of u on the left-hand boundary is [0.]\n", |
737 | 705 | "The gradient on the right-hand boundary is [6.]\n"
|
738 | 706 | ]
|
739 | 707 | }
|
|
797 | 765 | "text": [
|
798 | 766 | "@\n",
|
799 | 767 | "├── Sparse Matrix (40, 41)\n",
|
800 |
| - "└── @\n", |
801 |
| - " ├── Sparse Matrix (41, 42)\n", |
802 |
| - " └── +\n", |
803 |
| - " ├── @\n", |
804 |
| - " │ ├── Sparse Matrix (42, 40)\n", |
805 |
| - " │ └── y[0:40]\n", |
806 |
| - " └── numpy concatenation\n", |
807 |
| - " ├── Column vector of length 0\n", |
808 |
| - " ├── *\n", |
809 |
| - " │ ├── *\n", |
810 |
| - " │ │ ├── -0.024999999999999998\n", |
811 |
| - " │ │ └── -1.0\n", |
812 |
| - " │ └── Column vector of length 1\n", |
813 |
| - " ├── Column vector of length 40\n", |
814 |
| - " └── *\n", |
815 |
| - " ├── *\n", |
816 |
| - " │ ├── 0.02499999999999991\n", |
817 |
| - " │ └── 1.0\n", |
818 |
| - " └── Column vector of length 1\n" |
| 768 | + "└── +\n", |
| 769 | + " ├── @\n", |
| 770 | + " │ ├── Sparse Matrix (41, 39)\n", |
| 771 | + " │ └── @\n", |
| 772 | + " │ ├── Sparse Matrix (39, 40)\n", |
| 773 | + " │ └── y[0:40]\n", |
| 774 | + " └── Column vector of length 41\n" |
819 | 775 | ]
|
820 | 776 | }
|
821 | 777 | ],
|
|
878 | 834 | "output_type": "stream",
|
879 | 835 | "text": [
|
880 | 836 | "@\n",
|
881 |
| - "├── Sparse Matrix (40, 42)\n", |
| 837 | + "├── Sparse Matrix (40, 41)\n", |
882 | 838 | "└── +\n",
|
883 |
| - " ├── Column vector of length 42\n", |
| 839 | + " ├── Column vector of length 41\n", |
884 | 840 | " └── @\n",
|
885 |
| - " ├── Sparse Matrix (42, 40)\n", |
| 841 | + " ├── Sparse Matrix (41, 40)\n", |
886 | 842 | " └── y[0:40]\n"
|
887 | 843 | ]
|
888 | 844 | }
|
|
904 | 860 | "laplacian matrix is:\n",
|
905 | 861 | "\n",
|
906 | 862 | "1/dx^2 *\n",
|
907 |
| - "[[ 1. -2. 1. ... 0. 0. 0.]\n", |
908 |
| - " [ 0. 1. -2. ... 0. 0. 0.]\n", |
909 |
| - " [ 0. 0. 1. ... 0. 0. 0.]\n", |
| 863 | + "[[-0.025 0.025 0. ... 0. 0. 0. ]\n", |
| 864 | + " [ 0. -0.025 0.025 ... 0. 0. 0. ]\n", |
| 865 | + " [ 0. 0. -0.025 ... 0. 0. 0. ]\n", |
910 | 866 | " ...\n",
|
911 |
| - " [ 0. 0. 0. ... 1. 0. 0.]\n", |
912 |
| - " [ 0. 0. 0. ... -2. 1. 0.]\n", |
913 |
| - " [ 0. 0. 0. ... 1. -2. 1.]]\n" |
| 867 | + " [ 0. 0. 0. ... 0.025 0. 0. ]\n", |
| 868 | + " [ 0. 0. 0. ... -0.025 0.025 0. ]\n", |
| 869 | + " [ 0. 0. 0. ... 0. -0.025 0.025]]\n" |
914 | 870 | ]
|
915 | 871 | }
|
916 | 872 | ],
|
|
936 | 892 | {
|
937 | 893 | "data": {
|
938 | 894 | "text/plain": [
|
939 |
| - "0.5950588420091663" |
| 895 | + "0.4124502999475226" |
940 | 896 | ]
|
941 | 897 | },
|
942 | 898 | "execution_count": 25,
|
|
957 | 913 | {
|
958 | 914 | "data": {
|
959 | 915 | "text/plain": [
|
960 |
| - "0.3470027389994357" |
| 916 | + "0.2925413999473676" |
961 | 917 | ]
|
962 | 918 | },
|
963 | 919 | "execution_count": 26,
|
|
1035 | 991 | "int(v):\n",
|
1036 | 992 | "\n",
|
1037 | 993 | "@\n",
|
1038 |
| - "├── *\n", |
1039 |
| - "│ ├── 39.47841760435743\n", |
1040 |
| - "│ └── Sparse Matrix (1, 10)\n", |
| 994 | + "├── Sparse Matrix (1, 10)\n", |
1041 | 995 | "└── *\n",
|
1042 | 996 | " ├── /\n",
|
1043 | 997 | " │ ├── y[40:50]\n",
|
|
1083 | 1037 | {
|
1084 | 1038 | "data": {
|
1085 | 1039 | "text/plain": [
|
1086 |
| - "matrix([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]])" |
| 1040 | + "matrix([[39.4784176, 39.4784176, 39.4784176, 39.4784176, 39.4784176,\n", |
| 1041 | + " 39.4784176, 39.4784176, 39.4784176, 39.4784176, 39.4784176]])" |
1087 | 1042 | ]
|
1088 | 1043 | },
|
1089 | 1044 | "execution_count": 30,
|
|
1092 | 1047 | }
|
1093 | 1048 | ],
|
1094 | 1049 | "source": [
|
1095 |
| - "int_v_over_r_disc.children[0].children[1].evaluate() / micro_mesh.d_edges" |
| 1050 | + "int_v_over_r_disc.children[0].evaluate() / micro_mesh.d_edges" |
1096 | 1051 | ]
|
1097 | 1052 | },
|
1098 | 1053 | {
|
|
1282 | 1237 | "name": "python",
|
1283 | 1238 | "nbconvert_exporter": "python",
|
1284 | 1239 | "pygments_lexer": "ipython3",
|
1285 |
| - "version": "3.7.3" |
| 1240 | + "version": "3.6.9" |
1286 | 1241 | }
|
1287 | 1242 | },
|
1288 | 1243 | "nbformat": 4,
|
|
0 commit comments