v0.13.1
quad.h
Go to the documentation of this file.
1/* Parallel Hierarchical Grid -- an adaptive finite element library.
2 *
3 * Copyright (C) 2005-2010 State Key Laboratory of Scientific and
4 * Engineering Computing, Chinese Academy of Sciences. */
5
6/* This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301 USA */
20
21/* $Id: quad.h,v 1.5 2014/10/21 03:00:08 zlb Exp $ */
22
23#ifndef PHG_QUAD_H
24
25typedef struct QUAD_ {
26 char *name; /* name of the quadrature formulae */
27 int dim; /* dimension, 1: edge, 2: face, 3: tetra */
28 int order; /* exact for polynomials of order 'order' */
29 int npoints; /* number of points */
30 double *points; /* barycentric coordinates of quad. points */
31 double *weights; /* weights */
32 char id; /* id (for use with reference count) */
34
35#define QUAD_DEFAULT -1
36
37/* 1D quadrature rules */
38extern QUAD QUAD_1D_P1_;
39#define QUAD_1D_P1 (&QUAD_1D_P1_)
40extern QUAD QUAD_1D_P3_;
41#define QUAD_1D_P2 (&QUAD_1D_P3_)
42#define QUAD_1D_P3 (&QUAD_1D_P3_)
43extern QUAD QUAD_1D_P5_;
44#define QUAD_1D_P4 (&QUAD_1D_P5_)
45#define QUAD_1D_P5 (&QUAD_1D_P5_)
46extern QUAD QUAD_1D_P7_;
47#define QUAD_1D_P6 (&QUAD_1D_P7_)
48#define QUAD_1D_P7 (&QUAD_1D_P7_)
49extern QUAD QUAD_1D_P9_;
50#define QUAD_1D_P8 (&QUAD_1D_P9_)
51#define QUAD_1D_P9 (&QUAD_1D_P9_)
52extern QUAD QUAD_1D_P11_;
53#define QUAD_1D_P10 (&QUAD_1D_P11_)
54#define QUAD_1D_P11 (&QUAD_1D_P11_)
55extern QUAD QUAD_1D_P13_;
56#define QUAD_1D_P12 (&QUAD_1D_P13_)
57#define QUAD_1D_P13 (&QUAD_1D_P13_)
58extern QUAD QUAD_1D_P15_;
59#define QUAD_1D_P14 (&QUAD_1D_P15_)
60#define QUAD_1D_P15 (&QUAD_1D_P15_)
61extern QUAD QUAD_1D_P17_;
62#define QUAD_1D_P16 (&QUAD_1D_P17_)
63#define QUAD_1D_P17 (&QUAD_1D_P17_)
64extern QUAD QUAD_1D_P19_;
65#define QUAD_1D_P18 (&QUAD_1D_P19_)
66#define QUAD_1D_P19 (&QUAD_1D_P19_)
67extern QUAD QUAD_1D_P21_;
68#define QUAD_1D_P20 (&QUAD_1D_P21_)
69#define QUAD_1D_P21 (&QUAD_1D_P21_)
70
71/* 2D quadrature rules */
72extern QUAD QUAD_2D_P1_;
73#define QUAD_2D_P1 (&QUAD_2D_P1_)
74extern QUAD QUAD_2D_P2_;
75#define QUAD_2D_P2 (&QUAD_2D_P2_)
76extern QUAD QUAD_2D_P3_;
77#define QUAD_2D_P3 (&QUAD_2D_P3_)
78extern QUAD QUAD_2D_P4_;
79#define QUAD_2D_P4 (&QUAD_2D_P4_)
80extern QUAD QUAD_2D_P5_;
81#define QUAD_2D_P5 (&QUAD_2D_P5_)
82extern QUAD QUAD_2D_P6_;
83#define QUAD_2D_P6 (&QUAD_2D_P6_)
84extern QUAD QUAD_2D_P7_;
85#define QUAD_2D_P7 (&QUAD_2D_P7_)
86extern QUAD QUAD_2D_P8_;
87#define QUAD_2D_P8 (&QUAD_2D_P8_)
88extern QUAD QUAD_2D_P9_;
89#define QUAD_2D_P9 (&QUAD_2D_P9_)
90extern QUAD QUAD_2D_P10_;
91#define QUAD_2D_P10 (&QUAD_2D_P10_)
92extern QUAD QUAD_2D_P11_;
93#define QUAD_2D_P11 (&QUAD_2D_P11_)
94extern QUAD QUAD_2D_P12_;
95#define QUAD_2D_P12 (&QUAD_2D_P12_)
96extern QUAD QUAD_2D_P13_;
97#define QUAD_2D_P13 (&QUAD_2D_P13_)
98extern QUAD QUAD_2D_P14_;
99#define QUAD_2D_P14 (&QUAD_2D_P14_)
100extern QUAD QUAD_2D_P15_;
101#define QUAD_2D_P15 (&QUAD_2D_P15_)
102extern QUAD QUAD_2D_P16_;
103#define QUAD_2D_P16 (&QUAD_2D_P16_)
104extern QUAD QUAD_2D_P17_;
105#define QUAD_2D_P17 (&QUAD_2D_P17_)
106extern QUAD QUAD_2D_P18_;
107#define QUAD_2D_P18 (&QUAD_2D_P18_)
108extern QUAD QUAD_2D_P19_;
109#define QUAD_2D_P19 (&QUAD_2D_P19_)
110extern QUAD QUAD_2D_P20_;
111#define QUAD_2D_P20 (&QUAD_2D_P20_)
112extern QUAD QUAD_2D_P21_;
113#define QUAD_2D_P21 (&QUAD_2D_P21_)
114extern QUAD QUAD_2D_P22_;
115#define QUAD_2D_P22 (&QUAD_2D_P22_)
116extern QUAD QUAD_2D_P23_;
117#define QUAD_2D_P23 (&QUAD_2D_P23_)
118extern QUAD QUAD_2D_P24_;
119#define QUAD_2D_P24 (&QUAD_2D_P24_)
120extern QUAD QUAD_2D_P25_;
121#define QUAD_2D_P25 (&QUAD_2D_P25_)
122extern QUAD QUAD_2D_P26_;
123#define QUAD_2D_P26 (&QUAD_2D_P26_)
124extern QUAD QUAD_2D_P27_;
125#define QUAD_2D_P27 (&QUAD_2D_P27_)
126extern QUAD QUAD_2D_P28_;
127#define QUAD_2D_P28 (&QUAD_2D_P28_)
128extern QUAD QUAD_2D_P29_;
129#define QUAD_2D_P29 (&QUAD_2D_P29_)
130
131/* 3D quadrature rules */
132extern QUAD QUAD_3D_P1_;
133#define QUAD_3D_P1 (&QUAD_3D_P1_)
134extern QUAD QUAD_3D_P2_;
135#define QUAD_3D_P2 (&QUAD_3D_P2_)
136extern QUAD QUAD_3D_P3_;
137#define QUAD_3D_P3 (&QUAD_3D_P3_)
138extern QUAD QUAD_3D_P4_;
139#define QUAD_3D_P4 (&QUAD_3D_P4_)
140extern QUAD QUAD_3D_P5_;
141#define QUAD_3D_P5 (&QUAD_3D_P5_)
142extern QUAD QUAD_3D_P6_;
143#define QUAD_3D_P6 (&QUAD_3D_P6_)
144extern QUAD QUAD_3D_P7_;
145#define QUAD_3D_P7 (&QUAD_3D_P7_)
146extern QUAD QUAD_3D_P8_;
147#define QUAD_3D_P8 (&QUAD_3D_P8_)
148extern QUAD QUAD_3D_P9_;
149#define QUAD_3D_P9 (&QUAD_3D_P9_)
150extern QUAD QUAD_3D_P10_;
151#define QUAD_3D_P10 (&QUAD_3D_P10_)
152extern QUAD QUAD_3D_P11_;
153#define QUAD_3D_P11 (&QUAD_3D_P11_)
154extern QUAD QUAD_3D_P12_;
155#define QUAD_3D_P12 (&QUAD_3D_P12_)
156extern QUAD QUAD_3D_P13_;
157#define QUAD_3D_P13 (&QUAD_3D_P13_)
158extern QUAD QUAD_3D_P14_;
159#define QUAD_3D_P14 (&QUAD_3D_P14_)
160
161// Tables
162
163#define QUAD_1D_TABLE_SIZE 21
164static QUAD * const QUAD_1D_TABLE[] = { QUAD_1D_P1,
172};
173
174#define QUAD_2D_TABLE_SIZE 29
175static QUAD * const QUAD_2D_TABLE[] = { QUAD_2D_P1,
184};
185
186#define QUAD_3D_TABLE_SIZE 14
187static QUAD * const QUAD_3D_TABLE[] = { QUAD_3D_P1,
192};
193
194#define PHG_QUAD_H
195#endif
QUAD QUAD_2D_P2_
Definition: quad.c:295
#define QUAD_3D_P12
Definition: quad.h:155
#define QUAD_2D_P19
Definition: quad.h:109
QUAD QUAD_2D_P15_
Definition: quad.c:767
#define QUAD_2D_P15
Definition: quad.h:101
#define QUAD_1D_P2
Definition: quad.h:41
#define QUAD_1D_P20
Definition: quad.h:68
#define QUAD_1D_P14
Definition: quad.h:59
#define QUAD_2D_P22
Definition: quad.h:115
#define QUAD_2D_P4
Definition: quad.h:79
QUAD QUAD_1D_P13_
Definition: quad.c:165
#define QUAD_3D_P4
Definition: quad.h:139
#define QUAD_2D_P7
Definition: quad.h:85
QUAD QUAD_2D_P21_
Definition: quad.c:1104
#define QUAD_2D_P12
Definition: quad.h:95
#define QUAD_1D_P3
Definition: quad.h:42
#define QUAD_1D_P16
Definition: quad.h:62
QUAD QUAD_1D_P1_
Definition: quad.c:45
QUAD QUAD_1D_P9_
Definition: quad.c:123
#define QUAD_2D_P5
Definition: quad.h:81
QUAD QUAD_2D_P11_
Definition: quad.c:615
#define QUAD_2D_P11
Definition: quad.h:93
struct QUAD_ QUAD
#define QUAD_2D_P29
Definition: quad.h:129
#define QUAD_3D_P14
Definition: quad.h:159
#define QUAD_2D_P16
Definition: quad.h:103
QUAD QUAD_3D_P1_
Definition: quad.c:1763
#define QUAD_2D_P18
Definition: quad.h:107
#define QUAD_2D_P10
Definition: quad.h:91
QUAD QUAD_2D_P1_
Definition: quad.c:279
QUAD QUAD_2D_P26_
Definition: quad.c:1451
#define QUAD_2D_P20
Definition: quad.h:111
QUAD QUAD_2D_P13_
Definition: quad.c:684
QUAD QUAD_2D_P5_
Definition: quad.c:373
#define QUAD_2D_P6
Definition: quad.h:83
QUAD QUAD_2D_P10_
Definition: quad.c:583
#define QUAD_1D_P5
Definition: quad.h:45
#define QUAD_3D_P3
Definition: quad.h:137
#define QUAD_2D_P21
Definition: quad.h:113
#define QUAD_3D_P8
Definition: quad.h:147
#define QUAD_2D_P24
Definition: quad.h:119
#define QUAD_2D_P2
Definition: quad.h:75
#define QUAD_1D_P18
Definition: quad.h:65
QUAD QUAD_2D_P19_
Definition: quad.c:984
#define QUAD_2D_P26
Definition: quad.h:123
QUAD QUAD_2D_P28_
Definition: quad.c:1642
QUAD QUAD_2D_P20_
Definition: quad.c:1047
QUAD QUAD_3D_P12_
Definition: quad.c:2183
QUAD QUAD_3D_P14_
Definition: quad.c:2280
#define QUAD_1D_P21
Definition: quad.h:69
QUAD QUAD_3D_P4_
Definition: quad.c:1854
#define QUAD_3D_P6
Definition: quad.h:143
QUAD QUAD_2D_P7_
Definition: quad.c:475
#define QUAD_3D_P2
Definition: quad.h:135
QUAD QUAD_3D_P9_
Definition: quad.c:2018
#define QUAD_1D_P4
Definition: quad.h:44
#define QUAD_2D_P9
Definition: quad.h:89
#define QUAD_1D_P12
Definition: quad.h:56
QUAD QUAD_2D_P17_
Definition: quad.c:867
#define QUAD_3D_P5
Definition: quad.h:141
#define QUAD_1D_P13
Definition: quad.h:57
QUAD QUAD_2D_P23_
Definition: quad.c:1228
QUAD QUAD_3D_P11_
Definition: quad.c:2092
QUAD QUAD_2D_P14_
Definition: quad.c:722
QUAD QUAD_1D_P11_
Definition: quad.c:143
QUAD QUAD_2D_P16_
Definition: quad.c:813
QUAD QUAD_1D_P5_
Definition: quad.c:81
QUAD QUAD_2D_P6_
Definition: quad.c:436
QUAD QUAD_3D_P8_
Definition: quad.c:1986
QUAD QUAD_2D_P9_
Definition: quad.c:552
static QUAD *const QUAD_2D_TABLE[]
Definition: quad.h:175
#define QUAD_1D_P10
Definition: quad.h:53
QUAD QUAD_2D_P8_
Definition: quad.c:500
#define QUAD_1D_P19
Definition: quad.h:66
QUAD QUAD_1D_P21_
Definition: quad.c:261
#define QUAD_1D_P7
Definition: quad.h:48
#define QUAD_1D_P8
Definition: quad.h:50
#define QUAD_1D_P17
Definition: quad.h:63
QUAD QUAD_3D_P7_
Definition: quad.c:1956
QUAD QUAD_1D_P19_
Definition: quad.c:235
QUAD QUAD_2D_P22_
Definition: quad.c:1165
#define QUAD_2D_P28
Definition: quad.h:127
#define QUAD_2D_P13
Definition: quad.h:97
#define QUAD_2D_P25
Definition: quad.h:121
QUAD QUAD_2D_P25_
Definition: quad.c:1365
#define QUAD_2D_P27
Definition: quad.h:125
#define QUAD_2D_P23
Definition: quad.h:117
QUAD QUAD_2D_P29_
Definition: quad.c:1745
#define QUAD_1D_P15
Definition: quad.h:60
QUAD QUAD_1D_P3_
Definition: quad.c:62
QUAD QUAD_1D_P17_
Definition: quad.c:211
#define QUAD_1D_P9
Definition: quad.h:51
QUAD QUAD_2D_P24_
Definition: quad.c:1295
#define QUAD_3D_P11
Definition: quad.h:153
#define QUAD_2D_P8
Definition: quad.h:87
#define QUAD_2D_P1
Definition: quad.h:73
#define QUAD_3D_P9
Definition: quad.h:149
QUAD QUAD_2D_P3_
Definition: quad.c:326
#define QUAD_2D_P3
Definition: quad.h:77
#define QUAD_2D_P17
Definition: quad.h:105
QUAD QUAD_2D_P12_
Definition: quad.c:648
#define QUAD_1D_P6
Definition: quad.h:47
#define QUAD_2D_P14
Definition: quad.h:99
#define QUAD_1D_P1
Definition: quad.h:39
QUAD QUAD_3D_P5_
Definition: quad.c:1905
QUAD QUAD_2D_P18_
Definition: quad.c:924
QUAD QUAD_1D_P15_
Definition: quad.c:187
QUAD QUAD_2D_P27_
Definition: quad.c:1544
static QUAD *const QUAD_1D_TABLE[]
Definition: quad.h:164
QUAD QUAD_3D_P3_
Definition: quad.c:1813
#define QUAD_3D_P1
Definition: quad.h:133
QUAD QUAD_3D_P10_
Definition: quad.c:2052
#define QUAD_3D_P13
Definition: quad.h:157
QUAD QUAD_2D_P4_
Definition: quad.c:348
#define QUAD_1D_P11
Definition: quad.h:54
QUAD QUAD_1D_P7_
Definition: quad.c:101
QUAD QUAD_3D_P13_
Definition: quad.c:2230
QUAD QUAD_3D_P2_
Definition: quad.c:1780
static QUAD *const QUAD_3D_TABLE[]
Definition: quad.h:187
QUAD QUAD_3D_P6_
Definition: quad.c:1930
#define QUAD_3D_P10
Definition: quad.h:151
#define QUAD_3D_P7
Definition: quad.h:145
Definition: quad.h:25
double * points
Definition: quad.h:30
int order
Definition: quad.h:28
int dim
Definition: quad.h:27
double * weights
Definition: quad.h:31
char * name
Definition: quad.h:26
char id
Definition: quad.h:32
int npoints
Definition: quad.h:29