Skip to content

Commit 24c108c

Browse files
committed
Implement github links
1 parent ded6209 commit 24c108c

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

fdm-devito-notebooks/01_vib/vib_undamped.ipynb

+14-14
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@
667667
"with the aid of a calculator\n",
668668
"and make a function for comparing these results with those from the `solver`\n",
669669
"function. The `test_three_steps` function in\n",
670-
"the file [`vib_undamped.py`](${src_vib}/vib_undamped.py)\n",
670+
"the file [`vib_undamped.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped.py)\n",
671671
"shows the details of how we use the hand calculations to test the code:"
672672
]
673673
},
@@ -908,15 +908,15 @@
908908
"cell_type": "markdown",
909909
"metadata": {},
910910
"source": [
911-
"The complete code appears in the file [`vib_undamped.py`](src-vib/vib_undamped.py).\n",
911+
"The complete code appears in the file [`vib_undamped.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped.py).\n",
912912
"\n",
913913
"\n",
914914
"### Visualizing convergence rates with slope markers\n",
915915
"\n",
916916
"Tony S. Yu has written a script [`plotslopes.py`](http://goo.gl/A4Utm7)\n",
917917
"that is very useful to indicate the slope of a graph, especially\n",
918918
"a graph like $\\ln E = r\\ln \\Delta t + \\ln C$ arising from the model\n",
919-
"$E=C\\Delta t^r$. A copy of the script resides in the [`src-vib`](src-vib)\n",
919+
"$E=C\\Delta t^r$. A copy of the script resides in the [`src-vib`](https://github.com/devitocodes/devito_book/tree/master/fdm-devito-notebooks/01_vib/src-vib)\n",
920920
"directory. Let us use it to compare the original method for $u'' + \\omega^2u =0$\n",
921921
"with the same method applied to the equation with a modified\n",
922922
"$\\omega$. We make log-log plots of the error versus $\\Delta t$.\n",
@@ -1951,7 +1951,7 @@
19511951
"cell_type": "markdown",
19521952
"metadata": {},
19531953
"source": [
1954-
"The code segments are found in the file [`vib_empirical_analysis.py`](src-vib/vib_empirical_analysis.py).\n",
1954+
"The code segments are found in the file [`vib_empirical_analysis.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_empirical_analysis.py).\n",
19551955
"\n",
19561956
"Since `a[i]` and `p[i]` correspond to\n",
19571957
"the $i$-th amplitude estimate and the $i$-th period estimate, respectively,\n",
@@ -2367,7 +2367,7 @@
23672367
"[Figure](#vib:ode1:tildeomega:plot) plots the discrete frequency\n",
23682368
"([18](#vib:ode1:tildeomega)) and its approximation\n",
23692369
"([19](#vib:ode1:tildeomega:series)) for $\\omega =1$ (based on the\n",
2370-
"program [`vib_plot_freq.py`](src-vib/vib_plot_freq.py)).\n",
2370+
"program [`vib_plot_freq.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_plot_freq.py)).\n",
23712371
"Although $\\tilde\\omega$ is a function of $\\Delta t$ in\n",
23722372
"([19](#vib:ode1:tildeomega:series)), it is misleading to think of\n",
23732373
"$\\Delta t$ as the important discretization parameter. mathcal{I}_t is the\n",
@@ -3549,7 +3549,7 @@
35493549
"metadata": {},
35503550
"source": [
35513551
"There is quite some more code dealing with plots also, and we refer\n",
3552-
"to the source file [`vib_undamped_odespy.py`](src-vib/vib_undamped_odespy.py)\n",
3552+
"to the source file [`vib_undamped_odespy.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_odespy.py)\n",
35533553
"for details. Observe that keyword arguments in `f(u,t,w=1)` can\n",
35543554
"be supplied through a solver parameter `f_kwargs` (dictionary of\n",
35553555
"additional keyword arguments to `f`).\n",
@@ -4338,7 +4338,7 @@
43384338
"verification. The value of `e_E_norm` is also useful for comparing\n",
43394339
"schemes through their ability to preserve energy. Below is a table\n",
43404340
"demonstrating the relative error in total energy for various schemes\n",
4341-
"(computed by the [`vib_undamped_odespy.py`](src-vib/vib_undamped_odespy.py) program). The test problem is\n",
4341+
"(computed by the [`vib_undamped_odespy.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_odespy.py) program). The test problem is\n",
43424342
"$u^{\\prime\\prime} + 4\\pi^2 u =0$ with $u(0)=1$ and $u'(0)=0$, so the\n",
43434343
"period is 1 and $E(t)\\approx 4.93$. We clearly see that the\n",
43444344
"Crank-Nicolson and the Runge-Kutta schemes are superior to the Forward\n",
@@ -4802,7 +4802,7 @@
48024802
"\n",
48034803
"### Solver function\n",
48044804
"\n",
4805-
"The function below, found in [`vib_undamped_EulerCromer.py`](src-vib/vib_undamped_EulerCromer.py), implements the Euler-Cromer scheme\n",
4805+
"The function below, found in [`vib_undamped_EulerCromer.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_EulerCromer.py), implements the Euler-Cromer scheme\n",
48064806
"([54](#vib:model2x2:EulerCromer:veq1b))-([55](#vib:model2x2:EulerCromer:ueq1b)):"
48074807
]
48084808
},
@@ -4914,7 +4914,7 @@
49144914
"To verify the implementation of the Euler-Cromer method we can adjust\n",
49154915
"`v[1]` so that the computer-generated values can be compared with the\n",
49164916
"formula ([20](#vib:ode1:un:exact)) from in the section [Exact discrete solution](#vib:ode1:analysis:sol). This adjustment is done in an alternative\n",
4917-
"solver function, `solver_ic_fix` in [`vib_undamped_EulerCromer.py`](src-vib/vib_undamped_EulerCromer.py). Since we now\n",
4917+
"solver function, `solver_ic_fix` in [`vib_undamped_EulerCromer.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_EulerCromer.py). Since we now\n",
49184918
"have an exact solution of the discrete equations available, we can\n",
49194919
"write a test function `test_solver` for checking the equality of\n",
49204920
"computed values with the formula ([20](#vib:ode1:un:exact)):"
@@ -4958,9 +4958,9 @@
49584958
"### Convergence rates\n",
49594959
"\n",
49604960
"We may use the `convergence_rates` function in the file\n",
4961-
"[`vib_undamped.py`](src-vib/vib_undamped.py) to investigate the convergence rate of the\n",
4961+
"[`vib_undamped.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped.py) to investigate the convergence rate of the\n",
49624962
"Euler-Cromer method, see the `convergence_rate` function in the file\n",
4963-
"[`vib_undamped_EulerCromer.py`](src-vib/vib_undamped_EulerCromer.py). Since we could eliminate $v$ to get a\n",
4963+
"[`vib_undamped_EulerCromer.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_EulerCromer.py). Since we could eliminate $v$ to get a\n",
49644964
"scheme for $u$ that is equivalent to the finite difference method for\n",
49654965
"the second-order equation in $u$, we would expect the convergence\n",
49664966
"rates to be the same, i.e., $r = 2$. However,\n",
@@ -5585,7 +5585,7 @@
55855585
"`vib_undamped.py` (which solves $u''+\\omega^2u=0$ directly). The\n",
55865586
"values should coincide to machine precision since the two numerical\n",
55875587
"methods are mathematically equivalent. We refer to the file\n",
5588-
"[`vib_undamped_staggered.py`](src-vib/vib_undamped_staggered.py)\n",
5588+
"[`vib_undamped_staggered.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib_undamped_staggered.py)\n",
55895589
"for the details of a unit test (`test_staggered`) that checks this property.\n",
55905590
"\n",
55915591
"# Exercises and Problems\n",
@@ -8410,7 +8410,7 @@
84108410
"## Problem 15: Minimize memory usage of a general vibration solver\n",
84118411
"<div id=\"vib:exer:memsave\"></div>\n",
84128412
"\n",
8413-
"The program [`vib.py`](${src_vib}/vib.py) stores the complete\n",
8413+
"The program [`vib.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/01_vib/src-vib/vib.py) stores the complete\n",
84148414
"solution $u^0,u^1,\\ldots,u^{N_t}$ in memory, which is convenient for\n",
84158415
"later plotting. Make a memory minimizing version of this program\n",
84168416
"where only the last three $u^{n+1}$, $u^n$, and $u^{n-1}$ values are\n",
@@ -9049,7 +9049,7 @@
90499049
"name": "python",
90509050
"nbconvert_exporter": "python",
90519051
"pygments_lexer": "ipython3",
9052-
"version": "3.8.3"
9052+
"version": "3.8.2"
90539053
}
90549054
},
90559055
"nbformat": 4,

