Skip to main content

LagrangeDegree

This subroutine returns the monomial degrees (basis) for lagrange polynomials.

Lagrange polynomial of order p,q,rp,q,r is given by

l(x,y,z)=span{xaybzca=0,1,,p;b=0,1,,q;c=0,1,,r}l(x,y,z) = \text{span} \left\{ x^{a} y^{b} z^{c} \vert a=0,1,\cdots, p; b=0, 1, \cdots, q; c=0,1,\cdots, r \right\}

Calling example:

degree = LagrangeDegree_Hexahedron(order)
degree = LagrangeDegree_Hexahedron(p, q, r)

Interface 1

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

Interface 2

INTERFACE LagrangeDegree_Hexahedron
MODULE PURE FUNCTION LagrangeDegree_Hexahedron2(p, q, r) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: p
INTEGER(I4B), INTENT(IN) :: q
INTEGER(I4B), INTENT(IN) :: r
INTEGER(I4B), ALLOCATABLE :: ans(:, :)
END FUNCTION LagrangeDegree_Hexahedron2
END INTERFACE LagrangeDegree_Hexahedron
p, q, r
  • p is order in x direction
  • q is order in y direction
  • r is order in z direction