def lexicographic_node_tuples(self): """Generate tuples enumerating the node indices present in this element. Each tuple has a length equal to the dimension of the element. The tuples constituents are non-negative integers whose sum is less than or equal to the order of the element. """ from pytools import \ generate_nonnegative_integer_tuples_below result = list( generate_nonnegative_integer_tuples_below(self.order + 1, self.dimensions)) assert len(result) == self.node_count() return result
def lexicographic_node_tuples(self): """Generate tuples enumerating the node indices present in this element. Each tuple has a length equal to the dimension of the element. The tuples constituents are non-negative integers whose sum is less than or equal to the order of the element. """ from pytools import \ generate_nonnegative_integer_tuples_below result = list( generate_nonnegative_integer_tuples_below( self.order+1, self.dimensions)) assert len(result) == self.node_count() return result
def generate_quad_vertex_tuples(dim, order): from pytools import \ generate_nonnegative_integer_tuples_below for tup in generate_nonnegative_integer_tuples_below(2, dim): yield tuple(order * i for i in tup)
def make_legendre_basis(dimensions): from pytools import generate_nonnegative_integer_tuples_below return [ TensorProductLegendreBasisFunc(n) for n in generate_nonnegative_integer_tuples_below(dimensions) ]
def make_legendre_basis(dimensions): from pytools import generate_nonnegative_integer_tuples_below return [TensorProductLegendreBasisFunc(n) for n in generate_nonnegative_integer_tuples_below(dimensions)]