Generating stencils for Derivative(p(t, x, y), (x, 2))
/home/ed/anaconda3/envs/devito/lib/python3.8/site-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/home/ed/anaconda3/envs/devito/lib/python3.8/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
return self._float_to_str(self.smallest_subnormal)
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 0.04 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 0.11 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 0.27 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 0.50 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 0.74 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 1.49 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 2.87 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 4.25 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 5.94 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 13.42 s
Operator `normals` ran in 0.01 s
Generating stencils for Derivative(p(t, x, y), (x, 2))
Generating stencils for Derivative(p(t, x, y), (y, 2))
Operator `Kernel` ran in 30.94 s
Plotting the convergence, a similar trend to that reported for Mulder’s scheme is observed, with an approximately fourth-order trend, flattening at a grid increment of around \(\Delta x = 0.02\), after which the order of convergence drops off somewhat.
import matplotlib.pyplot as pltimport numpy as npplt.loglog(2*np.pi/(240*np.array(refinements)), errs_max, 'kx')plt.loglog(2*np.pi/(240*np.array(refinements)), errs_max, 'k')plt.title("Convergence of the 4th-order scheme")plt.show()
Finding the convergence gradient before the knee, we see that the scheme attains just short of 4th-order.