LagrangeDegree
This subroutine returns the monomial degrees (basis) for lagrange polynomials.
Lagrange polynomial of order is given by
Calling example:
degree = LagrangeDegree_Hexahedron(order)
degree = LagrangeDegree_Hexahedron(p, q, r)
Interface 1
- ܀ Interface
- ️܀ Example 1
- ܀ Example 2
- ↢
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
PROGRAM main
USE easifembase
IMPLICIT NONE
INTEGER(i4b) :: i1, i2, order
TYPE(string) :: astr
INTEGER(I4B), ALLOCATABLE :: deg(:, :)
order = 1
deg = LagrangeDegree_Hexahedron(order=order)
CALL display(mdencode(deg), "degrees: ")
END PROGRAM main
See results
degrees:
a | b | c |
---|---|---|
0 | 0 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 0 |
0 | 0 | 1 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 1 |
PROGRAM main
USE easifembase
IMPLICIT NONE
INTEGER(i4b) :: i1, i2, order
TYPE(string) :: astr
INTEGER(I4B), ALLOCATABLE :: deg(:, :)
order = 2
deg = LagrangeDegree_Hexahedron(order=order)
CALL display(mdencode(deg), "degrees: ")
END PROGRAM main
See results
degrees:
a | b | c |
---|---|---|
0 | 0 | 0 |
1 | 0 | 0 |
2 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 0 |
2 | 1 | 0 |
0 | 2 | 0 |
1 | 2 | 0 |
2 | 2 | 0 |
0 | 0 | 1 |
1 | 0 | 1 |
2 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 1 |
2 | 1 | 1 |
0 | 2 | 1 |
1 | 2 | 1 |
2 | 2 | 1 |
0 | 0 | 2 |
1 | 0 | 2 |
2 | 0 | 2 |
0 | 1 | 2 |
1 | 1 | 2 |
2 | 1 | 2 |
0 | 2 | 2 |
1 | 2 | 2 |
2 | 2 | 2 |
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
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 directionq
is order in y directionr
is order in z direction
PROGRAM main
USE easifembase
IMPLICIT NONE
INTEGER(i4b) :: i1, i2, p, q, r
TYPE(string) :: astr
INTEGER(I4B), ALLOCATABLE :: deg(:, :)
p = 2; q = 1; r = 1
deg = LagrangeDegree_Hexahedron(p, q, r)
CALL display(mdencode(deg), "degrees: ")
END PROGRAM main
See results
degrees:
a | b | c |
---|---|---|
0 | 0 | 0 |
1 | 0 | 0 |
2 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 0 |
2 | 1 | 0 |
0 | 0 | 1 |
1 | 0 | 1 |
2 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 1 |
2 | 1 | 1 |