Skip to content

Commit edaf4e9

Browse files
author
sveinlin
committed
fixed some refs to sections in decay and scaling books
1 parent ef928d2 commit edaf4e9

36 files changed

Lines changed: 146 additions & 248 deletions

doc/.src/chapters/vib/vib_undamped.do.txt

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ in electrical circuits.
8787
label{vib:ode1:fdm}
8888

8989
To formulate a finite difference method for the model
90-
problem (ref{vib:ode1}) we follow the ref[four steps explained in Section
91-
ref{decay:schemes:FE}][ in cite{Langtangen_decay}]["four steps": "${doc_notes}/sphinx-decay/main_decay.html#the-forward-euler-scheme" explained in cite{Langtangen_decay}].
90+
problem (ref{vib:ode1}), we follow the four steps explained in Section 1.1.2
91+
in cite{Langtangen_decay}.
9292

9393
idx{mesh!finite differences} idx{mesh function} idx{discretization of domain}
9494

@@ -246,8 +246,7 @@ We may write the scheme using a compact difference notation
246246
% if BOOK == "book":
247247
listed in Appendix ref{sec:form:fdop}
248248
% endif
249-
(see also ref[Section ref{decay:fd:op}][ in cite{Langtangen_decay}][
250-
"examples": "${doc_notes}/sphinx-decay/main_decay.html#compact-operator-notation-for-finite-differences" in cite{Langtangen_decay}]).
249+
(see also Section 1.1.8 in cite{Langtangen_decay}).
251250
The difference (ref{vib:ode1:step3}) has the operator
252251
notation $[D_tD_t u]^n$ such that we can write:
253252