fdm-devito-notebooks/02_wave/wave1D_prog.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
"cell_type": "markdown",
309309
"metadata": {},
310310
"source": [
311-
"When this function resides in the file [`wave1D_u0.py`](src-wave/wave1D/wave1D_u0.py), one can run\n",
311+
"When this function resides in the file [`wave1D_u0.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/02_wave/src-wave/wave1D/wave1D_u0.py), one can run\n",
312312
"pytest to check that all test functions with names `test_*()`\n",
313313
"in this file work:"
314314
]
@@ -718,7 +718,7 @@
718718
"`n` can be divided by 13 without a remainder. That is, the `if` test\n",
719719
"is true when `n` equals $0, 13, 26, 39, ..., 780, 801$. The associated\n",
720720
"code is included in the `plot_u` function, inside the `viz` function,\n",
721-
"in the file [`wave1D_u0.py`](src-wave/wave1D/wave1D_u0.py).\n",
721+
"in the file [`wave1D_u0.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/02_wave/src-wave/wave1D/wave1D_u0.py).\n",
722722
"\n",
723723
"## Running a case\n",
724724
"<div id=\"wave:pde1:guitar:data\"></div>\n",
@@ -806,7 +806,7 @@
806806
"cell_type": "markdown",
807807
"metadata": {},
808808
"source": [
809-
"The associated program has the name [`wave1D_u0.py`](src-wave/wave1D/wave1D_u0.py). Run\n",
809+
"The associated program has the name [`wave1D_u0.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/02_wave/src-wave/wave1D/wave1D_u0.py). Run\n",
810810
"the program and watch the [movie of the vibrating string](mov-wave/guitar_C0.8/movie.html).\n",
811811
"The string should ideally consist of straight segments, but these are\n",
812812
"somewhat wavy due to numerical approximation. Run the case with the\n",
@@ -2586,9 +2586,9 @@
25862586
"name": "python",
25872587
"nbconvert_exporter": "python",
25882588
"pygments_lexer": "ipython3",
2589-
"version": "3.8.3"
2589+
"version": "3.8.2"
25902590
}
25912591
},
25922592
"nbformat": 4,
25932593
"nbformat_minor": 4
2594-
}
2594+
}

