Skip to content

Commit d02911d

Browse files
committed
fix indexing
1 parent 0290cc4 commit d02911d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

multigrid/multigrid.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ \subsubsection{1-d}
623623
A higher-order method is to do linear reconstruction of the coarse
624624
data and then average under the profile, e.g.,
625625
\begin{equation}
626-
\phi(x) = \frac{\phi^c_{i+1} - \phi^c_{i-1}}{2\dx^c} (x - x_i^c) + \phi_i^c
626+
\phi(x) = \frac{\phi^c_{j+1} - \phi^c_{j-1}}{2\dx^c} (x - x_j^c) + \phi_j^c
627627
\end{equation}
628628

629629
To second-order, we can find the values of $\phi^f_i$ and
@@ -635,8 +635,8 @@ \subsubsection{1-d}
635635
\end{align}
636636
giving
637637
\begin{align}
638-
\phi^f_i &= \phi^c_i - \frac{1}{8} (\phi^c_{i+1} - \phi^c_{i-1}) \\
639-
\phi^f_{i+1} &= \phi^c_i + \frac{1}{8} (\phi^c_{i+1} - \phi^c_{i-1})
638+
\phi^f_i &= \phi^c_j - \frac{1}{8} (\phi^c_{j+1} - \phi^c_{j-1}) \\
639+
\phi^f_{i+1} &= \phi^c_j + \frac{1}{8} (\phi^c_{j+1} - \phi^c_{j-1})
640640
\end{align}
641641
Notice that this is conservative, since $\dx^f (\phi^f_i + \phi^f_{i+1}) = \dx^c \phi^c_j$.
642642

0 commit comments

Comments
 (0)