Skip to content

Commit

Permalink
Use align* instead of eqnarray*
Browse files Browse the repository at this point in the history
This gives more consistent spacing around the aligned equality operator, compared with all the other equation* environments.
  • Loading branch information
henrikt-ma committed Jun 2, 2020
1 parent adb0972 commit 2bcbe16
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions chapters/classes.tex
Expand Up @@ -1142,11 +1142,11 @@ \section{Balanced Models}\doublelabel{balanced-models}

%TODO-FORMAT Should this be verbatim code instead?
Local equations:
\begin{eqnarray*}
0 &=& p.i + n.i;\\
u &=& p.v - n.v;\\
C \cdot \text{der}(u) &=& p.i;
\end{eqnarray*}
\begin{align*}
0 &= p.i + n.i;\\
u &= p.v - n.v;\\
C \cdot \text{der}(u) &= p.i;
\end{align*}
and 2 equations corresponding to the 2 flow-variables \lstinline!p.i! and \lstinline!n.i!.

These are 5 equations in 5 unknowns (\textbf{locally}
Expand Down Expand Up @@ -1213,13 +1213,13 @@ \section{Balanced Models}\doublelabel{balanced-models}
flow variables for \lstinline!t! (\lstinline!t.p.i!, \lstinline!t.n.i!), and 2 flow variables for \lstinline!c! (\lstinline!c.p.i!, \lstinline!c.n.i!).

Local equations:
\begin{eqnarray*} \text{p.v} &=& \text{t.p.v};\\
0 &=& \text{p.i}-\text{t.p.i};\\
\text{c.p.v} &=& \text{t.n.v};\\
0 &=& \text{c.p.i}+\text{t.n.i};\\
\text{n.v} &=& \text{c.n.v};\\
0 &=& \text{n.i}-\text{c.n.i};
\end{eqnarray*}
\begin{align*} \text{p.v} &= \text{t.p.v};\\
0 &= \text{p.i}-\text{t.p.i};\\
\text{c.p.v} &= \text{t.n.v};\\
0 &= \text{c.p.i}+\text{t.n.i};\\
\text{n.v} &= \text{c.n.v};\\
0 &= \text{n.i}-\text{c.n.i};
\end{align*}
and 2 equation corresponding to the flow variables \lstinline!p.i!, \lstinline!n.i!.

In total we have 8 scalar unknowns and 8 scalar equations, i.e., a
Expand Down
10 changes: 5 additions & 5 deletions chapters/operatorsandexpressions.tex
Expand Up @@ -714,11 +714,11 @@ \subsubsection{spatialDistribution}\doublelabel{spatialdistribution}
The \lstinline!spatialDistribution!() operator allows to approximate efficiently the
solution of the infinite-dimensional problem

\begin{eqnarray*}
\frac{\partial z(y,t)}{\partial t}+v(t)\frac{\partial z(y,t)}{\partial y}&=&0.0\\
z(0.0, t)=\mathrm{in}_0(t) \text{ if $v\ge 0$}\\
z(1.0, t)=\mathrm{in}_1(t) \text{ if $v<0$}
\end{eqnarray*}
\begin{align*}
\frac{\partial z(y,t)}{\partial t}+v(t)\frac{\partial z(y,t)}{\partial y} &= 0.0\\
z(0.0, t) &= \mathrm{in}_0(t) \text{ if $v\ge 0$}\\
z(1.0, t) &= \mathrm{in}_1(t) \text{ if $v<0$}
\end{align*}
where $z(y, t)$ is the transported quantity, $y$ is the
normalized spatial coordinate ($0.0 \le y \le 1.0$), $t$ is the
time, $v(t)=\mathrm{der}(x)$ is the normalized
Expand Down

0 comments on commit 2bcbe16

Please sign in to comment.