Skip to main content

LagrangeDegree

Returns the polynomial space for constructing the Lagrange polynomials.

A Lagrange polynomial is given by

p(x,y)=a=0pb=0qxaybp(x,y) = \sum_{a=0}^{p}\sum_{b=0}^{q} x^{a} y^{b}

Here span of xaybx^{a}y^{b} is called the LagrangeDegree.

  • as are given by first column of ans.
  • bs are given by second column of ans.

For example for order = 2, we have the following degrees:

x0y0,x,x2,y,xy,x2y,y2,xy2,x2y2x^{0}y^{0}, x, x^2, y, xy, x^{2} y, y^{2}, x y^{2}, x^{2} y^{2}

which is representd by:

ab
00
10
20
01
11
21
02
12
22

Interface

INTERFACE
MODULE PURE FUNCTION LagrangeDegree_Quadrangle(order) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
INTEGER(I4B), ALLOCATABLE :: ans(:, :)
END FUNCTION LagrangeDegree_Quadrangle
END INTERFACE
order

Order of Lagrange polynomial

ans
  • The first col of ans denotes the exponent of x
  • The second col of ans denotes the exponent of y