예제 #1
0
 def create_data():
     latticeK = 2
     n = 1
     order = 2
     E = reference_element.DefaultTetrahedron()
     pts = reference_element.make_lattice(E.get_vertices(), latticeK)
     F = expansions.TetrahedronExpansionSet(E)
     return F.tabulate_jet(n, pts, order)
예제 #2
0
 def create_data():
     E = reference_element.DefaultTriangle()
     k = 3
     pts = reference_element.make_lattice(E.get_vertices(), k)
     Phis = expansions.get_expansion_set(E)
     phis = Phis.tabulate(k, pts)
     dphis = Phis.tabulate_derivatives(k, pts)
     return phis, dphis
예제 #3
0
 def create_data():
     E = reference_element.DefaultTriangle()
     k = 3
     pts = reference_element.make_lattice(E.get_vertices(), k)
     Phis = expansions.get_expansion_set(E)
     phis = Phis.tabulate(k, pts)
     dphis = Phis.tabulate_derivatives(k, pts)
     return phis, dphis
예제 #4
0
 def create_data():
     latticeK = 2
     n = 1
     order = 2
     E = reference_element.DefaultTetrahedron()
     pts = reference_element.make_lattice(E.get_vertices(), latticeK)
     F = expansions.TetrahedronExpansionSet(E)
     return F.tabulate_jet(n, pts, order)
예제 #5
0
def test_pw_dual(element):
    deg = element.degree()
    ref_el = element.ref_el
    poly_set = element.poly_set
    pts = make_lattice(ref_el.vertices, deg)

    assert numpy.allclose(element.dual.to_riesz(poly_set),
                          cpd(element, pts).to_riesz(poly_set))