High-order compact scheme for boundary points

In this paper, we introduce a new high-order scheme for boundary points when calculating the derivative of smooth functions by compact scheme. The primitive function reconstruction method of ENO schemes is applied to obtain the conservative form of the compact scheme. Equations for approximating the derivatives around the boundary points 1 and N are determined. For the Neumann (and mixed) boundary conditions, high-order equations are derived to determine the values of the function at the boundary points, 1 and N, before the primitive function reconstruction method is applied. We construct a subroutine that can be used with Dirichlet, Neumann, or mixed boundary conditions. Numerical tests are presented to demonstrate the capabilities of this new scheme, and a comparison to the lower-order boundary scheme shows its advantages.