-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcc_d1_o2_exact.txt
59 lines (41 loc) · 1.3 KB
/
cc_d1_o2_exact.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
25 January 2008 03:42:42 PM
INT_EXACTNESS
C++ version
Investigate the polynomial exactness of a
quadrature rule by integrating all
monomials up to a given degree over the [0,+1] interval.
If necessary, the rule is adjusted to the [0,1] interval.
INT_EXACTNESS: User input:
Quadrature rule X file = "cc_d1_o2_x.txt".
Quadrature rule W file = "cc_d1_o2_w.txt".
Quadrature rule R file = "cc_d1_o2_r.txt".
Maximum degree to check = 5
Spatial dimension = 1
Number of points = 2
The quadrature rule to be tested:
ORDER = 2
Standard rule:
Integral ( R[0] <= x <= R[1] ) f(x) dx
is to be approximated by
sum ( 1 <= I <= ORDER ) w(i) * f(x(i)).
Weights W:
w[ 0] = 1
w[ 1] = 1
Abscissas X:
x[ 0] = -1
x[ 1] = 1
Region R:
r[ 0] = -1
r[ 1] = 1
A Gauss-Legendre rule would be able to exactly
integrate monomials up to and including degree = 3
Error Degree
0 0
0 1
0.5000000000000001 2
1 3
1.5 4
2 5
INT_EXACTNESS:
Normal end of execution.
25 January 2008 03:42:42 PM