Skip to content

Commit 33a472c

Browse files
committed
Fixed ragged hyphenations, minor tweaks
1 parent 43fd1cc commit 33a472c

5 files changed

Lines changed: 16 additions & 3 deletions

File tree

chapters/Getting_your_toes_wet.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
\end{lstlisting}
4141

4242
For your first program, open a terminal, create a directory for ICCP files and open your first Fortran file by typing
43-
\marginnote[-0.5cm]{Modern terminal emulators all have a feature called \emph{tab completion}; enter part of a command \& hit the \texttt{TAB} key and the terminal will attempt to fill in the rest of the command for you.}
43+
\marginnote[-0.5cm]{Modern terminal emulators all have a feature called
44+
\emph{tab completion}\index{Tab completion}; enter part of a command \& hit the \texttt{TAB} key and the terminal will attempt to fill in the rest of the command for you.}
4445
\begin{lstlisting}[style=prompt, nolol]
4546
$ mkdir iccp # create a new directory called 'iccp'
4647
$ cd iccp # move to the new directory

chapters/Optimization.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ \section{Scalability; or, the importance of big O}
116116
Numerical analysis is a large field, and it can be quite daunting trying to understand the merits of different methods, or even finding them.
117117
For this, we recommend the book \emph{Numerical Recipes}\footnote{Available free online at \url{http://apps.nrbook.com/fortran/index.html}}.
118118
It covers a wide range of topics, focuses on best practices, and does not ignore coding effort when comparing algorithms.
119-
It even includes the full source code of the implementations! We recommend always using it as your starting point, with one exception: linear algebra (see \autoref{chap:Linear algebra}).
119+
It even includes the full source code of the implementations! We recommend
120+
always using it as your starting point, with one exception: linear algebra
121+
(see \autoref{chap:Linear algebra}).
120122

121123
We conclude this section with an overview of the computational complexity of certain common operations.
122124
This will give you an idea of the most likely bottleneck in your code.

chapters/Structuring_your_code.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ \section{Functions and subroutines}
3131
Fortran subroutines are invoked with the keyword \keyword{call} followed by the name of the routine and an optional list of parameters in parentheses.
3232
The code for the subroutine itself appears after the keyword \keyword{contains}.
3333
We don't have to type \keyword{implicit none} again, since that's inherited from the program.
34-
\marginnote{A \textbf{big} fortran gotcha involves initializing local variables while declaring them (\ie\ \lstinline$real :: x = 10.0$). Variables like this have an implicit \keyword{save}\index{Fortran!save@\keyword{save}} statement, meaning they retain their value through subsequent calls to the subroutine. It's a good idea to either mark these variables with the \keyword{save} attribute explicitly \emph{or} separate initialization from declaration within subroutines and functions.}
34+
\marginnote{A \textbf{big} fortran gotcha involves initializing local
35+
variables while declaring them (\eg\ \lstinline$real :: x = 10.0$). Variables like this have an implicit \keyword{save}\index{Fortran!save@\keyword{save}} statement, meaning they retain their value through subsequent calls to the subroutine. It's a good idea to either mark these variables with the \keyword{save} attribute explicitly \emph{or} separate initialization from declaration within subroutines and functions.}
3536
When declaring the parameters, we need to specify not only the type, but also how we're going to use them, \ie, the \emph{intent}.\index{Fortran!intent(in/out)@\keyword{intent} (\keyword{in}/\keyword{out})}
3637
For input and output parameters, we use \texttt{\keyword{intent}(\keyword{in})} and \texttt{\keyword{intent}(\keyword{out})}, respectively.
3738
For parameters functioning as both, we use \texttt{\keyword{intent}(\keyword{inout})}.

chapters/The_magic_of_makefiles.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
\Chapter{The magic of Makefiles}{}
22
\label{chap:Makefiles}
33

4+
\begin{quote}
5+
\begin{verbatim}
6+
love: /dev/null
7+
@echo not war
8+
\end{verbatim}
9+
\end{quote}
10+
411
Once your programs become larger, it is convenient to split the source code into several files.
512
However, to obtain a running program, each of these files has to be compiled separately (resulting in a \emph{relocatable object file}, with extension \texttt{.o}) and then combined (linked) into a single program.
613
Doing this by hand quickly becomes tedious, so we resort to using Makefiles.

notes.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
%\definecolor{TUBlue}{RGB}{61,152,222}
3232
%\definecolor{SpartanGreen}{RGB}{24,69,59}
3333

34+
\pretolerance=10000
35+
3436
\hypersetup{
3537
colorlinks=true,
3638
citecolor=Blue,

0 commit comments

Comments
 (0)