Computational Physics, Python, Math, Physics.
conditions if right_bound_cond == 1: #Dirichlet bound cond u_jp1[N_x] = 0 elif right_bound_cond == 2: #Nuemann bound cond #i = N_x u_jp1[N_x] = u_j[N_x] + 0.5*C2*( 0.5*(q[N_x-1] + q[N_x])*(u_j[N_x-1] - u_j[N_x]) - 0.5*(q[N_x-1] + q[N_x])*(u_j[N_x] - u_j[i-1])) elif right_bound_cond == 3: #Mur bound