Ejemplo n.º 1
0
    def nodes(self):
        """Generate warped nodes in unit coordinates (r,)."""

        if self.order == 0:
            return [numpy.array([0.5])]
        else:
            from hedge.quadrature import legendre_gauss_lobatto_points
            return [numpy.array([x])
                    for x in legendre_gauss_lobatto_points(self.order)]
Ejemplo n.º 2
0
    def __init__(self, N):
        from hedge.quadrature import legendre_gauss_lobatto_points
        from hedge.interpolation import newton_interpolation_function

        # Find lgl and equidistant interpolation points
        r_lgl = legendre_gauss_lobatto_points(N)
        r_eq = numpy.linspace(-1, 1, N + 1)

        self.int_f = newton_interpolation_function(r_eq, r_lgl - r_eq)
Ejemplo n.º 3
0
    def __init__(self, N):
        from hedge.quadrature import legendre_gauss_lobatto_points
        from hedge.interpolation import newton_interpolation_function

        # Find lgl and equidistant interpolation points
        r_lgl = legendre_gauss_lobatto_points(N)
        r_eq = numpy.linspace(-1, 1, N + 1)

        self.int_f = newton_interpolation_function(r_eq, r_lgl - r_eq)
Ejemplo n.º 4
0
    def nodes(self):
        """Generate warped nodes in unit coordinates (r,)."""

        if self.order == 0:
            return [numpy.array([0.5])]
        else:
            from hedge.quadrature import legendre_gauss_lobatto_points
            return [
                numpy.array([x])
                for x in legendre_gauss_lobatto_points(self.order)
            ]