2,783 research outputs found

    O(1) Computation of Legendre polynomials and Gauss-Legendre nodes and weights for parallel computing

    Get PDF
    A self-contained set of algorithms is proposed for the fast evaluation of Legendre polynomials of arbitrary degree and argument is an element of [-1, 1]. More specifically the time required to evaluate any Legendre polynomial, regardless of argument and degree, is bounded by a constant; i.e., the complexity is O(1). The proposed algorithm also immediately yields an O(1) algorithm for computing an arbitrary Gauss-Legendre quadrature node. Such a capability is crucial for efficiently performing certain parallel computations with high order Legendre polynomials, such as computing an integral in parallel by means of Gauss-Legendre quadrature and the parallel evaluation of Legendre series. In order to achieve the O(1) complexity, novel efficient asymptotic expansions are derived and used alongside known results. A C++ implementation is available from the authors that includes the evaluation routines of the Legendre polynomials and Gauss-Legendre quadrature rules

    On the numerical calculation of the roots of special functions satisfying second order ordinary differential equations

    Full text link
    We describe a method for calculating the roots of special functions satisfying second order linear ordinary differential equations. It exploits the recent observation that the solutions of a large class of such equations can be represented via nonoscillatory phase functions, even in the high-frequency regime. Our algorithm achieves near machine precision accuracy and the time required to compute one root of a solution is independent of the frequency of oscillations of that solution. Moreover, despite its great generality, our approach is competitive with specialized, state-of-the-art methods for the construction of Gaussian quadrature rules of large orders when it used in such a capacity. The performance of the scheme is illustrated with several numerical experiments and a Fortran implementation of our algorithm is available at the author's website

    Adaptive quadrature by expansion for layer potential evaluation in two dimensions

    Full text link
    When solving partial differential equations using boundary integral equation methods, accurate evaluation of singular and nearly singular integrals in layer potentials is crucial. A recent scheme for this is quadrature by expansion (QBX), which solves the problem by locally approximating the potential using a local expansion centered at some distance from the source boundary. In this paper we introduce an extension of the QBX scheme in 2D denoted AQBX - adaptive quadrature by expansion - which combines QBX with an algorithm for automated selection of parameters, based on a target error tolerance. A key component in this algorithm is the ability to accurately estimate the numerical errors in the coefficients of the expansion. Combining previous results for flat panels with a procedure for taking the panel shape into account, we derive such error estimates for arbitrarily shaped boundaries in 2D that are discretized using panel-based Gauss-Legendre quadrature. Applying our scheme to numerical solutions of Dirichlet problems for the Laplace and Helmholtz equations, and also for solving these equations, we find that the scheme is able to satisfy a given target tolerance to within an order of magnitude, making it useful for practical applications. This represents a significant simplification over the original QBX algorithm, in which choosing a good set of parameters can be hard

    A fast, simple, and stable Chebyshev-Legendre transform using an asymptotic formula

    Get PDF
    A fast, simple, and numerically stable transform for converting between Legendre and Chebyshev coefficients of a degree NN polynomial in O(N(logN)2/loglogN)O(N(\log N)^{2}/ \log \log N) operations is derived. The basis of the algorithm is to rewrite a well-known asymptotic formula for Legendre polynomials of large degree as a weighted linear combination of Chebyshev polynomials, which can then be evaluated by using the discrete cosine transform. Numerical results are provided to demonstrate the efficiency and numerical stability. Since the algorithm evaluates a Legendre expansion at an N+1N+1 Chebyshev grid as an intermediate step, it also provides a fast transform between Legendre coefficients and values on a Chebyshev grid

    Machine Precision Evaluation of Singular and Nearly Singular Potential Integrals by Use of Gauss Quadrature Formulas for Rational Functions

    Get PDF
    A new technique for machine precision evaluation of singular and nearly singular potential integrals with 1/R singularities is presented. The numerical quadrature scheme is based on a new rational expression for the integrands, obtained by a cancellation procedure. In particular, by using library routines for Gauss quadrature of rational functions readily available in the literature, this new expression permits the exact numerical integration of singular static potentials associated with polynomial source distributions. The rules to achieve the desired numerical accuracy for singular and nearly singular static and dynamic potential integrals are presented and discussed, and several numerical examples are provide

    Dealiasing techniques for high-order spectral element methods on regular and irregular grids

    Get PDF
    High-order methods are becoming increasingly attractive in both academia and industry, especially in the context of computational fluid dynamics. However, before they can be more widely adopted, issues such as lack of robustness in terms of numerical stability need to be addressed, particularly when treating industrial-type problems where challenging geometries and a wide range of physical scales, typically due to high Reynolds numbers, need to be taken into account. One source of instability is aliasing effects which arise from the nonlinearity of the underlying problem. In this work we detail two dealiasing strategies based on the concept of consistent integration. The first uses a localised approach, which is useful when the nonlinearities only arise in parts of the problem. The second is based on the more traditional approach of using a higher quadrature. The main goal of both dealiasing techniques is to improve the robustness of high order spectral element methods, thereby reducing aliasing-driven instabilities. We demonstrate how these two strategies can be effectively applied to both continuous and discontinuous discretisations, where, in the latter, both volumetric and interface approximations must be considered. We show the key features of each dealiasing technique applied to the scalar conservation law with numerical examples and we highlight the main differences in terms of implementation between continuous and discontinuous spatial discretisations
    corecore