Interpolation Nodes¶

Coordinate systems on simplices¶

Coordinates on the triangle¶

Unit coordinates $$(r,s)$$:

C
|\
| \
|  O
|   \
|    \
A-----B

Vertices in unit coordinates:

O = (0,0)
A = (-1,-1)
B = (1,-1)
C = (-1,1)

Equilateral coordinates $$(x,y)$$:

C
/ \
/   \
/     \
/   O   \
/         \
A-----------B

Vertices in equilateral coordinates:

O = (0,0)
A = (-1,-1/sqrt(3))
B = (1,-1/sqrt(3))
C = (0,2/sqrt(3))

Coordinates on the tetrahedron¶

Unit coordinates $$(r,s,t)$$:

^ s
|
C
/|\
/ | \
/  |  \
/   |   \
/   O|    \
/   __A-----B---> r
/_--^ ___--^^
,D--^^^
t L

(squint, and it might start making sense…)

Vertices in unit coordinates:

O=( 0, 0, 0)
A=(-1,-1,-1)
B=(+1,-1,-1)
C=(-1,+1,-1)
D=(-1,-1,+1)

Vertices in equilateral coordinates $$(x,y,z)$$:

O = (0,0,0)
A = (-1,-1/sqrt(3),-1/sqrt(6))
B = ( 1,-1/sqrt(3),-1/sqrt(6))
C = ( 0, 2/sqrt(3),-1/sqrt(6))
D = ( 0,         0, 3/sqrt(6))

Transformations between coordinate systems¶

All of these expect and return arrays of shape (dims, npts).

modepy.tools.equilateral_to_unit(equi)
modepy.tools.barycentric_to_unit(bary)
Parameters

bary – shaped (dims+1,npoints)

modepy.tools.unit_to_barycentric(unit)
Parameters

unit – shaped (dims,npoints)

modepy.tools.barycentric_to_equilateral(bary)

Node sets for interpolation¶

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 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.