svMultiPhysics
Loading...
Searching...
No Matches
GaussLobattoQuadrature.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef SVMP_FE_GAUSS_LOBATTO_QUADRATURE_H
5#define SVMP_FE_GAUSS_LOBATTO_QUADRATURE_H
6
7/**
8 * @file GaussLobattoQuadrature.h
9 * @brief Bounded Gauss-Lobatto-Legendre quadrature generation on the reference line.
10 * @ingroup FE_Quadrature
11 */
12
14
15namespace svmp::FE::quadrature {
16
17/** @addtogroup FE_Quadrature
18 * @{
19 */
20
21/**
22 * @brief Return the largest supported Gauss-Lobatto-Legendre exactness request.
23 * @details Degree 253 corresponds to the internal 128-point project support
24 * bound, including both endpoints, which limits generator work and downstream
25 * product-rule growth; it is not a mathematical or convergence limit.
26 * @return The inclusive requested-exactness limit, 253.
27 */
28[[nodiscard]] constexpr int max_gauss_lobatto_exactness() noexcept
29{
30 return 253;
31}
32
33/**
34 * @brief Generate a Gauss-Lobatto-Legendre rule on @f$[-1,1]@f$ with at least
35 * the requested exactness.
36 *
37 * @details For @f$d@f$ = @p requested_exactness, integer division gives the
38 * minimum point count @f$n=\lfloor d/2\rfloor+2@f$. The returned metadata reports
39 * the actual polynomial exactness @f$2n-3@f$, which exceeds even requests by one.
40 * Degree zero produces two points with exactness one. The first and last points
41 * are exactly @f$-1@f$ and @f$+1@f$. When present, the @f$n-2@f$ interior points
42 * are the roots of @f$P'_{n-1}@f$, the derivative of the Legendre polynomial
43 * of degree @f$n-1@f$. Points are strictly increasing, and weights are positive
44 * and aligned with their points.
45 *
46 * @see [NIST DLMF: Legendre polynomials](https://dlmf.nist.gov/18.3)
47 *
48 * @param requested_exactness Minimum polynomial degree to integrate exactly;
49 * must be in [0, 253], inclusive (see max_gauss_lobatto_exactness()).
50 * @return A complete QuadratureRule value for CellFamily::Line.
51 * @throws InvalidArgumentException If @p requested_exactness is outside the
52 * supported range; checked before point-count conversion or allocation.
53 * @throws ConvergenceException If root refinement or final numerical
54 * validation fails.
55 */
56[[nodiscard]] QuadratureRule
57make_gauss_lobatto_rule(int requested_exactness);
58
59/** @} */
60
61} // namespace svmp::FE::quadrature
62
63#endif // SVMP_FE_GAUSS_LOBATTO_QUADRATURE_H
Value type for reference-space quadrature rules.
constexpr int max_gauss_lobatto_exactness() noexcept
Return the largest supported Gauss-Lobatto-Legendre exactness request.
Definition GaussLobattoQuadrature.h:28
QuadratureRule make_gauss_lobatto_rule(int requested_exactness)
Generate a Gauss-Lobatto-Legendre rule on with at least the requested exactness.
Definition GaussLobattoQuadrature.cpp:81