Computational Physics, Physics, Math, Python.
##plotting aids x = numpy.linspace(0,1,nx) y = numpy.linspace(0,1,ny) ##Dirichlet boundary conditions p[-1,:] = numpy.sin(1.5*numpy.pi*x/x[-1]) Now let’s visualize the initial conditions using the plot_3D function, just to check we've got it right. plot_3D(x, y, p) The p array is equal to zero