From cf9896be11ad772689f15c2b7c9f6dd97aa64fb8 Mon Sep 17 00:00:00 2001 From: utensil Date: Thu, 28 May 2020 10:25:10 +0800 Subject: [PATCH] Add section titles to curvi_linear_latex.py --- examples/LaTeX/curvi_linear_latex.py | 6 ++++++ examples/ipython/LaTeX.ipynb | 2 ++ 2 files changed, 8 insertions(+) diff --git a/examples/LaTeX/curvi_linear_latex.py b/examples/LaTeX/curvi_linear_latex.py index 21df6d04..282cb44c 100644 --- a/examples/LaTeX/curvi_linear_latex.py +++ b/examples/LaTeX/curvi_linear_latex.py @@ -15,6 +15,8 @@ def derivatives_in_spherical_coordinates(): A = sp3d.mv('A','vector',f=True) B = sp3d.mv('B','bivector',f=True) + print('#Derivatives in Spherical Coordinates') + print('f =',f) print('A =',A) print('B =',B) @@ -69,6 +71,8 @@ def derivatives_in_elliptic_cylindrical_coordinates(): A = elip3d.mv('A','vector',f=True) B = elip3d.mv('B','bivector',f=True) + print('#Derivatives in Elliptic Cylindrical Coordinates') + print('f =',f) print('A =',A) print('B =',B) @@ -92,6 +96,8 @@ def derivatives_in_prolate_spheroidal_coordinates(): A = ps3d.mv('A','vector',f=True) B = ps3d.mv('B','bivector',f=True) + print('#Derivatives in Prolate Spheroidal Coordinates') + print('f =',f) print('A =',A) print('B =',B) diff --git a/examples/ipython/LaTeX.ipynb b/examples/ipython/LaTeX.ipynb index 10b7f7f0..2310a144 100644 --- a/examples/ipython/LaTeX.ipynb +++ b/examples/ipython/LaTeX.ipynb @@ -143,6 +143,7 @@ "\\lstloadlanguages{Python}\n", "\n", "\\begin{document}\n", + "Derivatives in Spherical Coordinates\n", "\\begin{equation*} f = f \\end{equation*}\n", "\\begin{equation*} A = A^{r} \\boldsymbol{e}_{r} + A^{\\theta } \\boldsymbol{e}_{\\theta } + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{equation*}\n", "\\begin{equation*} B = B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n", @@ -158,6 +159,7 @@ "\\begin{equation*} \\boldsymbol{\\nabla} f = \\frac{\\partial_{u} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{u} + \\frac{\\partial_{v} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{v} + \\frac{\\partial_{\\phi } f }{u v} \\boldsymbol{e}_{\\phi } \\end{equation*}\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{u A^{u} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{v A^{v} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{\\partial_{u} A^{u} }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{v} A^{v} }{\\sqrt{u^{2} + v^{2}}} + \\frac{A^{v} }{v \\sqrt{u^{2} + v^{2}}} + \\frac{A^{u} }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } A^{\\phi } }{u v} \\end{equation*}\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\frac{u B^{v\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{v B^{u\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{\\partial_{v} B^{u\\phi } }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{u} B^{v\\phi } }{\\sqrt{u^{2} + v^{2}}} - \\frac{B^{u\\phi } }{v \\sqrt{u^{2} + v^{2}}} + \\frac{B^{v\\phi } }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } B^{uv} }{u v}\\right ) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v}\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n", + "Derivatives in Prolate Spheroidal Coordinates\n", "\\begin{equation*} f = f \\end{equation*}\n", "\\begin{equation*} A = A^{\\xi } \\boldsymbol{e}_{\\xi } + A^{\\eta } \\boldsymbol{e}_{\\eta } + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{equation*}\n", "\\begin{equation*} B = B^{\\xi \\eta } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\eta } + B^{\\xi \\phi } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\phi } + B^{\\eta \\phi } \\boldsymbol{e}_{\\eta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",