]> https://gitweb.dealii.org/ - dealii.git/commit
Add a lot more Witherden-Vincent rules. 12610/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 29 Jul 2021 16:21:54 +0000 (12:21 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 2 Aug 2021 11:44:36 +0000 (07:44 -0400)
commita14703d7f66dd2f3eb64c5959222b95bfe39d3ab
tree81af2cc688f1e11ef841b44df09afd6cb06f4f9f
parent04d0570c521c4d5395de65864dfadfbf0bfa6c95
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
doc/news/changes/minor/20210729DavidWells [new file with mode: 0644]
include/deal.II/base/quadrature_lib.h
source/base/quadrature_lib.cc
tests/simplex/q_witherden_vincent_01.cc
tests/simplex/q_witherden_vincent_01.output

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


Typeset in Trocchi and Trocchi Bold Sans Serif.