Skip to content

Commit 35f2ebd

Browse files
tho-lewisjychang48
authored andcommitted
Converting math blocks to dollarmath syntax.
1 parent d2e5e81 commit 35f2ebd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jacobi/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,28 @@ Here, $u(x,y)$ is a smooth function in the domain.
3232
The equations are discretized using finite difference method[^1] in a Cartesian
3333
coordinates with a 5-point stencil:
3434

35-
```math
35+
$$
3636
\frac{-u_{i-1,j } + 2u_{i,j} - u_{i+1,j }}{\Delta x^2} +
3737
\frac{-u_{i, j-1} + 2u_{i,j} - u_{i, j+1}}{\Delta y^2} = f_{i,j}
38-
```
38+
$$
3939

4040
[^1]: See the [Finite Difference](../finite-difference/docs/Laplacian_Part1.md) blogpost.
4141

4242
The above finite difference Laplacian operator leads to a sparse matrix
4343
operator, $A$ on the vector of unknown $\bf u$: $A {\bf u} = f$. Here:
4444

45-
```math
45+
$$
4646
{\bf u} = [u_{1,1}, u_{1,2}, \cdots, u_{2,1}, \cdots,
4747
u_{i,j}, \cdots u_{n_i,n_j}].
48-
```
48+
$$
4949

5050
If the matrix is decomposed into the diagonal ($D$), lower ($L$) and upper ($U$)
5151
parts ($A = [D + L + U]$), the Jacobi iterative method can be represented as:
5252

53-
```math
53+
$$
5454
{\bf u}^{k+1} = {\bf u}^{k} + D^{-1} \left( {\bf f} - A {\bf u}^k \right)
55+
$$
5556

56-
```
5757
Here, $k$ refers to the iteration number. The values of ${\bf u}^{(k=0)}$ are the Initial Conditions.
5858

5959
## Jacobi Code structure

0 commit comments

Comments
 (0)