svMultiPhysics
Loading...
Searching...
No Matches
SymmetricTriangleQuadrature.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_SYMMETRIC_TRIANGLE_QUADRATURE_H
5#define SVMP_FE_SYMMETRIC_TRIANGLE_QUADRATURE_H
6
7/**
8 * @file SymmetricTriangleQuadrature.h
9 * @brief Contained Dunavant rules on the unit right triangle.
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 symmetric triangle exactness.
23 * @return 19.
24 */
25[[nodiscard]] constexpr int max_symmetric_triangle_exactness() noexcept
26{
27 return 19;
28}
29
30/**
31 * @brief Return the smallest Dunavant rule meeting the requested degree.
32 *
33 * @details **Reference:** D. A. Dunavant (1985), High degree efficient symmetrical
34 * Gaussian quadrature rules for the triangle. https://doi.org/10.1002/nme.1620210612
35 *
36 * The reference tabulates rules of degrees 1 to 20. Rules 11, 15, 16, 18, and 20
37 * place some points outside the triangle, where the integrand may not be defined,
38 * so only degrees 1–10, 12, 13, 14, 17, and 19 are implemented. A request for any
39 * other degree returns the next higher implemented one (request 0 returns the
40 * degree-1 centroid rule); polynomial_exactness() reports the delivered degree.
41 *
42 * The rules are symmetric: points come in groups of one (the centroid), three, or
43 * six that share a weight, each group being the permutations of one point's
44 * barycentric coordinates @f$(1-x-y,x,y)@f$. Groups follow the reference's order.
45 *
46 * Points lie in the unit triangle @f$x,y\geq0,\ x+y\leq1@f$, with third coordinate
47 * exactly zero. Weights sum to the area @f$1/2@f$ within @f$5\cdot10^{-15}@f$, the
48 * rounding of the reference's 15-digit tables. The degree-3 and degree-7 rules have
49 * a negative weight at the centroid, as in the reference. No clipping or
50 * renormalization is applied.
51 *
52 * @param[in] requested_exactness Minimum total degree in [0, 19], inclusive.
53 * @return Owning Triangle rule reporting its delivered polynomial exactness.
54 * @throws InvalidArgumentException If the request is outside [0, 19], checked
55 * before table selection or allocation.
56 */
57[[nodiscard]] QuadratureRule make_symmetric_triangle_rule(int requested_exactness);
58
59/** @} */
60
61} // namespace svmp::FE::quadrature
62
63#endif // SVMP_FE_SYMMETRIC_TRIANGLE_QUADRATURE_H
Value type for reference-space quadrature rules.
QuadratureRule make_symmetric_triangle_rule(int requested_exactness)
Return the smallest Dunavant rule meeting the requested degree.
Definition SymmetricTriangleQuadrature.cpp:181
constexpr int max_symmetric_triangle_exactness() noexcept
Return the largest supported symmetric triangle exactness.
Definition SymmetricTriangleQuadrature.h:25