コード例 #1
0
ファイル: gmsh_reader.py プロジェクト: ww1g11/meshpy
    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
コード例 #2
0
ファイル: gmsh_reader.py プロジェクト: elomi1345/meshpy
    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
コード例 #3
0
ファイル: reader.py プロジェクト: 00mjk/gmsh_interop
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)
コード例 #4
0
ファイル: grid.py プロジェクト: ra2003/pyrticle
 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)
     ]
コード例 #5
0
ファイル: gmsh_reader.py プロジェクト: elomi1345/meshpy
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)
コード例 #6
0
ファイル: grid.py プロジェクト: gimac/pyrticle
 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)]