Interpolation Nodes

Generic Shape-Based Interface

modepy.node_tuples_for_space(space: modepy.spaces.FunctionSpace)List[Tuple[int]]
modepy.node_tuples_for_space(space: modepy.spaces.PN)
modepy.node_tuples_for_space(space: modepy.spaces.QN)
modepy.equispaced_nodes_for_space(space: modepy.spaces.FunctionSpace, shape: modepy.shapes.Shape)
modepy.equispaced_nodes_for_space(space: modepy.spaces.PN, shape: modepy.shapes.Simplex)
modepy.equispaced_nodes_for_space(space: modepy.spaces.QN, shape: modepy.shapes.Hypercube)
modepy.edge_clustered_nodes_for_space(space: modepy.spaces.FunctionSpace, shape: modepy.shapes.Shape)
modepy.edge_clustered_nodes_for_space(space: modepy.spaces.PN, shape: modepy.shapes.Simplex)
modepy.edge_clustered_nodes_for_space(space: modepy.spaces.QN, shape: modepy.shapes.Hypercube)
modepy.random_nodes_for_shape(shape: modepy.shapes.Shape, nnodes: int, rng=None)
modepy.random_nodes_for_shape(shape: modepy.shapes.Simplex, nnodes: int, rng=None)
modepy.random_nodes_for_shape(shape: modepy.shapes.Hypercube, nnodes: int, rng=None)
Parameters

generator – a numpy.random.Generator.

Returns

a numpy.ndarray that returns an array of shape (dim, nnodes) of random nodes in the reference element.

Simplices

modepy.equidistant_nodes(dims, n, node_tuples=None)
Parameters
  • dims – dimensionality of desired simplex (e.g. 1, 2 or 3, for interval, triangle or tetrahedron).

  • n – Desired maximum total polynomial degree to interpolate.

  • node_tuples – a list of tuples of integers indicating the node order. Use default order if None, see pytools.generate_nonnegative_integer_tuples_summing_to_at_most().

Returns

An array of shape (dims, nnodes) containing bi-unit coordinates of the interpolation nodes. (see Coordinates on the triangle and Coordinates on the tetrahedron)

modepy.warp_and_blend_nodes(dims, n, node_tuples=None)

Return interpolation nodes as described in [warburton-nodes]

warburton-nodes

Warburton, T. “An Explicit Construction of Interpolation Nodes on the Simplex.” Journal of Engineering Mathematics 56, no. 3 (2006): 247-262. http://dx.doi.org/10.1007/s10665-006-9086-6

Parameters
  • dims – dimensionality of desired simplex (1, 2 or 3, i.e. interval, triangle or tetrahedron).

  • n – Desired maximum total polynomial degree to interpolate.

  • node_tuples – a list of tuples of integers indicating the node order. Use default order if None, see pytools.generate_nonnegative_integer_tuples_summing_to_at_most().

Returns

An array of shape (dims, nnodes) containing unit coordinates of the interpolation nodes. (see Coordinates on the triangle and Coordinates on the tetrahedron)

The generated nodes have benign Lebesgue constants. (See also modepy.tools.estimate_lebesgue_constant())

Also see modepy.VioreanuRokhlinSimplexQuadrature if nodes on the boundary are not required.

Hypercubes

modepy.tensor_product_nodes(dims_or_nodes, nodes_1d=None)
Returns

an array of shape (dims, nnodes_1d**dims).

New in version 2017.1.

Changed in version 2020.3: The node ordering has changed and is no longer documented.

modepy.legendre_gauss_lobatto_tensor_product_nodes(dims, n)