# generating a non-uniform grid with Chebyshev discretization

I often see that it is common to put "more points" in the region of interest in the computational domain of the numerical method, i.e. use non-uniform grid. The proofs are usually done for the uniform grid though and then using some arguments like "the proof can be extended to non-uniform grid as well" the results show good errors obtained. Ok, even if the theory behind non-uniform grid is the same, I was thinking how to generate those non-uniform grids and I did not find that many articles. The simplest way, perhaps, is to use some sort of "generating" function, something like a cubic polynomial that does create a desired non-uniformity controlled by the polynomial coefficients. However, there are spectral methods such as Chebyshev discretization(I don't know much about) that can also be utilized. Thus, I wonder if there is any advantage of using it over a cubic function mapping? In either case I would approximate derivatives as on a non-uniform grid so the local error of the first and second derivative would be bounded by $O((\max_{i\in I}\{x_{i+1}-x_i\})^2)$.

## 1 Answer

The main use for Chebyshev points is with a (pseudo)spectral method. The Chebyshev points are good ("optimal") for $L^\infty$ approximation and derivatives can be evaluated in $O(n \log n)$ by FFT. If you are going to use a compact spatial discretization (such as FD, FV, or FE) then there is no advantage to Chebyshev points unless the "interesting" regions just happen to coincide.

To create topologically structured grids that place high resolution in interesting regions, you should check out elliptic mesh generation. In this approach, you provide a "monitor function" that indicates the desired resolution (and anisotropy) and the grid generator solves a (typically nonlinear) elliptic PDE to compute the location of the nodes in the mesh. There are several good books and review articles, e.g.

• I had in mind some simple 1D parabolic equation that I would solve numerically and the region of interest would be the point where the initial data is discontinuous, for example, a step function. Thus, I would put more points around the jump. So, based on what you have said there is no difference for me, so I can generate any non-uniform grid I like? – Kamil Dec 17 '12 at 0:58
• Yes, you can use an ad-hoc method, especially in 1D where there are few quality requirements. Note that (a) you may want to use an a posteriori error estimator to guide where to place resolution, and that (b) most discretizations require that the ratio of adjacent cell sizes be bounded (hence a geometrically graded mesh near those "interesting" regions). – Jed Brown Dec 17 '12 at 4:49