v0.16.0
Loading...
Searching...
No Matches
IntegrationRules.hpp
Go to the documentation of this file.
1/**
2 * \file IntegrationRules.hpp
3 *
4 * Integration rules
5 *
6 */
7
8#pragma once
9
10
11namespace MoFEM {
12
13namespace IntRules {
14
15namespace NCC {
16
17#include <triangle_ncc_rule.h>
19
20} // namespace NCC
21
22namespace NCO {
23
24#include <triangle_nco_rule.h>
26
27} // namespace NCO
28
29/** Xiao--Gimbutas quadrature rules from quadraturerules.org Q000002. */
30namespace XiaoGimbutas {
31
32/**
33 * Raw quadrature rule data.
34 *
35 * Points are stored point-by-point in barycentric coordinates. The weights are
36 * normalised for a domain of volume one; multiply them by the physical domain
37 * volume when evaluating an integral.
38 */
39struct Rule {
40 unsigned int numPoints;
42 const double *points;
43 const double *weights;
44};
45
46enum {
49};
50
51/// Rule of polynomial order n is stored at index n - 1.
52extern const Rule triangleRules[triangleRuleCount];
53
54/// Rule of polynomial order n is stored at index n - 1.
55extern const Rule tetrahedronRules[tetrahedronRuleCount];
56
57/**
58 * Get a triangle rule for the requested polynomial order.
59 *
60 * Order zero uses the order-one rule. A null pointer is returned for a
61 * negative order or an order greater than triangleRuleCount.
62 */
63const Rule *getTriangleRule(int order);
64
65/**
66 * Get a tetrahedron rule for the requested polynomial order.
67 *
68 * Order zero uses the order-one rule. A null pointer is returned for a
69 * negative order or an order greater than tetrahedronRuleCount.
70 */
71const Rule *getTetrahedronRule(int order);
72
73} // namespace XiaoGimbutas
74
75} // namespace IntRules
76
77}
constexpr int order
const Rule triangleRules[triangleRuleCount]
Rule of polynomial order n is stored at index n - 1.
const Rule tetrahedronRules[tetrahedronRuleCount]
Rule of polynomial order n is stored at index n - 1.
const Rule * getTriangleRule(const int order)
const Rule * getTetrahedronRule(const int order)
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10