@@ -309,10 +308,8 @@ computing community and a good programming habit (since we explicitly
309308
see where the different functions come from). An alternative is to do
310309
`from numpy import *` and a similar ``import all'' for Matplotlib to
311310
avoid the `np` and `plt` prefixes and make the code as close as
312-
possible to MATLAB. (See ref[Section ref{softeng1:basic:modprefix}][ in
313-
cite{Langtangen_decay}][the section
314-
"Prefixing imported functions by the module name": "http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book009.html#softeng1:basic:modprefix" in the book
315-
"Finite Difference Computing with Exponential Decay Models": "http://tinyurl.com/nclmcng/web" cite{Langtangen_decay}] for a discussion of the two
311+
possible to MATLAB. (See Section 5.1.4 in
312+
cite{Langtangen_decay} for a discussion of the two
316313
types of import in Python.)
317314

318315
A function for plotting the numerical and the exact solution is also
@@ -348,9 +345,8 @@ parser.add_argument('--num_periods', type=int, default=5)
348345
a = parser.parse_args()
349346
I, w, dt, num_periods = a.I, a.w, a.dt, a.num_periods
350347
!ec
351-
Such parsing of the command line is explained in more detail in
352-
ref[Section ref{softeng1:basic:UI:options_cml}][ in cite{Langtangen_decay}][ the
353-
section "Option-value pairs on the command line": "${decay_book_url}/html/._decay-book009.html#softeng1:basic:UI:options_cml" in "Finite Difference Computing with Exponential Decay Models": "http://tinyurl.com/nclmcng/web" cite{Langtangen_decay}].
348+
Such parsing of the command line is explained in more detail in Section 5.2.3 in
349+
cite{Langtangen_decay}.
354350

355351
A typical execution goes like
356352

@@ -394,12 +390,7 @@ v[-1] = (u[-1] - u[-2])/dt
394390
!ec
395391
Since the loop is slow for large $N_t$, we can get rid of the loop by
396392
vectorizing the central difference. The above code segment goes as
397-
follows in its vectorized version (see ref[Problem
398-
ref{decay:exer:dudt}][ in cite{Langtangen_decay}][the problem
399-
"Differentiate a function":
400-
"${decay_book_url}/html/._decay-book005.html#decay:exer:dudt" in "Finite
401-
Difference Computing with Exponential Decay Models":
402-
"http://tinyurl.com/nclmcng/web" cite{Langtangen_decay}] for
393+
follows in its vectorized version (see Problem 1.2 in cite{Langtangen_decay} for
403394
explanation of details):
404395

405396
!bc pycod
@@ -443,9 +434,7 @@ framework for Python code, because
443434
We shall in this book implement all software verification via such
444435
proper test functions, also known as unit testing.
445436
% endif
446-
See ref[Section ref{softeng1:verify:pytest}][ in cite{Langtangen_decay}][the
447-
section "Unit tests and test functions": "${decay_book_url}/html/._decay-book009.html#softeng1:verify:pytest" in
448-
"Finite Difference Computing with Exponential Decay Models": "http://tinyurl.com/nclmcng/web" cite{Langtangen_decay}]
437+
See Section 5.3.2 in cite{Langtangen_decay}
449438
for more details on how to construct test functions and utilize nose
450439
or pytest for automatic execution of tests. Our recommendation is to
451440
use pytest. With this choice, you can
@@ -490,12 +479,7 @@ idx{error norm}
490479

491480
Empirical computation of convergence rates yields a good method for
492481
verification. The method and its computational details are explained
493-
in detail ref[in Section ref{decay:convergence:rate}][ in
494-
cite{Langtangen_decay}][for a simple ODE model in the section
495-
"Computing convergence rates":
496-
"${decay_book_url}/html/._decay-book007.html#decay:convergence:rate"
497-
in "Finite Difference Computing with Exponential Decay Models":
498-
"http://tinyurl.com/nclmcng/web" cite{Langtangen_decay}]. Readers not
482+
in detail in Section 3.1.6 in cite{Langtangen_decay}. Readers not
499483
familiar with the concept should look up this reference before
500484
proceeding.
501485

@@ -585,13 +569,8 @@ It is advantageous to use dimensionless variables in simulations,
585569
because fewer parameters need to be set. The present problem is made
586570
dimensionless by introducing dimensionless variables $\bar t = t/t_c$
587571
and $\bar u = u/u_c$, where $t_c$ and $u_c$ are characteristic scales
588-
for $t$ and $u$, respectively. We refer to ref[Section
589-
ref{sec:scale:vib:undamped}][ in cite{Langtangen_scaling}][the section
590-
"Undamped vibrations without forcing":
591-
"http://hplgit.github.io/scaling-book/doc/pub/book/html/._scaling-book006.html#sec:scale:vib:undamped"
592-
in the book "Scaling of differential equations":
593-
"http://tinyurl.com/qfjgxmf/web" cite{Langtangen_scaling}] for all
594-
details about this scaling.
572+
for $t$ and $u$, respectively. We refer to Section 2.2.1 in
573+
cite{Langtangen_scaling} for all details about this scaling.
595574

596575
The scaled ODE problem reads
597576

@@ -3296,10 +3275,8 @@ file=vib_undamped_adaptive
32963275
Adaptive methods for solving ODEs aim at adjusting $\Delta t$ such
32973276
that the error is within a user-prescribed tolerance. Implement the
32983277
equation $u^{\prime\prime}+u=0$ in the "Odespy": "https://github.com/hplgit/odespy"
3299-
software. Use the example ref[from Section
3300-
ref{decay:fd2:adaptiveRK}][ in cite{Langtangen_decay}]["on adaptive
3301-
schemes": "${decay_book}/._book006.html#example-adaptive-runge-kutta-methods"
3302-
in cite{Langtangen_decay}]. Run the scheme with a very low
3278+
software. Use the example from Section 3.2.11 in cite{Langtangen_decay}.
3279+
Run the scheme with a very low
33033280
tolerance (say $10^{-14}$) and for a long time, check the number of
33043281
time points in the solver's mesh (`len(solver.t_all)`), and compare
33053282
the phase error with that produced by the simple finite difference

doc/Trash/vib/html/._vib-sol000.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@
662662
<center>[3] <b>Department of Process, Energy and Environmental Technology, University College of Southeast Norway</b></center>
663663
<br>
664664
<p>
665-
<center><h4>Dec 23, 2016</h4></center> <!-- date -->
665+
<center><h4>Jan 21, 2017</h4></center> <!-- date -->
666666
<br>
667667
<p>
668668
<!-- Externaldocuments: ../../../../../decay-book/doc/.src/book/book -->
@@ -700,7 +700,7 @@
700700

701701

702702
<center style="font-size:80%">
703-
<!-- copyright --> &copy; 2016, Hans Petter Langtangen, Svein Linge. Released under CC Attribution 4.0 license
703+
<!-- copyright --> &copy; 2017, Hans Petter Langtangen, Svein Linge. Released under CC Attribution 4.0 license
704704
</center>
705705

706706

doc/Trash/vib/html/._vib-sol002.html

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,8 @@ <h2 id="vib:ode1:fdm">A centered finite difference scheme</h2>
722722

723723
<p>
724724
To formulate a finite difference method for the model
725-
problem <a href="#mjx-eqn-1">(1)</a> we follow the <a href="http://tinyurl.com/pu5uyfn/pub/sphinx-decay/main_decay.html#the-forward-euler-scheme" target="_self">four steps</a> explained in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>.
725+
problem <a href="#mjx-eqn-1">(1)</a>, we follow the four steps explained in Section 1.1.2
726+
in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>.
726727

727728
<h3 id="___sec3">Step 1: Discretizing the domain </h3>
728729

@@ -880,8 +881,7 @@ <h3 id="___sec9">Operator notation </h3>
880881

881882
<p>
882883
We may write the scheme using a compact difference notation
883-
(see also
884-
<a href="http://tinyurl.com/pu5uyfn/pub/sphinx-decay/main_decay.html#compact-operator-notation-for-finite-differences" target="_self">examples</a> in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>).
884+
(see also Section 1.1.8 in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>).
885885
The difference <a href="#mjx-eqn-4">(4)</a> has the operator
886886
notation \( [D_tD_t u]^n \) such that we can write:
887887

@@ -963,9 +963,8 @@ <h2 id="vib:impl1:solver">Making a solver function</h2>
963963
see where the different functions come from). An alternative is to do
964964
<code>from numpy import *</code> and a similar &quot;import all&quot; for Matplotlib to
965965
avoid the <code>np</code> and <code>plt</code> prefixes and make the code as close as
966-
possible to MATLAB. (See the section
967-
<a href="http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book009.html#softeng1:basic:modprefix" target="_self">Prefixing imported functions by the module name</a> in the book
968-
<a href="http://tinyurl.com/nclmcng/web" target="_self">Finite Difference Computing with Exponential Decay Models</a> <a href="._vib-sol003.html#Langtangen_decay">[1]</a> for a discussion of the two
966+
possible to MATLAB. (See Section 5.1.4 in
967+
<a href="._vib-sol003.html#Langtangen_decay">[1]</a> for a discussion of the two
969968
types of import in Python.)
970969

971970
<p>
@@ -1028,9 +1027,8 @@ <h2 id="vib:impl1:solver">Making a solver function</h2>
10281027
I, w, dt, num_periods <span style="color: #666666">=</span> a<span style="color: #666666">.</span>I, a<span style="color: #666666">.</span>w, a<span style="color: #666666">.</span>dt, a<span style="color: #666666">.</span>num_periods
10291028
</pre></div>
10301029
<p>
1031-
Such parsing of the command line is explained in more detail in
1032-
the
1033-
section <a href="http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book009.html#softeng1:basic:UI:options_cml" target="_self">Option-value pairs on the command line</a> in <a href="http://tinyurl.com/nclmcng/web" target="_self">Finite Difference Computing with Exponential Decay Models</a> <a href="._vib-sol003.html#Langtangen_decay">[1]</a>.
1030+
Such parsing of the command line is explained in more detail in Section 5.2.3 in
1031+
<a href="._vib-sol003.html#Langtangen_decay">[1]</a>.
10341032

10351033
<p>
10361034
A typical execution goes like
@@ -1080,9 +1078,7 @@ <h3 id="___sec12">Computing \( u^{\prime} \) </h3>
10801078
<p>
10811079
Since the loop is slow for large \( N_t \), we can get rid of the loop by
10821080
vectorizing the central difference. The above code segment goes as
1083-
follows in its vectorized version (see the problem
1084-
<a href="http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book005.html#decay:exer:dudt" target="_self">Differentiate a function</a> in <a href="http://tinyurl.com/nclmcng/web" target="_self">Finite
1085-
Difference Computing with Exponential Decay Models</a> <a href="._vib-sol003.html#Langtangen_decay">[1]</a> for
1081+
follows in its vectorized version (see Problem 1.2 in <a href="._vib-sol003.html#Langtangen_decay">[1]</a> for
10861082
explanation of details):
10871083

10881084
<p>
@@ -1132,9 +1128,7 @@ <h3 id="___sec14">Manual calculation </h3>
11321128
<li> the test is formulated as a boolean condition and executed by <code>assert</code></li>
11331129
</ul>
11341130

1135-
See the
1136-
section <a href="http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book009.html#softeng1:verify:pytest" target="_self">Unit tests and test functions</a> in
1137-
<a href="http://tinyurl.com/nclmcng/web" target="_self">Finite Difference Computing with Exponential Decay Models</a> <a href="._vib-sol003.html#Langtangen_decay">[1]</a>
1131+
See Section 5.3.2 in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>
11381132
for more details on how to construct test functions and utilize nose
11391133
or pytest for automatic execution of tests. Our recommendation is to
11401134
use pytest. With this choice, you can
@@ -1176,9 +1170,7 @@ <h3 id="___sec16">Checking convergence rates </h3>
11761170
<p>
11771171
Empirical computation of convergence rates yields a good method for
11781172
verification. The method and its computational details are explained
1179-
in detail for a simple ODE model in the section
1180-
<a href="http://hplgit.github.io/decay-book/doc/pub/book/html/._decay-book007.html#decay:convergence:rate" target="_self">Computing convergence rates</a>
1181-
in <a href="http://tinyurl.com/nclmcng/web" target="_self">Finite Difference Computing with Exponential Decay Models</a> <a href="._vib-sol003.html#Langtangen_decay">[1]</a>. Readers not
1173+
in detail in Section 3.1.6 in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>. Readers not
11821174
familiar with the concept should look up this reference before
11831175
proceeding.
11841176

@@ -1333,10 +1325,8 @@ <h2 id="___sec18">Scaled model </h2>
13331325
because fewer parameters need to be set. The present problem is made
13341326
dimensionless by introducing dimensionless variables \( \bar t = t/t_c \)
13351327
and \( \bar u = u/u_c \), where \( t_c \) and \( u_c \) are characteristic scales
1336-
for \( t \) and \( u \), respectively. We refer to the section
1337-
<a href="http://hplgit.github.io/scaling-book/doc/pub/book/html/._scaling-book006.html#sec:scale:vib:undamped" target="_self">Undamped vibrations without forcing</a>
1338-
in the book <a href="http://tinyurl.com/qfjgxmf/web" target="_self">Scaling of differential equations</a> <a href="._vib-sol003.html#Langtangen_scaling">[2]</a> for all
1339-
details about this scaling.
1328+
for \( t \) and \( u \), respectively. We refer to Section 2.2.1 in
1329+
<a href="._vib-sol003.html#Langtangen_scaling">[2]</a> for all details about this scaling.
13401330

13411331
<p>
13421332
The scaled ODE problem reads
@@ -4691,9 +4681,8 @@ <h2 id="vib:exer:undamped:adaptive">Exercise 4: See if adaptive methods improve
46914681
Adaptive methods for solving ODEs aim at adjusting \( \Delta t \) such
46924682
that the error is within a user-prescribed tolerance. Implement the
46934683
equation \( u^{\prime\prime}+u=0 \) in the <a href="https://github.com/hplgit/odespy" target="_self">Odespy</a>
4694-
software. Use the example <a href="http://hplgit.github.io/decay-book/doc/pub/book/sphinx/._book006.html#example-adaptive-runge-kutta-methods" target="_self">on adaptive
4695-
schemes</a>
4696-
in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>. Run the scheme with a very low
4684+
software. Use the example from Section 3.2.11 in <a href="._vib-sol003.html#Langtangen_decay">[1]</a>.
4685+
Run the scheme with a very low
46974686
tolerance (say \( 10^{-14} \)) and for a long time, check the number of
46984687
time points in the solver's mesh (<code>len(solver.t_all)</code>), and compare
46994688
the phase error with that produced by the simple finite difference

doc/Trash/vib/html/._vib-solarized000.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@
529529
<center>[3] <b>Department of Process, Energy and Environmental Technology, University College of Southeast Norway</b></center>
530530
<br>
531531
<p>
532-
<center><h4>Dec 23, 2016</h4></center> <!-- date -->
532+
<center><h4>Jan 21, 2017</h4></center> <!-- date -->
533533
<br>
534534
<p>
535535
<!-- Externaldocuments: ../../../../../decay-book/doc/.src/book/book -->
@@ -551,7 +551,7 @@
551551

552552

553553
<center style="font-size:80%">
554-
<!-- copyright --> &copy; 2016, Hans Petter Langtangen, Svein Linge. Released under CC Attribution 4.0 license
554+
<!-- copyright --> &copy; 2017, Hans Petter Langtangen, Svein Linge. Released under CC Attribution 4.0 license
555555
</center>
556556

557557

0 commit comments

Comments
 (0)