fdm-devito-notebooks/03_diffu/diffu_rw.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@
825825
"run, and it can be very difficult to spot bugs through averaged statistical\n",
826826
"quantities.\n",
827827
"\n",
828-
"A full test suite for this notebook, along with the rest of the functions for random walks, can be found in [`random_walk.py`](src-diffu/random_walk.py).\n",
828+
"A full test suite for this notebook, along with the rest of the functions for random walks, can be found in [`random_walk.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/03_diffu/src-diffu/random_walk.py).\n",
829829
"\n",
830830
"## Demonstration of multiple walks\n",
831831
"\n",
@@ -1315,7 +1315,7 @@
13151315
"name": "python",
13161316
"nbconvert_exporter": "python",
13171317
"pygments_lexer": "ipython3",
1318-
"version": "3.8.3"
1318+
"version": "3.8.2"
13191319
}
13201320
},
13211321
"nbformat": 4,

fdm-devito-notebooks/04_advec/advec.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
"source": [
671671
"A special scheme is needed to compute $u^1$, but we leave that problem for\n",
672672
"now. Anyway, this special scheme can be found in \n",
673-
"[`advec1D.py`](src-advec/advec1D.py).\n",
673+
"[`advec1D.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/04_advec/src-advec/advec1D.py).\n",
674674
"\n",
675675
"### Implementation\n",
676676
"\n",
@@ -1405,7 +1405,7 @@
14051405
"metadata": {},
14061406
"source": [
14071407
"The complete code is found in the file\n",
1408-
"[`advec1D.py`](src-advec/advec1D.py).\n",
1408+
"[`advec1D.py`](https://github.com/devitocodes/devito_book/blob/master/fdm-devito-notebooks/04_advec/src-advec/advec1D.py).\n",
14091409
"\n",
14101410
"## A Crank-Nicolson discretization in time and centered differences in space\n",
14111411
"<div id=\"advec:1D:CN\"></div>\n",

0 commit comments

Comments
 (0)