Add a lot more Witherden-Vincent rules.
This includes most of the even-degree rules.
For posterity: here's the script I used to print quadpy rules rather than
copying numbers individually:
import quadpy as qp
def format_16(x):
return '{:.16e}'.format(float(x))
def print_scheme(scheme):
sym_data = scheme.symmetry_data
print("// WV-{}, {}D".format(scheme.degree, scheme.dim))
for key in sym_data.keys():
if key == 'centroid' or key == 's4':
print("b_point_permutations.push_back({centroid});")
print("b_weights.push_back({});".format(format_16(sym_data[key][0][0])))
elif key == 'd3_aa' or key == 's31':
weights = [format_16(w) for w in sym_data[key][0]]
points = [format_16(p) for p in sym_data[key][1]]
assert len(weights) == len(points)
for i in range(len(weights)):
print("process_point_1({}, {});".format(points[i], weights[i]))
elif key == 'd3_ab' or key == 's211':
weights = [format_16(w) for w in sym_data[key][0]]
points1 = [format_16(p) for p in sym_data[key][1]]
points2 = [format_16(p) for p in sym_data[key][2]]
assert len(weights) == len(points1)
assert len(points2) == len(points1)
for i in range(len(weights)):
print(("process_point_3({},"
"\n {},"
"\n {});")
.format(points1[i], points2[i], weights[i]))
elif key == 's22':
assert scheme.dim == 3
weights = [format_16(w) for w in sym_data[key][0]]
points = [format_16(p) for p in sym_data[key][1]]
assert len(weights) == len(points)
for i in range(len(weights)):
print(("process_point_2({},"
"\n {});")
.format(points[i], weights[i]))
else:
assert False
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams