6 September 2021 9:06:40.297 AM clenshaw_curtis_grid_test() FORTRAN90 version test clenshaw_curtis_grid(). test005(): cc_grid() returns a grid of Clenshaw-Curtis points. Here, we simply call for grids in the 1D case Spatial dimension of grid = 1 1 0.000000 1 -1.000000 2 1.000000 1 -1.000000 2 0.000000 3 1.000000 1 -1.000000 2 -0.500000 3 0.500000 4 1.000000 1 -1.000000 2 -0.707107 3 0.000000 4 0.707107 5 1.000000 1 -1.000000 2 -0.809017 3 -0.309017 4 0.309017 5 0.809017 6 1.000000 1 -1.000000 2 -0.866025 3 -0.500000 4 0.000000 5 0.500000 6 0.866025 7 1.000000 1 -1.000000 2 -0.900969 3 -0.623490 4 -0.222521 5 0.222521 6 0.623490 7 0.900969 8 1.000000 1 -1.000000 2 -0.923880 3 -0.707107 4 -0.382683 5 0.000000 6 0.382683 7 0.707107 8 0.923880 9 1.000000 1 -1.000000 2 -0.939693 3 -0.766044 4 -0.500000 5 -0.173648 6 0.173648 7 0.500000 8 0.766044 9 0.939693 10 1.000000 test01: CC_GRID returns a grid of Clenshaw-Curtis points. Here, we simply call for a specific grid. Spatial dimension of grid = 3 Total number of points in the grid = 24 I Q Grid orders: 1 9 3 4 2 Grid points: 1 -1.000000 -1.000000 -1.000000 2 -1.000000 -1.000000 1.000000 3 -1.000000 -0.500000 1.000000 4 -1.000000 -0.500000 -1.000000 5 -1.000000 0.500000 -1.000000 6 -1.000000 0.500000 1.000000 7 -1.000000 1.000000 1.000000 8 -1.000000 1.000000 -1.000000 9 0.000000 1.000000 -1.000000 10 0.000000 1.000000 1.000000 11 0.000000 0.500000 1.000000 12 0.000000 0.500000 -1.000000 13 0.000000 -0.500000 -1.000000 14 0.000000 -0.500000 1.000000 15 0.000000 -1.000000 1.000000 16 0.000000 -1.000000 -1.000000 17 1.000000 -1.000000 -1.000000 18 1.000000 -1.000000 1.000000 19 1.000000 -0.500000 1.000000 20 1.000000 -0.500000 -1.000000 21 1.000000 0.500000 -1.000000 22 1.000000 0.500000 1.000000 23 1.000000 1.000000 1.000000 24 1.000000 1.000000 -1.000000 test015: CC_GRID_INDEX returns an indexed grid of Clenshaw-Curtis points. Spatial dimension of grid = 3 Total number of points in the grid = 24 I Q Grid orders: 1 9 3 4 2 Grid indexed points: 1 0 0 0 2 0 0 1 3 0 1 1 4 0 1 0 5 0 2 0 6 0 2 1 7 0 3 1 8 0 3 0 9 1 3 0 10 1 3 1 11 1 2 1 12 1 2 0 13 1 1 0 14 1 1 1 15 1 0 1 16 1 0 0 17 2 0 0 18 2 0 1 19 2 1 1 20 2 1 0 21 2 2 0 22 2 2 1 23 2 3 1 24 2 3 0 test02: CC_GRIDS_MINMAX returns all Clenshaw Curtis grids whose Q value satisfies Q_MIN <= Q <= Q_MAX. Here, Q is the sum of the orders of the 1D rules, and Q_MIN = 3 Q_MAX = 5 Spatial dimension of grids = 2 Number of grids = 9 Number of points in the grids = 34 I Q Grid orders: 1 3 2 1 2 3 1 2 3 4 3 1 4 4 2 2 5 4 1 3 6 5 4 1 7 5 3 2 8 5 2 3 9 5 1 4 Grid points: 1 -1.000000 0.000000 2 1.000000 0.000000 3 0.000000 -1.000000 4 0.000000 1.000000 5 -1.000000 0.000000 6 0.000000 0.000000 7 1.000000 0.000000 8 -1.000000 -1.000000 9 -1.000000 1.000000 10 1.000000 1.000000 11 1.000000 -1.000000 12 0.000000 -1.000000 13 0.000000 0.000000 14 0.000000 1.000000 15 -1.000000 0.000000 16 -0.500000 0.000000 17 0.500000 0.000000 18 1.000000 0.000000 19 -1.000000 -1.000000 20 -1.000000 1.000000 21 0.000000 1.000000 22 0.000000 -1.000000 23 1.000000 -1.000000 24 1.000000 1.000000 25 -1.000000 -1.000000 26 -1.000000 0.000000 27 -1.000000 1.000000 28 1.000000 1.000000 29 1.000000 0.000000 30 1.000000 -1.000000 31 0.000000 -1.000000 32 0.000000 -0.500000 33 0.000000 0.500000 34 0.000000 1.000000 test025: CC_LEVELS_MINMAX returns all Clenshaw Curtis grids whose level value satisfies LEVEL_MIN <= LEVEL <= LEVEL_MAX. Here, LEVEL is the sum of the levels of the 1D rules, and the order of the rule is 2**LEVEL + 1. LEVEL_MIN = 2 LEVEL_MAX = 2 Spatial dimension of grids = 2 Number of grids = 3 Number of points in the grids = 19 Grid Level Grid Levels Grid orders: ---- ----- ------------ ------------ 1 2 2 0 5 1 2 2 1 1 3 3 3 2 0 2 1 5 Grid points: 1 -1.000000 0.000000 2 -0.707107 0.000000 3 0.000000 0.000000 4 0.707107 0.000000 5 1.000000 0.000000 6 -1.000000 -1.000000 7 -1.000000 0.000000 8 -1.000000 1.000000 9 0.000000 1.000000 10 0.000000 0.000000 11 0.000000 -1.000000 12 1.000000 -1.000000 13 1.000000 0.000000 14 1.000000 1.000000 15 0.000000 -1.000000 16 0.000000 -0.707107 17 0.000000 0.000000 18 0.000000 0.707107 19 0.000000 1.000000 LEVEL_MIN = 0 LEVEL_MAX = 3 Spatial dimension of grids = 2 Number of grids = 10 Number of points in the grids = 74 Grid Level Grid Levels Grid orders: ---- ----- ------------ ------------ 1 0 0 0 1 1 2 1 1 0 3 1 3 1 0 1 1 3 4 2 2 0 5 1 5 2 1 1 3 3 6 2 0 2 1 5 7 3 3 0 9 1 8 3 2 1 5 3 9 3 1 2 3 5 10 3 0 3 1 9 Grid points: 1 0.000000 0.000000 2 -1.000000 0.000000 3 0.000000 0.000000 4 1.000000 0.000000 5 0.000000 -1.000000 6 0.000000 0.000000 7 0.000000 1.000000 8 -1.000000 0.000000 9 -0.707107 0.000000 10 0.000000 0.000000 11 0.707107 0.000000 12 1.000000 0.000000 13 -1.000000 -1.000000 14 -1.000000 0.000000 15 -1.000000 1.000000 16 0.000000 1.000000 17 0.000000 0.000000 18 0.000000 -1.000000 19 1.000000 -1.000000 20 1.000000 0.000000 21 1.000000 1.000000 22 0.000000 -1.000000 23 0.000000 -0.707107 24 0.000000 0.000000 25 0.000000 0.707107 26 0.000000 1.000000 27 -1.000000 0.000000 28 -0.923880 0.000000 29 -0.707107 0.000000 30 -0.382683 0.000000 31 0.000000 0.000000 32 0.382683 0.000000 33 0.707107 0.000000 34 0.923880 0.000000 35 1.000000 0.000000 36 -1.000000 -1.000000 37 -1.000000 0.000000 38 -1.000000 1.000000 39 -0.707107 1.000000 40 -0.707107 0.000000 41 -0.707107 -1.000000 42 0.000000 -1.000000 43 0.000000 0.000000 44 0.000000 1.000000 45 0.707107 1.000000 46 0.707107 0.000000 47 0.707107 -1.000000 48 1.000000 -1.000000 49 1.000000 0.000000 50 1.000000 1.000000 51 -1.000000 -1.000000 52 -1.000000 -0.707107 53 -1.000000 0.000000 54 -1.000000 0.707107 55 -1.000000 1.000000 56 0.000000 1.000000 57 0.000000 0.707107 58 0.000000 0.000000 59 0.000000 -0.707107 60 0.000000 -1.000000 61 1.000000 -1.000000 62 1.000000 -0.707107 63 1.000000 0.000000 64 1.000000 0.707107 65 1.000000 1.000000 66 0.000000 -1.000000 67 0.000000 -0.923880 68 0.000000 -0.707107 69 0.000000 -0.382683 70 0.000000 0.000000 71 0.000000 0.382683 72 0.000000 0.707107 73 0.000000 0.923880 74 0.000000 1.000000 LEVEL_MIN = 3 LEVEL_MAX = 3 Spatial dimension of grids = 2 Number of grids = 4 Number of points in the grids = 48 Grid Level Grid Levels Grid orders: ---- ----- ------------ ------------ 1 3 3 0 9 1 2 3 2 1 5 3 3 3 1 2 3 5 4 3 0 3 1 9 Grid points: 1 -1.000000 0.000000 2 -0.923880 0.000000 3 -0.707107 0.000000 4 -0.382683 0.000000 5 0.000000 0.000000 6 0.382683 0.000000 7 0.707107 0.000000 8 0.923880 0.000000 9 1.000000 0.000000 10 -1.000000 -1.000000 11 -1.000000 0.000000 12 -1.000000 1.000000 13 -0.707107 1.000000 14 -0.707107 0.000000 15 -0.707107 -1.000000 16 0.000000 -1.000000 17 0.000000 0.000000 18 0.000000 1.000000 19 0.707107 1.000000 20 0.707107 0.000000 21 0.707107 -1.000000 22 1.000000 -1.000000 23 1.000000 0.000000 24 1.000000 1.000000 25 -1.000000 -1.000000 26 -1.000000 -0.707107 27 -1.000000 0.000000 28 -1.000000 0.707107 29 -1.000000 1.000000 30 0.000000 1.000000 31 0.000000 0.707107 32 0.000000 0.000000 33 0.000000 -0.707107 34 0.000000 -1.000000 35 1.000000 -1.000000 36 1.000000 -0.707107 37 1.000000 0.000000 38 1.000000 0.707107 39 1.000000 1.000000 40 0.000000 -1.000000 41 0.000000 -0.923880 42 0.000000 -0.707107 43 0.000000 -0.382683 44 0.000000 0.000000 45 0.000000 0.382683 46 0.000000 0.707107 47 0.000000 0.923880 48 0.000000 1.000000 test03: CC_GRIDS_CONSTRAINED returns all Clenshaw Curtis grids satisfying a set of constraints. ORDER(I), the order of the 1D rule in dimension I, is constrained by ORDER_MIN(I) <= ORDER(I) <= ORDER_MAX(I) We also define the total weighted order Q Q = ALPHA(1) * ORDER(1) + ... + ALPHA(N) * ORDER(N) and further constrain our grids to satisfy Q <= Q_MAX = 13.000000 Spatial dimension of grids = 2 Dimension Order_min Order_max Alpha 1 1 5 2.000000 2 1 5 3.000000 Number of grids = 10 Number of points in the grids = 36 I Q Grid orders: 1 5.000000 1 1 2 7.000000 2 1 3 9.000000 3 1 4 11.000000 4 1 5 13.000000 5 1 6 8.000000 1 2 7 10.000000 2 2 8 12.000000 3 2 9 11.000000 1 3 10 13.000000 2 3 Grid points: 1 0.000000 0.000000 2 -1.000000 0.000000 3 1.000000 0.000000 4 -1.000000 0.000000 5 0.000000 0.000000 6 1.000000 0.000000 7 -1.000000 0.000000 8 -0.500000 0.000000 9 0.500000 0.000000 10 1.000000 0.000000 11 -1.000000 0.000000 12 -0.707107 0.000000 13 0.000000 0.000000 14 0.707107 0.000000 15 1.000000 0.000000 16 0.000000 -1.000000 17 0.000000 1.000000 18 -1.000000 -1.000000 19 -1.000000 1.000000 20 1.000000 1.000000 21 1.000000 -1.000000 22 -1.000000 -1.000000 23 -1.000000 1.000000 24 0.000000 1.000000 25 0.000000 -1.000000 26 1.000000 -1.000000 27 1.000000 1.000000 28 0.000000 -1.000000 29 0.000000 0.000000 30 0.000000 1.000000 31 -1.000000 -1.000000 32 -1.000000 0.000000 33 -1.000000 1.000000 34 1.000000 1.000000 35 1.000000 0.000000 36 1.000000 -1.000000 test035: CC_LEVELS_CONSTRAINED returns all Clenshaw Curtis grids satisfying a set of constraints. The constraint on the levels of the 1D Clenshaw Curtis rule in spatial dimension I is: LEVEL_MIN(I) <= LEVEL(I) <= LEVEL_MAX(I) The constraint on the levels making up a rule is: Sum ( 1 <= I <= DIM_NUM ) ALPHA(I) * LEVEL(I) <= Q_MAX. where Q_MAX = 13.0000 The relationship of level to order is roughly ORDER = 2^LEVEL+1. Spatial dimension of grids = 2 Dimension Level_min Level_max Alpha 1 1 5 2.000000 2 1 5 3.000000 Number of grids = 10 Number of points in the grids = 358 I Q Grid level: 1 5.000000 1 1 2 7.000000 2 1 3 9.000000 3 1 4 11.000000 4 1 5 13.000000 5 1 6 8.000000 1 2 7 10.000000 2 2 8 12.000000 3 2 9 11.000000 1 3 10 13.000000 2 3 Grid points: 1 -1.000000 -1.000000 2 -1.000000 0.000000 3 -1.000000 1.000000 4 0.000000 1.000000 5 0.000000 0.000000 6 0.000000 -1.000000 7 1.000000 -1.000000 8 1.000000 0.000000 9 1.000000 1.000000 10 -1.000000 -1.000000 11 -1.000000 0.000000 12 -1.000000 1.000000 13 -0.707107 1.000000 14 -0.707107 0.000000 15 -0.707107 -1.000000 16 0.000000 -1.000000 17 0.000000 0.000000 18 0.000000 1.000000 19 0.707107 1.000000 20 0.707107 0.000000 21 0.707107 -1.000000 22 1.000000 -1.000000 23 1.000000 0.000000 24 1.000000 1.000000 25 -1.000000 -1.000000 26 -1.000000 0.000000 27 -1.000000 1.000000 28 -0.923880 1.000000 29 -0.923880 0.000000 30 -0.923880 -1.000000 31 -0.707107 -1.000000 32 -0.707107 0.000000 33 -0.707107 1.000000 34 -0.382683 1.000000 35 -0.382683 0.000000 36 -0.382683 -1.000000 37 0.000000 -1.000000 38 0.000000 0.000000 39 0.000000 1.000000 40 0.382683 1.000000 41 0.382683 0.000000 42 0.382683 -1.000000 43 0.707107 -1.000000 44 0.707107 0.000000 45 0.707107 1.000000 46 0.923880 1.000000 47 0.923880 0.000000 48 0.923880 -1.000000 49 1.000000 -1.000000 50 1.000000 0.000000 51 1.000000 1.000000 52 -1.000000 -1.000000 53 -1.000000 0.000000 54 -1.000000 1.000000 55 -0.980785 1.000000 56 -0.980785 0.000000 57 -0.980785 -1.000000 58 -0.923880 -1.000000 59 -0.923880 0.000000 60 -0.923880 1.000000 61 -0.831470 1.000000 62 -0.831470 0.000000 63 -0.831470 -1.000000 64 -0.707107 -1.000000 65 -0.707107 0.000000 66 -0.707107 1.000000 67 -0.555570 1.000000 68 -0.555570 0.000000 69 -0.555570 -1.000000 70 -0.382683 -1.000000 71 -0.382683 0.000000 72 -0.382683 1.000000 73 -0.195090 1.000000 74 -0.195090 0.000000 75 -0.195090 -1.000000 76 0.000000 -1.000000 77 0.000000 0.000000 78 0.000000 1.000000 79 0.195090 1.000000 80 0.195090 0.000000 81 0.195090 -1.000000 82 0.382683 -1.000000 83 0.382683 0.000000 84 0.382683 1.000000 85 0.555570 1.000000 86 0.555570 0.000000 87 0.555570 -1.000000 88 0.707107 -1.000000 89 0.707107 0.000000 90 0.707107 1.000000 91 0.831470 1.000000 92 0.831470 0.000000 93 0.831470 -1.000000 94 0.923880 -1.000000 95 0.923880 0.000000 96 0.923880 1.000000 97 0.980785 1.000000 98 0.980785 0.000000 99 0.980785 -1.000000 100 1.000000 -1.000000 101 1.000000 0.000000 102 1.000000 1.000000 103 -1.000000 -1.000000 104 -1.000000 0.000000 105 -1.000000 1.000000 106 -0.995185 1.000000 107 -0.995185 0.000000 108 -0.995185 -1.000000 109 -0.980785 -1.000000 110 -0.980785 0.000000 111 -0.980785 1.000000 112 -0.956940 1.000000 113 -0.956940 0.000000 114 -0.956940 -1.000000 115 -0.923880 -1.000000 116 -0.923880 0.000000 117 -0.923880 1.000000 118 -0.881921 1.000000 119 -0.881921 0.000000 120 -0.881921 -1.000000 121 -0.831470 -1.000000 122 -0.831470 0.000000 123 -0.831470 1.000000 124 -0.773010 1.000000 125 -0.773010 0.000000 126 -0.773010 -1.000000 127 -0.707107 -1.000000 128 -0.707107 0.000000 129 -0.707107 1.000000 130 -0.634393 1.000000 131 -0.634393 0.000000 132 -0.634393 -1.000000 133 -0.555570 -1.000000 134 -0.555570 0.000000 135 -0.555570 1.000000 136 -0.471397 1.000000 137 -0.471397 0.000000 138 -0.471397 -1.000000 139 -0.382683 -1.000000 140 -0.382683 0.000000 141 -0.382683 1.000000 142 -0.290285 1.000000 143 -0.290285 0.000000 144 -0.290285 -1.000000 145 -0.195090 -1.000000 146 -0.195090 0.000000 147 -0.195090 1.000000 148 -0.098017 1.000000 149 -0.098017 0.000000 150 -0.098017 -1.000000 151 0.000000 -1.000000 152 0.000000 0.000000 153 0.000000 1.000000 154 0.098017 1.000000 155 0.098017 0.000000 156 0.098017 -1.000000 157 0.195090 -1.000000 158 0.195090 0.000000 159 0.195090 1.000000 160 0.290285 1.000000 161 0.290285 0.000000 162 0.290285 -1.000000 163 0.382683 -1.000000 164 0.382683 0.000000 165 0.382683 1.000000 166 0.471397 1.000000 167 0.471397 0.000000 168 0.471397 -1.000000 169 0.555570 -1.000000 170 0.555570 0.000000 171 0.555570 1.000000 172 0.634393 1.000000 173 0.634393 0.000000 174 0.634393 -1.000000 175 0.707107 -1.000000 176 0.707107 0.000000 177 0.707107 1.000000 178 0.773010 1.000000 179 0.773010 0.000000 180 0.773010 -1.000000 181 0.831470 -1.000000 182 0.831470 0.000000 183 0.831470 1.000000 184 0.881921 1.000000 185 0.881921 0.000000 186 0.881921 -1.000000 187 0.923880 -1.000000 188 0.923880 0.000000 189 0.923880 1.000000 190 0.956940 1.000000 191 0.956940 0.000000 192 0.956940 -1.000000 193 0.980785 -1.000000 194 0.980785 0.000000 195 0.980785 1.000000 196 0.995185 1.000000 197 0.995185 0.000000 198 0.995185 -1.000000 199 1.000000 -1.000000 200 1.000000 0.000000 201 1.000000 1.000000 202 -1.000000 -1.000000 203 -1.000000 -0.707107 204 -1.000000 0.000000 205 -1.000000 0.707107 206 -1.000000 1.000000 207 0.000000 1.000000 208 0.000000 0.707107 209 0.000000 0.000000 210 0.000000 -0.707107 211 0.000000 -1.000000 212 1.000000 -1.000000 213 1.000000 -0.707107 214 1.000000 0.000000 215 1.000000 0.707107 216 1.000000 1.000000 217 -1.000000 -1.000000 218 -1.000000 -0.707107 219 -1.000000 0.000000 220 -1.000000 0.707107 221 -1.000000 1.000000 222 -0.707107 1.000000 223 -0.707107 0.707107 224 -0.707107 0.000000 225 -0.707107 -0.707107 226 -0.707107 -1.000000 227 0.000000 -1.000000 228 0.000000 -0.707107 229 0.000000 0.000000 230 0.000000 0.707107 231 0.000000 1.000000 232 0.707107 1.000000 233 0.707107 0.707107 234 0.707107 0.000000 235 0.707107 -0.707107 236 0.707107 -1.000000 237 1.000000 -1.000000 238 1.000000 -0.707107 239 1.000000 0.000000 240 1.000000 0.707107 241 1.000000 1.000000 242 -1.000000 -1.000000 243 -1.000000 -0.707107 244 -1.000000 0.000000 245 -1.000000 0.707107 246 -1.000000 1.000000 247 -0.923880 1.000000 248 -0.923880 0.707107 249 -0.923880 0.000000 250 -0.923880 -0.707107 251 -0.923880 -1.000000 252 -0.707107 -1.000000 253 -0.707107 -0.707107 254 -0.707107 0.000000 255 -0.707107 0.707107 256 -0.707107 1.000000 257 -0.382683 1.000000 258 -0.382683 0.707107 259 -0.382683 0.000000 260 -0.382683 -0.707107 261 -0.382683 -1.000000 262 0.000000 -1.000000 263 0.000000 -0.707107 264 0.000000 0.000000 265 0.000000 0.707107 266 0.000000 1.000000 267 0.382683 1.000000 268 0.382683 0.707107 269 0.382683 0.000000 270 0.382683 -0.707107 271 0.382683 -1.000000 272 0.707107 -1.000000 273 0.707107 -0.707107 274 0.707107 0.000000 275 0.707107 0.707107 276 0.707107 1.000000 277 0.923880 1.000000 278 0.923880 0.707107 279 0.923880 0.000000 280 0.923880 -0.707107 281 0.923880 -1.000000 282 1.000000 -1.000000 283 1.000000 -0.707107 284 1.000000 0.000000 285 1.000000 0.707107 286 1.000000 1.000000 287 -1.000000 -1.000000 288 -1.000000 -0.923880 289 -1.000000 -0.707107 290 -1.000000 -0.382683 291 -1.000000 0.000000 292 -1.000000 0.382683 293 -1.000000 0.707107 294 -1.000000 0.923880 295 -1.000000 1.000000 296 0.000000 1.000000 297 0.000000 0.923880 298 0.000000 0.707107 299 0.000000 0.382683 300 0.000000 0.000000 301 0.000000 -0.382683 302 0.000000 -0.707107 303 0.000000 -0.923880 304 0.000000 -1.000000 305 1.000000 -1.000000 306 1.000000 -0.923880 307 1.000000 -0.707107 308 1.000000 -0.382683 309 1.000000 0.000000 310 1.000000 0.382683 311 1.000000 0.707107 312 1.000000 0.923880 313 1.000000 1.000000 314 -1.000000 -1.000000 315 -1.000000 -0.923880 316 -1.000000 -0.707107 317 -1.000000 -0.382683 318 -1.000000 0.000000 319 -1.000000 0.382683 320 -1.000000 0.707107 321 -1.000000 0.923880 322 -1.000000 1.000000 323 -0.707107 1.000000 324 -0.707107 0.923880 325 -0.707107 0.707107 326 -0.707107 0.382683 327 -0.707107 0.000000 328 -0.707107 -0.382683 329 -0.707107 -0.707107 330 -0.707107 -0.923880 331 -0.707107 -1.000000 332 0.000000 -1.000000 333 0.000000 -0.923880 334 0.000000 -0.707107 335 0.000000 -0.382683 336 0.000000 0.000000 337 0.000000 0.382683 338 0.000000 0.707107 339 0.000000 0.923880 340 0.000000 1.000000 341 0.707107 1.000000 342 0.707107 0.923880 343 0.707107 0.707107 344 0.707107 0.382683 345 0.707107 0.000000 346 0.707107 -0.382683 347 0.707107 -0.707107 348 0.707107 -0.923880 349 0.707107 -1.000000 350 1.000000 -1.000000 351 1.000000 -0.923880 352 1.000000 -0.707107 353 1.000000 -0.382683 354 1.000000 0.000000 355 1.000000 0.382683 356 1.000000 0.707107 357 1.000000 0.923880 358 1.000000 1.000000 test04 CLENSHAW_CURTIS_COMPUTE computes a Clenshaw-Curtis quadrature rule over [-1,1] of given order. Order W X 1 2.00000 0.00000 2 1.00000 -1.00000 1.00000 1.00000 3 0.333333 -1.00000 1.33333 0.612323E-16 0.333333 1.00000 4 0.111111 -1.00000 0.888889 -0.500000 0.888889 0.500000 0.111111 1.00000 5 0.666667E-01 -1.00000 0.533333 -0.707107 0.800000 0.612323E-16 0.533333 0.707107 0.666667E-01 1.00000 6 0.400000E-01 -1.00000 0.360743 -0.809017 0.599257 -0.309017 0.599257 0.309017 0.360743 0.809017 0.400000E-01 1.00000 7 0.285714E-01 -1.00000 0.253968 -0.866025 0.457143 -0.500000 0.520635 0.612323E-16 0.457143 0.500000 0.253968 0.866025 0.285714E-01 1.00000 8 0.204082E-01 -1.00000 0.190141 -0.900969 0.352242 -0.623490 0.437208 -0.222521 0.437208 0.222521 0.352242 0.623490 0.190141 0.900969 0.204082E-01 1.00000 9 0.158730E-01 -1.00000 0.146219 -0.923880 0.279365 -0.707107 0.361718 -0.382683 0.393651 0.612323E-16 0.361718 0.382683 0.279365 0.707107 0.146219 0.923880 0.158730E-01 1.00000 10 0.123457E-01 -1.00000 0.116567 -0.939693 0.225284 -0.766044 0.301940 -0.500000 0.343863 -0.173648 0.343863 0.173648 0.301940 0.500000 0.225284 0.766044 0.116567 0.939693 0.123457E-01 1.00000 test045 To compute a single Clenshaw Curtis weight or abscissa, CC_ABSCISSA computes one abscissa, CC_WEIGHT computes one weight. We use these routines wastefully, to compute the order 10 rule one value at a time. Order W X 10 0.123457E-01 -1.00000 0.116567 -0.939693 0.225284 -0.766044 0.301940 -0.500000 0.343863 -0.173648 0.343863 0.173648 0.301940 0.500000 0.225284 0.766044 0.116567 0.939693 0.123457E-01 1.00000 test05 CLENSHAW_CURTIS_COMPUTE computes a Clenshaw-Curtis rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.16000000 2.22222222 1.41421356 2 1.75866376 0.68965517 1.93185165 3 0.47955459 1.71136654 1.58675959 4 0.47955522 1.54283683 1.10353909 5 0.47937747 1.58133055 1.52315499 6 0.47942189 1.58445603 1.49143172 7 0.47942823 1.58181358 1.33096469 8 0.47942823 1.58229588 1.48396077 9 0.47942823 1.58222119 1.47649450 10 0.47942823 1.58222813 1.39130645 11 0.47942823 1.58223497 1.47392140 12 0.47942823 1.58223327 1.47058914 13 0.47942823 1.58223287 1.41540931 14 0.47942823 1.58223293 1.46933544 15 0.47942823 1.58223296 1.46761402 16 0.47942823 1.58223297 1.42831609 Exact 0.47942823 1.58223296 1.46044713 test06 CLENSHAW_CURTIS_SET sets up a Clenshaw-Curtis rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.16000000 2.22222222 1.41421356 2 1.75866376 0.68965517 1.93185165 3 0.47955459 1.71136654 1.58675959 4 0.47955522 1.54283683 1.10353907 5 0.47937747 1.58133055 1.52315499 6 0.47942189 1.58445603 1.49143172 7 0.47942823 1.58181358 1.33096468 8 0.47942823 1.58229588 1.48396077 9 0.47942823 1.58222119 1.47649450 10 0.47942823 1.58222813 1.39130644 11 0.47942823 1.58223497 1.47392140 12 0.47942823 1.58223327 1.47058914 13 0.47942823 1.58223287 1.41540930 14 0.47942823 1.58223293 1.46933544 15 0.47942823 1.58223296 1.46761402 16 0.47942823 1.58223297 1.42831609 Exact 0.47942823 1.58223296 1.46044713 test07 r8table_write0() writes a Clenshaw-Curtis quadrature rule to a file. Spatial dimension = 1 Computing the rule of order = 9 Write abscissas to file "cc_d1_o9_x.txt". Write weights to file "cc_d1_o9_w.txt". Write range to file "cc_d1_o9_r.txt". test08 CLENSHAW_CURTIS_COMPUTE_ND computes a multidimensional Clenshaw-Curtis quadrature rule over the hypercube [-1,1]^ND of given (possibly different) orders in each dimension. In this example, we use the SAME ORDER in all dimensions. Spatial dimension DIM_NUM = 2 1D orders = 5 5 Number of points = 25 Weight X(1) X(2) -------------- -------------- -------------- 0.444444E-02 -1.00000 -1.00000 0.355556E-01 -1.00000 -0.707107 0.533333E-01 -1.00000 0.612323E-16 0.355556E-01 -1.00000 0.707107 0.444444E-02 -1.00000 1.00000 0.355556E-01 -0.707107 -1.00000 0.284444 -0.707107 -0.707107 0.426667 -0.707107 0.612323E-16 0.284444 -0.707107 0.707107 0.355556E-01 -0.707107 1.00000 0.533333E-01 0.612323E-16 -1.00000 0.426667 0.612323E-16 -0.707107 0.640000 0.612323E-16 0.612323E-16 0.426667 0.612323E-16 0.707107 0.533333E-01 0.612323E-16 1.00000 0.355556E-01 0.707107 -1.00000 0.284444 0.707107 -0.707107 0.426667 0.707107 0.612323E-16 0.284444 0.707107 0.707107 0.355556E-01 0.707107 1.00000 0.444444E-02 1.00000 -1.00000 0.355556E-01 1.00000 -0.707107 0.533333E-01 1.00000 0.612323E-16 0.355556E-01 1.00000 0.707107 0.444444E-02 1.00000 1.00000 4.00000 test09 CLENSHAW_CURTIS_COMPUTE_ND computes a multidimensional Clenshaw-Curtis quadrature rule over the hypercube [-1,1]^ND of given (possibly different) orders in each dimension. In this example, we use DIFFERENT ORDERS in each dimension. Spatial dimension DIM_NUM = 3 1D orders = 2 4 3 Number of points = 24 Weight X(1) X(2) X(3) -------------- -------------- -------------- -------------- 0.370370E-01 -1.00000 -1.00000 -1.00000 0.148148 -1.00000 -1.00000 0.612323E-16 0.370370E-01 -1.00000 -1.00000 1.00000 0.296296 -1.00000 -0.500000 -1.00000 1.18519 -1.00000 -0.500000 0.612323E-16 0.296296 -1.00000 -0.500000 1.00000 0.296296 -1.00000 0.500000 -1.00000 1.18519 -1.00000 0.500000 0.612323E-16 0.296296 -1.00000 0.500000 1.00000 0.370370E-01 -1.00000 1.00000 -1.00000 0.148148 -1.00000 1.00000 0.612323E-16 0.370370E-01 -1.00000 1.00000 1.00000 0.370370E-01 1.00000 -1.00000 -1.00000 0.148148 1.00000 -1.00000 0.612323E-16 0.370370E-01 1.00000 -1.00000 1.00000 0.296296 1.00000 -0.500000 -1.00000 1.18519 1.00000 -0.500000 0.612323E-16 0.296296 1.00000 -0.500000 1.00000 0.296296 1.00000 0.500000 -1.00000 1.18519 1.00000 0.500000 0.612323E-16 0.296296 1.00000 0.500000 1.00000 0.370370E-01 1.00000 1.00000 -1.00000 0.148148 1.00000 1.00000 0.612323E-16 0.370370E-01 1.00000 1.00000 1.00000 8.00000 test10 Use r8table_write() to write out a multidimensional rule. CLENSHAW_CURTIS_COMPUTE_ND computes a multidimensional Clenshaw-Curtis quadrature rule over the hypercube [-1,1]^ND of given (possibly different) orders in each dimension. In this example, we use the SAME ORDER in all dimensions. Spatial dimension DIM_NUM = 4 1D orders = 3 3 3 3 Number of points = 81 Write abscissas to file "cc_d4_o3x3x3x3_x.txt". Write weights to file "cc_d4_o3x3x3x3_w.txt". Write range to file "cc_d4_o3x3x3x3_r.txt". test11 CC_ABSCISSA_LEVEL_1D reports the level on which a Clenshaw Curtis abscissa of given index will first be generated, assuming a series of grids that grow in order as 2**LEVEL+1. Base B = 5 ORDER 2^B+1 = 33 I Level(I) 0 1 1 5 2 4 3 5 4 3 5 5 6 4 7 5 8 2 9 5 10 4 11 5 12 3 13 5 14 4 15 5 16 0 17 5 18 4 19 5 20 3 21 5 22 4 23 5 24 2 25 5 26 4 27 5 28 3 29 5 30 4 31 5 32 1 test12 CC_ABSCISSA_LEVEL_1D can also be called for values outside the standard range of 0 through 2**LEVEL_MAX. In that case, a MOD operation is applied first, to make a sensible result. Base B = 5 ORDER = 2^B+1 = 33 I Mod(I,O) Level(I) 65 32 1 44 11 5 10 10 4 21 21 5 26 26 4 57 24 2 41 8 2 99 0 1 -18 15 5 0 0 1 33 0 1 -18 15 5 80 14 4 -16 17 5 -12 21 5 13 13 5 16 16 0 50 17 5 -9 24 2 35 2 4 test13 CC_ABSCISSA_LEVEL_ND reports the level on which a Clenshaw Curtis abscissa of given index will first be generated, assuming a series of grids that grow in order as 2**LEVEL+1. This routine is applied for multidimensional cases. Base B = 3 ORDER 2**B+1 = 9 DIM_NUM = 2 I J Level(I,J) 0 0 2 0 1 4 0 2 3 0 3 4 0 4 1 0 5 4 0 6 3 0 7 4 0 8 2 1 0 4 1 1 6 1 2 5 1 3 6 1 4 3 1 5 6 1 6 5 1 7 6 1 8 4 2 0 3 2 1 5 2 2 4 2 3 5 2 4 2 2 5 5 2 6 4 2 7 5 2 8 3 3 0 4 3 1 6 3 2 5 3 3 6 3 4 3 3 5 6 3 6 5 3 7 6 3 8 4 4 0 1 4 1 3 4 2 2 4 3 3 4 4 0 4 5 3 4 6 2 4 7 3 4 8 1 5 0 4 5 1 6 5 2 5 5 3 6 5 4 3 5 5 6 5 6 5 5 7 6 5 8 4 6 0 3 6 1 5 6 2 4 6 3 5 6 4 2 6 5 5 6 6 4 6 7 5 6 8 3 7 0 4 7 1 6 7 2 5 7 3 6 7 4 3 7 5 6 7 6 5 7 7 6 7 8 4 8 0 2 8 1 4 8 2 3 8 3 4 8 4 1 8 5 4 8 6 3 8 7 4 8 8 2 clenshaw_curtis_grid_test(): Normal end of execution. 6 September 2021 9:06:40.299 AM