Skip to content

Commit 1e201a0

Browse files
committed
Minor edits
1 parent 8ee12a5 commit 1e201a0

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

chapters/Coding_style.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ \chapter{Coding style}
4646
Don't worry about the overhead of calling a function.
4747
If you use optimization flags like \texttt{-O3}, the compiler will try to inline them anyway.
4848
\item\textbf{Modules}---Separate your program into logical units.
49-
Combine related functions and subroutines into modules\footnote{You may also find it convenient to put all physical parameters (number of particles, $\pi$, $c$, $k_B$, etc.) into their own module, even if they're just constant numbers. You can then ``load'' the parameters into your subroutines with the \keyword{use} statement instead of having absurdly long lists of arguments, or worse, \Biohazard\ global variables \Biohazard.\index{global variables|see {biohazard}}\index{biohazard}}.
49+
Combine related functions and subroutines into modules\footnote{You may also find it convenient to put all physical parameters (number of particles, $\pi$, $c$, $k_B$, etc.) into their own module, even if they're just constant numbers. You can then ``load'' the parameters into your subroutines with the \keyword{use} statement instead of having absurdly long lists of arguments, or worse, \Biohazard\ global variables \Biohazard.\index{biohazard|see {global variables}}\index{global variables}}
5050
For example, a single module with function integrators, or ODE solvers.
5151
If you use the object-oriented features of Fortran, it is also good practice to create separate modules for classes, \eg, a sparse-matrix object.
5252
\item\textbf{Comments}---Comments are kind of a double-edged sword.

coding_notes.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@
108108
\begin{fullwidth}
109109
\begin{center}
110110
\includegraphics[width=0.15\textwidth]{figures/by-nc-sa.eps}
111-
\end{center}
111+
112112
This work, including its figures and source code (where applicable), is
113113
licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0
114114
International License. To view a copy of this license, visit
115115
\url{http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_US}.
116+
\end{center}
116117
\end{fullwidth}
117118
\pagestyle{fancy}
118119

@@ -128,7 +129,7 @@ \part{The Basics}
128129
\include{chapters/Debugging}
129130
\include{chapters/Coding_style}
130131
\include{chapters/Revision_control}
131-
\part{Getting More Advanced}
132+
\part{Advanced Numerics \& Visualization}
132133
\include{chapters/Optimization}
133134
\include{chapters/Random_numbers}
134135
\include{chapters/Linear_algebra}

0 commit comments

Comments
 (0)