InterpolationPoint
Returns interpolation points for lagrange polynomials on hexahedron.
The interpolation points are always returned in "VEFC" format.
- Vertex
- Edge
- Facet
- Cell
Interface 1
- ܀ Interface
- ️܀ Example 1
- Example 2
- Example 3
- ↢
INTERFACE InterpolationPoint_Hexahedron
MODULE FUNCTION InterpolationPoint_Hexahedron1(order, ipType, &
& layout, xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
INTEGER(I4B), INTENT(IN) :: ipType
CHARACTER(*), INTENT(IN) :: layout
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION InterpolationPoint_Hexahedron1
END INTERFACE InterpolationPoint_Hexahedron
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x(:,:)
type(string) :: astr
order=1
x = InterpolationPoint_Hexahedron( order=order, ipType=Equidistance, layout="VEFC" )
astr = "| no | $x_1$ | $x_2$ | $x_3$ |" // char_lf
astr = astr // mdencode( arange(1.0_DFP, real(size(x, 2), dfp) ) .colconcat. TRANSPOSE(x))
call display( astr%chars(), "xij (order="//tostring(order)//")=" // char_lf // char_lf )
end program main
See results
xij (order=1)=
| no | |||
|---|---|---|---|
| 1 | -1 | -1 | -1 |
| 2 | 1 | -1 | -1 |
| 3 | 1 | 1 | -1 |
| 4 | -1 | 1 | -1 |
| 5 | -1 | -1 | 1 |
| 6 | 1 | -1 | 1 |
| 7 | 1 | 1 | 1 |
| 8 | -1 | 1 | 1 |
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x(:,:)
type(string) :: astr
order=2
x = InterpolationPoint_Hexahedron( order=order, ipType=Equidistance, layout="VEFC" )
astr = "| no | $x_1$ | $x_2$ | $x_3$ |" // char_lf
astr = astr // mdencode( arange(1.0_DFP, real(size(x, 2), dfp) ) .colconcat. TRANSPOSE(x))
call display( astr%chars(), "xij (order="//tostring(order)//")=" // char_lf // char_lf )
end program main
See results
xij (order=2)=
| no | |||
|---|---|---|---|
| 1 | -1 | -1 | -1 |
| 2 | 1 | -1 | -1 |
| 3 | 1 | 1 | -1 |
| 4 | -1 | 1 | -1 |
| 5 | -1 | -1 | 1 |
| 6 | 1 | -1 | 1 |
| 7 | 1 | 1 | 1 |
| 8 | -1 | 1 | 1 |
| 9 | 0 | -1 | -1 |
| 10 | -1 | 0 | -1 |
| 11 | -1 | -1 | 0 |
| 12 | 1 | 0 | -1 |
| 13 | 1 | -1 | 0 |
| 14 | 0 | 1 | -1 |
| 15 | 1 | 1 | 0 |
| 16 | -1 | 1 | 0 |
| 17 | 0 | -1 | 1 |
| 18 | -1 | 0 | 1 |
| 19 | 1 | 0 | 1 |
| 20 | 0 | 1 | 1 |
| 21 | 0 | 0 | -1 |
| 22 | 0 | 0 | 1 |
| 23 | -1 | 0 | 0 |
| 24 | 1 | 0 | 0 |
| 25 | 0 | 1 | 0 |
| 26 | 0 | -1 | 0 |
| 27 | 0 | 0 | 0 |
PROGRAM main
USE easifembase
IMPLICIT NONE
INTEGER(i4b) :: i1, i2, order
REAL(dfp), ALLOCATABLE :: x(:, :)
TYPE(string) :: astr
order = 3
x = InterpolationPoint_Hexahedron( order=order, ipType=Equidistance, layout="VEFC" )
astr = "| no | $x_1$ | $x_2$ | $x_3$ |"//char_lf
astr = astr // mdencode( arange(1.0_DFP, real(size(x, 2), dfp) ) .colconcat. TRANSPOSE(x))
call display( astr%chars(), "xij (order="//tostring(order)//")=" // char_lf // char_lf )
END PROGRAM main
See results
xij (order=3)=
| no | |||
|---|---|---|---|
| 1 | -1 | -1 | -1 |
| 2 | 1 | -1 | -1 |
| 3 | 1 | 1 | -1 |
| 4 | -1 | 1 | -1 |
| 5 | -1 | -1 | 1 |
| 6 | 1 | -1 | 1 |
| 7 | 1 | 1 | 1 |
| 8 | -1 | 1 | 1 |
| 9 | -0.33333 | -1 | -1 |
| 10 | 0.33333 | -1 | -1 |
| 11 | -1 | -0.33333 | -1 |
| 12 | -1 | 0.33333 | -1 |
| 13 | -1 | -1 | -0.33333 |
| 14 | -1 | -1 | 0.33333 |
| 15 | 1 | -0.33333 | -1 |
| 16 | 1 | 0.33333 | -1 |
| 17 | 1 | -1 | -0.33333 |
| 18 | 1 | -1 | 0.33333 |
| 19 | 0.33333 | 1 | -1 |
| 20 | -0.33333 | 1 | -1 |
| 21 | 1 | 1 | -0.33333 |
| 22 | 1 | 1 | 0.33333 |
| 23 | -1 | 1 | -0.33333 |
| 24 | -1 | 1 | 0.33333 |
| 25 | -0.33333 | -1 | 1 |
| 26 | 0.33333 | -1 | 1 |
| 27 | -1 | -0.33333 | 1 |
| 28 | -1 | 0.33333 | 1 |
| 29 | 1 | -0.33333 | 1 |
| 30 | 1 | 0.33333 | 1 |
| 31 | 0.33333 | 1 | 1 |
| 32 | -0.33333 | 1 | 1 |
| 33 | -0.33333 | -0.33333 | -1 |
| 34 | -0.33333 | 0.33333 | -1 |
| 35 | 0.33333 | 0.33333 | -1 |
| 36 | 0.33333 | -0.33333 | -1 |
| 37 | -0.33333 | -0.33333 | 1 |
| 38 | 0.33333 | -0.33333 | 1 |
| 39 | 0.33333 | 0.33333 | 1 |
| 40 | -0.33333 | 0.33333 | 1 |
| 41 | -1 | -0.33333 | 0.33333 |
| 42 | -1 | -0.33333 | -0.33333 |
| 43 | -1 | 0.33333 | -0.33333 |
| 44 | -1 | 0.33333 | 0.33333 |
| 45 | 1 | -0.33333 | 0.33333 |
| 46 | 1 | 0.33333 | 0.33333 |
| 47 | 1 | 0.33333 | -0.33333 |
| 48 | 1 | -0.33333 | -0.33333 |
| 49 | 0.33333 | 1 | -0.33333 |
| 50 | -0.33333 | 1 | -0.33333 |
| 51 | -0.33333 | 1 | 0.33333 |
| 52 | 0.33333 | 1 | 0.33333 |
| 53 | -0.33333 | -1 | -0.33333 |
| 54 | 0.33333 | -1 | -0.33333 |
| 55 | 0.33333 | -1 | 0.33333 |
| 56 | -0.33333 | -1 | 0.33333 |
| 57 | -0.33333 | -0.33333 | -0.33333 |
| 58 | 0.33333 | -0.33333 | -0.33333 |
| 59 | 0.33333 | 0.33333 | -0.33333 |
| 60 | -0.33333 | 0.33333 | -0.33333 |
| 61 | -0.33333 | -0.33333 | 0.33333 |
| 62 | 0.33333 | -0.33333 | 0.33333 |
| 63 | 0.33333 | 0.33333 | 0.33333 |
| 64 | -0.33333 | 0.33333 | 0.33333 |
Interface 2
INTERFACE InterpolationPoint_Hexahedron
MODULE FUNCTION InterpolationPoint_Hexahedron2(p, q, r, ipType1, ipType2, &
& ipType3, xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: p
INTEGER(I4B), INTENT(IN) :: q
INTEGER(I4B), INTENT(IN) :: r
INTEGER(I4B), INTENT(IN) :: ipType1
INTEGER(I4B), INTENT(IN) :: ipType2
INTEGER(I4B), INTENT(IN) :: ipType3
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION InterpolationPoint_Hexahedron2
END INTERFACE InterpolationPoint_Hexahedron