(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 39930, 916]*) (*NotebookOutlinePosition[ 40791, 944]*) (* CellTagsIndexPosition[ 40747, 940]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[StyleBox["Y.Tazawa : IntroDiffGeom", FontWeight->"Bold"]], "Text", TextAlignment->Right, TextJustification->0, FontSize->10], Cell["6. Drawing Surfaces with Assigned fundamental quantities", "Section", FontColor->RGBColor[1, 0, 0]], Cell[CellGroupData[{ Cell["Integrability Check", "Section", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[0, 0, 1]], Cell[CellGroupData[{ Cell["integrabilitycheck", "Subsubsection", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ RowBox[{\(integrabilitycheck[gg_, hh_]\), ":=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(u[i]\), FontColor->RGBColor[0, 0, 1]], "=", \({u, v}[\([i]\)]\)}], ",", \({i, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(g[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(gg[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(h[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(hh[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", "\t", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["gu", FontColor->RGBColor[0, 0, 1]], "[", \(i, j\), "]"}], "=", \(\(Inverse[gg]\)[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(a[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(\((Table[\ h[ii, jj], {ii, 1, 2}, {jj, 1, 2}] . \n \ \ \ \ \ \ \ \ \ \ Table[gu[ii, jj], {ii, 1, 2}, {jj, 1, 2}])\)[ \([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["chris", FontColor->RGBColor[0, 0, 1]], "[", \(i, j, k\), "]"}], "=", \(\((1/2)\)* Sum[gu[i, m]*\n\ \ \ \ \((\ D[g[m, k], u[j]] + D[g[m, j], u[k]] - D[g[j, k], u[m]]\ )\) // Simplify, \n \ \ \ \ {m, 1, 2}]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\), ",", \({k, 1, 2}\)}], "]"}], ";", " \t", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["rr", FontColor->RGBColor[0, 0, 1]], "[", \(l, i, j, k\), "]"}], "=", \(\((D[chris[l, i, j], u[k]] - D[chris[l, i, k], u[j]] + Sum[chris[m, i, j]*chris[l, m, k], {m, 1, 2}] - Sum[chris[m, i, k]*chris[l, m, j], {m, 1, 2}])\) // Simplify\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\), ",", \({k, 1, 2}\), ",", \({l, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["hul", FontColor->RGBColor[0, 0, 1]], "[", \(m, j\), "]"}], "=", \(Sum[h[j, i]*gu[i, m], {i, 1, 2}]\)}], ",", \({m, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", "\t\t", "\n", \({g[1, 1], g[2, 2], Det[gg]}\)}], ",", "\n", "\t\t\t\t", "\n", \(aa = Sign[ Sum[\(\((\((rr[l, i, j, k] // Simplify)\) == \((h[i, j]*hul[l, k] - h[i, k]*hul[l, j])\) // Simplify)\) /. True -> 0\)\ \ /. \ False -> 1, {l, 1, 2}, {i, 1, 2}, {j, 1, 2}, {k, 1, 2}] + \n\t Sum[\(\(( Simplify[ D[h[i, j], u[k]] - D[h[i, k], u[j]] + Sum[chris[m, i, j]*h[k, m], {m, 1, 2}] - Sum[chris[m, i, k]*h[j, m], {m, 1, 2}]] == 0) \) /. True -> 0\)\ \ /. \ False -> 1, {i, 1, 2}, {j, 1, 2}, {k, 1, 2}]]; \n\t aa*"\" + \((1 - aa)\)*"\"\)}], "}"}]}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["numintegrabilitycheck", "Subsubsection", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ RowBox[{ RowBox[{ \(numintegrabilitycheck[gg_, hh_, u0_, u1_, v0_, v1_, num_]\), ":=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(u[i]\), FontColor->RGBColor[0, 0, 1]], "=", \({u, v}[\([i]\)]\)}], ",", \({i, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(g[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(gg[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(h[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(hh[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", "\t", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["gu", FontColor->RGBColor[0, 0, 1]], "[", \(i, j\), "]"}], "=", \(\(Inverse[gg]\)[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(a[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(\((Table[\ h[ii, jj], {ii, 1, 2}, {jj, 1, 2}] . \n \ \ \ \ \ \ \ \ \ \ Table[gu[ii, jj], {ii, 1, 2}, {jj, 1, 2}])\)[ \([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["chris", FontColor->RGBColor[0, 0, 1]], "[", \(i, j, k\), "]"}], "=", \(\((1/2)\)* Sum[gu[i, m]*\n\ \ \ \ \((\ D[g[m, k], u[j]] + D[g[m, j], u[k]] - D[g[j, k], u[m]]\ )\) // Simplify, \n \ \ \ \ {m, 1, 2}]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\), ",", \({k, 1, 2}\)}], "]"}], ";", " \t", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["rr", FontColor->RGBColor[0, 0, 1]], "[", \(l, i, j, k\), "]"}], "=", \(\((D[chris[l, i, j], u[k]] - D[chris[l, i, k], u[j]] + Sum[chris[m, i, j]*chris[l, m, k], {m, 1, 2}] - Sum[chris[m, i, k]*chris[l, m, j], {m, 1, 2}])\) // Simplify\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\), ",", \({k, 1, 2}\), ",", \({l, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["hul", FontColor->RGBColor[0, 0, 1]], "[", \(m, j\), "]"}], "=", \(Sum[h[j, i]*gu[i, m], {i, 1, 2}]\)}], ",", \({m, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", "\t\t", "\n", \(aaaa = Sum[\(\((Sign[g[1, 1]] + Sign[g[2, 2]] + Sign[Det[gg]] == 3) \) /. True -> 0\)\ \ /. \ False -> 1, {\n\ \ \ \ \ \ u, u0, u1, \((u1 - u0)\)/num}, {v, v0, v1, \((v1 - v0)\)/num}]\), " ", ";", "\n", "\n", \(Table[\(( bb00[l, i, j, k] = \((rr[l, i, j, k] - h[i, j]*hul[l, k] + h[i, k]*hul[l, j]) \) // Simplify)\), {l, 1, 2}, {i, 1, 2}, {j, 1, 2}, { k, 1, 2}]\), ";", "\n", "\t", "\n", "\t\t\t", \(Do[uuuu[i] = u0 + i*\((u1 - u0)\)/num\t, {i, 0, num}]\), ";", "\n", "\t\t\t", \(Do[vvvv[i] = v0 + i*\((v1 - v0)\)/num\t, {i, 0, num}]\), ";", "\n", "\t\t", \(bbbb00 = \(Sum[\(( \(Sum[bb00[l, i, j, k] == 0, {l, 1, 2}, {i, 1, 2}, { j, 1, 2}, {k, 1, 2}] /. u -> uuuu[nn]\) /. v -> vvvv[nn])\), {nn, 0, num}, {mm, 0, num}] /. True -> 0\)\ \ /. \ False -> 1\), " ", ";", "\n", "\t\t\t", "\n", "\t\t", \(Table[bb11[i, j, k] = Simplify[ D[h[i, j], u[k]] - D[h[i, k], u[j]] + Sum[chris[m, i, j]*h[k, m], {m, 1, 2}] - Sum[chris[m, i, k]*h[j, m], {m, 1, 2}]], {i, 1, 2}, {j, 1, 2}, {k, 1, 2}]\), ";", "\n", "\t\t", "\n", "\t\t", \(bbbb11 = \(Sum[\(( \(Sum[bb11[i, j, k] == 0, {i, 1, 2}, {j, 1, 2}, {k, 1, 2}] /. u -> uuuu[nn]\) /. v -> vvvv[nn]) \), {nn, 0, num}, {mm, 0, num}] /. True -> 0\)\ \ /. \ False -> 1\), " ", ";", "\n", "\t\t", "\n", "\t\t\t", \(Sign[aaaa]* "\" + \((1 - Sign[aaaa])\)* "\"\)}], ",", "\n", " \t \t", \(Sign[bbbb00 + bbbb11]* "\" + \((1 - Sign[bbbb00 + bbbb11])\)* "\"\)}], "\t", "}"}]}], ";"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Example 0", "Section", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["gg", FontColor->RGBColor[0, 0, 1]], "=", \({{Cos[v]^2, 0}, {0, 1}}\)}], ";", "\n", RowBox[{ StyleBox["hh", FontColor->RGBColor[0, 0, 1]], "=", \(({{\(-Cos[v]^2\), 0}, {0, \(-1\)}})\)}], ";"}]], "Input"], Cell[BoxData[ \(integrabilitycheck[gg, hh]\)], "Input"], Cell[BoxData[ \(Timing[ numintegrabilitycheck[gg, hh, \(-Pi\), Pi, \(-Pi\)/2 + 0.01, Pi/2 - 0.01, 32]]\)], "Input"], Cell[BoxData[ \(gg = {{9*\((1\ + \ u^2\ + \ v^2)\)^2, \ 0}, \ {0, \ 9*\((1\ + \ u^2\ + \ v^2)\)^2}}; \n hh = {{\(-6\), \ 0}, \ \ {0, \ 6}}; \)], "Input"], Cell[BoxData[ \(integrabilitycheck[gg, hh]\)], "Input"], Cell[BoxData[ \(Timing[numintegrabilitycheck[gg, hh, \(-2.5\), 2.5, \(-2.7\), 2.7, 32]] \)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["numplotfundsol", "Section", FontFamily->"Courier", FontWeight->"Bold", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["numplotfundsol", FontColor->RGBColor[1, 0, 0]], "[", \(gg_, hh_, pp00_, dir11_, dir22_, del11_, del22_, mm_, nn_, opts___\), "]"}], ":=", RowBox[{"{", "\n", StyleBox[\( (*\ Coeffitients\ *) \), FontColor->RGBColor[1, 0, 0]], "\n", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(u[i]\), FontColor->RGBColor[0, 0, 1]], "=", \({u, v}[\([i]\)]\)}], ",", \({i, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(g[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(gg[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(h[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", \(hh[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["gu", FontColor->RGBColor[0, 0, 1]], "[", \(i, j\), "]"}], "=", \(\(Inverse[gg]\)[\([i, j]\)]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ StyleBox[\(a[i, j]\), FontColor->RGBColor[0, 0, 1]], "=", RowBox[{ StyleBox["-", FontColor->RGBColor[1, 0, 0]], \(\((Table[\ h[ii, jj], {ii, 1, 2}, {jj, 1, 2}] . \n \ \ \ \ \ \ \ \ \ \ Table[gu[ii, jj], {ii, 1, 2}, {jj, 1, 2}])\)[ \([i, j]\)]\)}]}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\)}], "]"}], ";", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["chris", FontColor->RGBColor[0, 0, 1]], "[", \(i, j, k\), "]"}], "=", \(\((1/2)\)* Sum[gu[i, m]*\n\ \ \ \ \((\ D[g[m, k], u[j]] + D[g[m, j], u[k]] - D[g[j, k], u[m]]\ )\) // Simplify, \n \ \ \ \ {m, 1, 2}]\)}], ",", \({i, 1, 2}\), ",", \({j, 1, 2}\), ",", \({k, 1, 2}\)}], "]"}], ";", " \t", "\n", "\t\t", "\n", StyleBox[\( (*\ Adjusting\ the\ initial\ conditions\ *) \), FontColor->RGBColor[1, 0, 0]], "\t", "\n", \(tt11 = \((1/Sqrt[dir11 . dir11])\)*dir11\), ";", "\n", \(tt2200 = Cross[Cross[tt11, dir22], tt11]\), ";", "\n", \(tt22 = \((1/Sqrt[tt2200 . tt2200])\)*tt2200\), ";", "\n", \(tanuu = Sqrt[\(g[1, 1] /. u -> 0\) /. v -> 0]*tt11\), ";", "\n", \(tanvv = \((\(g[1, 2] /. u -> 0\) /. v -> 0)\)*tt11 + Sqrt[\((\(g[2, 2] /. u -> 0\) /. v -> 0)\)]*tt22\), ";", "\n", \(normluv = Cross[tanuu, tanvv]/ Sqrt[Cross[tanuu, tanvv] . Cross[tanuu, tanvv]]\), ";", "\t", "\n", "\t\t\t\t", "\n", RowBox[{ StyleBox["iniconbb", FontColor->RGBColor[0, 0, 1]], "=", \(Join[\n\t\tTable[\(b[1, j]\)[0] == tanuu[\([j]\)], {j, 1, 3}], \n\ \ \tTable[\(b[2, j]\)[0] == tanvv[\([j]\)], {j, 1, 3}], \n \ \ \tTable[\(b[3, j]\)[0] == normluv[\([j]\)], {j, 1, 3}]] \)}], ";", "\n", "\n", StyleBox[ \( (*\ differential\ equations\ for\ \((\[Beta]\_1, .. , \[Beta]\_9)\)\ *) \), FontColor->RGBColor[1, 0, 0]], "\t\t", "\n", RowBox[{"Do", "[", " ", RowBox[{ RowBox[{\(diffeq1100[j]\), "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ StyleBox["b", FontColor->GrayLevel[0]], StyleBox["[", FontColor->GrayLevel[0]], RowBox[{ StyleBox["j", FontColor->RGBColor[1, 0, 0], Background->GrayLevel[1]], StyleBox[",", FontColor->GrayLevel[0]], StyleBox["i", FontColor->GrayLevel[0]]}], StyleBox["]", FontColor->GrayLevel[0]]}], StyleBox["'", FontColor->GrayLevel[0]]}], StyleBox["[", FontColor->GrayLevel[0]], StyleBox["u", FontColor->GrayLevel[0]], StyleBox["]", FontColor->GrayLevel[0]]}], StyleBox["==", FontColor->GrayLevel[0]], "\n", "\t", RowBox[{ RowBox[{ StyleBox["Sum", FontColor->GrayLevel[0]], StyleBox["[", FontColor->GrayLevel[0]], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ StyleBox["chris", FontColor->GrayLevel[0]], StyleBox["[", FontColor->GrayLevel[0]], RowBox[{ StyleBox["k", FontColor->GrayLevel[0]], StyleBox[",", FontColor->GrayLevel[0]], StyleBox["1", FontColor->GrayLevel[0]], StyleBox[",", FontColor->GrayLevel[0]], StyleBox["j", FontColor->RGBColor[1, 0, 0], Background->GrayLevel[1]]}], StyleBox["]", FontColor->GrayLevel[0]]}], "/.", \(v -> 0\)}], ")"}], StyleBox["*", FontColor->GrayLevel[0]], StyleBox[\(\(b[k, i]\)[u]\), FontColor->GrayLevel[0]]}], StyleBox[",", FontColor->GrayLevel[0]], StyleBox[\({k, 1, 2}\), FontColor->GrayLevel[0]]}], "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ StyleBox["h", FontColor->GrayLevel[0]], StyleBox["[", FontColor->GrayLevel[0]], RowBox[{ StyleBox["1", FontColor->GrayLevel[0]], StyleBox[",", FontColor->GrayLevel[0]], StyleBox["j", FontColor->RGBColor[1, 0, 0], Background->GrayLevel[1]]}], StyleBox["]", FontColor->GrayLevel[0]]}], "/.", \(v -> 0\)}], ")"}], StyleBox["*", FontColor->GrayLevel[0]], RowBox[{ StyleBox[\(b[3, i]\), FontColor->GrayLevel[0]], "[", "u", "]"}]}]}]}], StyleBox[",", FontColor->GrayLevel[0]], StyleBox[\({i, 1, 3}\), FontColor->GrayLevel[0]]}], StyleBox["]", FontColor->GrayLevel[0]]}]}], StyleBox[" ", FontColor->GrayLevel[0]], StyleBox[",", FontColor->GrayLevel[0]], "\n", "\t\t\t", \({j, 1, 2}\)}], "]"}], " ", ";", "\n", "\t", RowBox[{\(diffeq1100[3]\), "=", RowBox[{"Table", "[", "\t", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"3", ",", StyleBox["j", FontColor->RGBColor[1, 0, 0]]}], "]"}], "'"}], "[", "u", "]"}], "==", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"a", "[", RowBox[{"1", ",", StyleBox["i", FontColor->RGBColor[0, 0, 1]]}], "]"}], "/.", \(v -> 0\)}], ")"}], "*", RowBox[{ RowBox[{"b", "[", RowBox[{ StyleBox["i", FontColor->RGBColor[0, 0, 1]], ",", StyleBox["j", FontColor->RGBColor[1, 0, 0]]}], "]"}], "[", "u", "]"}]}], ",", RowBox[{"{", RowBox[{ StyleBox["i", FontColor->RGBColor[0, 0, 1]], ",", "1", ",", "2"}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{ StyleBox["j", FontColor->RGBColor[1, 0, 0]], ",", "1", ",", "3"}], "}"}]}], "]"}]}], ";", "\n", " ", RowBox[{ StyleBox["diffeqbb", FontColor->RGBColor[0, 0, 1]], "=", \(Join[diffeq1100[1], diffeq1100[2], diffeq1100[3]]\)}], ";", "\t\t", "\n", RowBox[{ StyleBox["unkbb", FontColor->RGBColor[0, 0, 1]], "=", \(Join[\n\ \ \tTable[\(b[1, j]\)[u], {j, 1, 3}], \n\ \ \t Table[\(b[2, j]\)[u], {j, 1, 3}], \n\t\ \ Table[\(b[3, j]\)[u], {j, 1, 3}]]\)}], ";", "\n", "\t\t", "\n", RowBox[{ StyleBox["sollistbb", FontColor->RGBColor[0, 0, 1]], "=", RowBox[{ StyleBox["NDSolve", FontColor->RGBColor[1, 0, 0]], "[", RowBox[{ RowBox[{"Join", "[", " ", RowBox[{ StyleBox["diffeqbb", FontColor->RGBColor[0, 0, 1]], ",", StyleBox["iniconbb", FontColor->RGBColor[0, 0, 1]]}], "]"}], ",", "\n", " ", StyleBox["unkbb", FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->GrayLevel[0]], \({u, \(-del11\), del11}\)}], "]"}]}], ";", "\n", RowBox[{"Do", "[", "\n", "\t\t\t\t", RowBox[{ RowBox[{ RowBox[{ StyleBox["bb", FontColor->RGBColor[0, 0, 1]], "[", \(i, j\), "]"}], "=", \(\(b[i, j]\)[u] /. sollistbb[\([1]\)]\)}], ",", \({i, 1, 3}\), ",", \({j, 1, 3}\)}], "]"}], ";", "\n", "\n", StyleBox[ \( (*\ differential\ equations\ for\ \((\[Gamma]\_1, .. , \[Gamma]\_9)\)*) \), FontColor->RGBColor[1, 0, 0]], "\t\t\t", "\n", \(Do[uuu[i] = i*del11/mm, {i, \(-mm\), mm}]\), ";", "\n", \(Do[vvv[j] = j*del22/nn, {j, \(-nn\), nn}]\), ";", "\n", "\t\t", "\n", RowBox[{"Do", "[", StyleBox["\t", FontColor->RGBColor[0, 0, 1]], RowBox[{ RowBox[{"Do", "[", StyleBox["\t", FontColor->RGBColor[0, 0, 1]], RowBox[{ RowBox[{ RowBox[{ StyleBox[\(diffeqcc00[jj]\), FontColor->RGBColor[0, 0, 1]], "[", StyleBox["j", FontColor->RGBColor[1, 0, 0]], "]"}], "=", RowBox[{"Table", "[", "\n", "\t\t\t\t\t", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{\(c[jj]\), "[", RowBox[{ StyleBox["j", FontColor->RGBColor[1, 0, 0]], ",", StyleBox["i", FontColor->RGBColor[1, 0, 0]]}], "]"}], "'"}], "[", "v", "]"}], "==", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"chris", "[", RowBox[{ StyleBox["k", FontColor->RGBColor[0, 0, 1]], ",", StyleBox["j", FontColor->RGBColor[1, 0, 0]], ",", "2"}], "]"}], "/.", RowBox[{"u", "->", RowBox[{"uuu", "[", StyleBox[ RowBox[{"j", StyleBox["j", FontColor->RGBColor[1, 0, 0]]}]], "]"}]}]}], ")"}], "*", RowBox[{ RowBox[{\(c[jj]\), "[", RowBox[{ StyleBox["k", FontColor->RGBColor[0, 0, 1]], ",", StyleBox["i", FontColor->RGBColor[1, 0, 0]]}], "]"}], "[", "v", "]"}]}], ",", \({k, 1, 2}\)}], "]"}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"h", "[", RowBox[{"2", ",", StyleBox["j", FontColor->RGBColor[1, 0, 0]]}], "]"}], "/.", \(u -> uuu[jj]\)}], ")"}], "*", RowBox[{ RowBox[{\(c[jj]\), "[", RowBox[{"3", ",", StyleBox["i", FontColor->RGBColor[1, 0, 0]]}], "]"}], "[", "v", "]"}]}]}]}], ",", "\n", "\t\t\t\t\t", \({i, 1, 3}\)}], "]"}]}], StyleBox[",", FontColor->GrayLevel[0]], \({j, 1, 2}\)}], "]"}], ",", \({jj, \(-mm\), mm}\)}], "]"}], ";", StyleBox[" ", FontColor->GrayLevel[0]], "\n", "\t\t", "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{\(\(diffeqcc00[jj]\)[3]\), "=", RowBox[{"Table", "[", "\t", "\n", "\t\t\t\t", RowBox[{ RowBox[{\(\(\(c[jj]\)[3, j]'\)[v]\), "==", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"a", "[", RowBox[{"2", ",", StyleBox["i", FontColor->RGBColor[0, 0, 1]]}], "]"}], "/.", \(u -> uuu[jj]\)}], ")"}], "*", RowBox[{ RowBox[{\(c[jj]\), "[", RowBox[{ StyleBox["i", FontColor->RGBColor[0, 0, 1]], ",", StyleBox["j", FontColor->RGBColor[1, 0, 0]]}], "]"}], "[", "v", "]"}]}], ",", "\n", "\t\t\t\t\t", RowBox[{"{", RowBox[{ StyleBox["i", FontColor->RGBColor[0, 0, 1]], ",", "1", ",", "2"}], "}"}]}], "]"}]}], ",", \({j, 1, 3}\)}], "]"}]}], ",", \({jj, \(-mm\), mm}\)}], "]"}], ";", "\n", "\t\t", "\n", \(Do[iniconcc[jj] = Join[\n\t\t\t\t\t Table[\(\(c[jj]\)[1, j]\)[0] == \((bb[1, j] /. u -> uuu[jj])\), {j, 1, 3}], \n\t\t\t\t\t Table[\(\(c[jj]\)[2, j]\)[0] == \((bb[2, j] /. u -> uuu[jj])\), {j, 1, 3}], \n\t\t\t\t\t Table[\(\(c[jj]\)[3, j]\)[0] == \((bb[3, j] /. u -> uuu[jj])\), {j, 1, 3}]], \n \t\t\t{jj, \(-mm\), mm}]\), ";", StyleBox["\n", FontColor->GrayLevel[0]], StyleBox["\t", FontColor->GrayLevel[0]], "\n", \(Do[\t\tdiffeqcc[jj] = Join[\(diffeqcc00[jj]\)[1], \(diffeqcc00[jj]\)[2], \(diffeqcc00[jj]\)[3], iniconcc[jj]], {jj, \(-mm\), mm}]\), ";", "\t", "\n", "\t\t", "\n", \(Do[unkcc[jj] = Join[\n\t\t\t\t\tTable[\(\(c[jj]\)[1, j]\)[v], {j, 1, 3}], \n \t\t\t\t\tTable[\(\(c[jj]\)[2, j]\)[v], {j, 1, 3}], \n \t\t\t\t\tTable[\(\(c[jj]\)[3, j]\)[v], {j, 1, 3}]], {jj, \(-mm\), mm}]\), ";", "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{\(sollistcc[jj]\), "=", RowBox[{ StyleBox["NDSolve", FontColor->RGBColor[1, 0, 0]], "[", RowBox[{\(diffeqcc[jj]\), ",", \(unkcc[jj]\), ",", "\n", StyleBox[ RowBox[{"\t\t\t", StyleBox["\t", FontColor->GrayLevel[0]]}]], \({v, \(-del22\), del22}\)}], "]"}]}], ",", \({jj, \(-mm\), mm}\)}], "]"}], ";", "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ StyleBox["cc", FontColor->RGBColor[0, 0, 1]], "[", "jj", "]"}], "[", \(i, j\), "]"}], "=", \(\(\(c[jj]\)[i, j]\)[v] /. \(sollistcc[jj]\)[\([1]\)]\)}], ",", \({i, 1, 3}\), ",", \({j, 1, 3}\)}], "]"}], ",", \({jj, \(-mm\), mm}\)}], "]"}], ";", "\n", "\t\t", "\n", "\t", StyleBox[\( (*\ differential\ equations\ for\ xx)*) \), FontColor->RGBColor[1, 0, 0]], "\t\t\t\t\t", "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{ StyleBox[\(p[ii]\), FontColor->RGBColor[0, 0, 1]], "=", \(pp00[\([ii]\)]\)}], ",", \({ii, 1, 3}\)}], "]"}], ";", "\n", "\t\t", "\n", \(Do[xxx[i, j] = \t Table[NIntegrate[bb[1, ii], {u, 0, uuu[i]}, AccuracyGoal -> 6] + \n\ \ \ \ \ \ \ \ \ \ \ NIntegrate[\(cc[i]\)[2, ii], {v, 0, vvv[j]}, AccuracyGoal -> 6]\ + p[ii], {ii, 1, 3}], {i, \(-mm\), mm}, {j, \(-nn\), nn}]\), ";", "\n", "\t\t", "\n", RowBox[{ StyleBox["(*", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[1, 0, 0]], StyleBox[\(Plotting\ xx\), FontColor->RGBColor[1, 0, 0]], " ", StyleBox["*)", FontColor->RGBColor[1, 0, 0]]}], "\t\t", "\n", "\t\t\t\t\t", \(Do[face[i, \ j]\ = \ \n\ \ \ \ \ Graphics3D[ Polygon[{xxx[i, j], xxx[i + 1, j], xxx[i + 1, j + 1], xxx[i, j + 1], xxx[i, j]}]], \ {i, \(-mm\), mm - 1}, \ {j, \(-nn\), nn - 1}]\), ";", " ", "\n", \(Show[Table[face[i, \ j], \ {i, \(-mm\), mm - 1}, \ {j, \(-nn\), nn - 1}], opts]\)}], " ", "}"}]}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Example 1", "Subsection", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(ggsphr = {{Cos[v]\^2, 0}, {0, 1}}; \n hhsphr = {{\(-Cos[v]\^2\), 0}, {0, \(-1\)}}; \npp00sphr = {1, 0, 0}; \n sphruu = {0, 1, 0}; \nsphrvv = {0, 0, 1}; \ndir11sphr = {0, 1, 0}; \n dir22sphr = {0, 0, 1}; \nnormluvsphr = {1, 0, 0}; \ndel11sphr = Pi; \n del22sphr = Pi/2; \)], "Input"], Cell[BoxData[ RowBox[{"Timing", "[", "\n", "\t", RowBox[{ StyleBox["numplotfundsol", FontColor->RGBColor[1, 0, 0]], "[", \(ggsphr, hhsphr, pp00sphr, dir11sphr, dir22sphr, Pi, Pi/2, 16, 8, Axes -> True\), "]"}], " ", "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Example 2", "Subsection", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(ggcatnd = {{1, 0}, {0, 9 + u\^2}}; \n hhcatnd = {{\(-\(3\/\(9 + u\^2\)\)\), 0}, {0, 3}}; \n pp00catnd = {3, 0, 0}; \ncatnduu = {0, 0, 1}; \ncatndvv = {0, 3, 0}; \n normluvcatnd = {\(-1\), 0, 0}; \ndir11catnd = {0, 0, 1}; \n dir22catnd = {0, 1, 0}; \ndel11catnd = 4; \ndel22catnd = Pi; \)], "Input"], Cell["{tanuu,tanvv}", "Input"], Cell[BoxData[ RowBox[{"Timing", "[", "\n", "\t", RowBox[{ RowBox[{ StyleBox["numplotfundsol", FontColor->RGBColor[1, 0, 0]], "[", \(ggcatnd, hhcatnd, pp00catnd, dir11catnd, dir22catnd, 4, Pi, 8, 16, Axes -> True\), "]"}], " ", ";"}], " ", "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Example 3", "Subsection", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(\(ggtors = {{1, 0}, {0, \((2 + Cos[u])\)\^2}}; \n hhtors = {{1, 0}, {0, Cos[u]\ \((2 + Cos[u])\)}}; \npp00tors = {3, 0, 0}; \ntorsuu = {0, 0, 1}; \ntorsvv = {0, 3, 0}; \ndir11tors = {0, 0, 1}; \n dir22tors = {0, 1, 0}; \nnormluvtors = {\(-1\), 0, 0}; \ndel11tors = Pi; \ndel22tors = Pi; \n\)\)], "Input"], Cell[BoxData[ RowBox[{"Timing", "[", "\n", "\t", RowBox[{ RowBox[{ StyleBox["numplotfundsol", FontColor->RGBColor[1, 0, 0]], "[", \(ggtors, hhtors, pp00tors, dir11tors, dir22tors, Pi, Pi, 8, 16, Axes -> True\), "]"}], " ", ";"}], " ", "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Example 4", "Subsection", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(ggenpr = {{9 \((1 + u^2 + v^2)\)^2, 0}, {0, 9 \((1 + u^2 + v^2)\)^2}}; \nhhenpr = {{\(-6\), 0}, {0, 6}}; \npp00enpr = {0, 0, 0}; \n enpruu = {3, 0, 0}; \nenprvv = {0, \(-3\), 0}; \n normluvenpr = {0, 0, \(-1\)}; \ndir11enpr = {1, 0, 0}; \n dir22enpr = {0, \(-1\), 0}; \ndel11enpr = 2.5; \ndel22enpr = 2.7; \)], "Input"], Cell[BoxData[ RowBox[{"Timing", "[", "\n", "\t", RowBox[{ RowBox[{ StyleBox["numplotfundsol", FontColor->RGBColor[1, 0, 0]], "[", RowBox[{ "ggenpr", ",", "hhenpr", ",", "pp00enpr", ",", "dir11enpr", ",", "dir22enpr", ",", "2.5", ",", "2.7", ",", "16", ",", "16", StyleBox[",", AspectRatioFixed->True], StyleBox[\(ViewPoint -> {0.6, 4, 0.8}\), AspectRatioFixed->True], StyleBox[",", AspectRatioFixed->True], StyleBox["\n", AspectRatioFixed->True], StyleBox[" ", AspectRatioFixed->True], StyleBox[\(Boxed -> False\), AspectRatioFixed->True]}], "]"}], " ", ";"}], " ", "]"}]], "Input"] }, Closed]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 832}, {0, 604}}, CellGrouping->Manual, WindowSize->{521, 507}, WindowMargins->{{25, Automatic}, {Automatic, 0}}, MacintoshSystemPageSetup->"\<\ 00l0001804P000000bP2 oj/@=P]50201000000000000000001T1\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1709, 49, 146, 4, 29, "Text"], Cell[1858, 55, 107, 1, 50, "Section"], Cell[CellGroupData[{ Cell[1990, 60, 117, 3, 50, "Section"], Cell[CellGroupData[{ Cell[2132, 67, 75, 1, 42, "Subsubsection"], Cell[2210, 70, 4402, 92, 507, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[6649, 167, 78, 1, 28, "Subsubsection"], Cell[6730, 170, 6149, 124, 811, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[12916, 299, 107, 3, 30, "Section"], Cell[13026, 304, 313, 9, 43, "Input"], Cell[13342, 315, 59, 1, 27, "Input"], Cell[13404, 318, 134, 3, 27, "Input"], Cell[13541, 323, 174, 3, 43, "Input"], Cell[13718, 328, 59, 1, 27, "Input"], Cell[13780, 331, 111, 2, 27, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[13940, 339, 112, 3, 30, "Section"], Cell[14055, 344, 22313, 465, 1419, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[36405, 814, 63, 1, 30, "Subsection"], Cell[36471, 817, 318, 5, 180, "Input"], Cell[36792, 824, 279, 6, 59, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[37108, 835, 63, 1, 30, "Subsection"], Cell[37174, 838, 334, 5, 194, "Input"], Cell[37511, 845, 30, 0, 27, "Input"], Cell[37544, 847, 319, 7, 59, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[37900, 859, 63, 1, 30, "Subsection"], Cell[37966, 862, 342, 5, 192, "Input"], Cell[38311, 869, 313, 7, 59, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[38661, 881, 63, 1, 30, "Subsection"], Cell[38727, 884, 359, 6, 187, "Input"], Cell[39089, 892, 825, 21, 91, "Input"] }, Closed]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)