b1, b2, b3: coefficients to compute right hand side term of tridiagonal system
function crwcL(v1,v2,v3,v4,v5)
eps = 1.0e-6
s1 = (13.0/12.0)*(v1-2.0*v2+v3)^2 + 0.25*(v1-4.0*v2+3.0*v3)^2
s2 = (13.0/12.0)*(v2-2.0*v3+v4)^2 + 0.25*(v2-v4)^2
```

```
s3 = (13.0/12.0)*(v3-2.0*v4+v5)^2 + 0.25*(3.0*v3-4.0*v4+v5)^2
c1 = 2.0e-1/((eps+s1)^2)
c2 = 5.0e-1/((eps+s2)^2)
c3 = 3.0e-1/((eps+s3)^2)
w1 = c1/(c1+c2+c3)
w2 = c2/(c1+c2+c3)
w3 = c3/(c1+c2+c3)
a1 = (2.0*w1 + w2)/3.0
a2 = (w1 + 2.0*w2 + 2.0*w3)/3.0
a3 = w3/3.0
b1 = w1/6.0
b2 = (5.0*w1 + 5.0*w2 + w3)/6.0
b3 = (w2 + 5.0*w3)/6.0
return a1,a2,a3,b1,b2,b3
end
```
We demonstrate CRWENO-5 scheme for both Dirichlet and periodic boundary condition. The Julia function to form the tridiagonal system for computing left side state at the interface in CRWENO-5 is given in Listing 10. We use a similar function for computing right side state.

✝ ✆

**Listing 10.** Implementation of Julia function to form the tridiagonal system for computing left side numerical state at the interface for periodic boundary condition. ✞ ☎

```