EquidistancePoint
This subroutine returns the equidistance points in the Hexahedron.
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION EquidistancePoint_Hexahedron(order, xij) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! number of rows = 3
!! number of cols = 8
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates in $x_{iJ}$ format
END FUNCTION EquidistancePoint_Hexahedron
END INTERFACE
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x(:,:)
type(String) :: astr
order=1
x = EquidistancePoint_Hexahedron( order=order )
astr = "| no | $x_1$ | $x_2$ | $x_3$ |" // char_lf
astr = astr // mdencode( arange(1.0_DFP, (order+1.0_DFP)**3) .colconcat. TRANSPOSE(x))
call display( astr%chars(), "xij (order="//tostring(order)//")=" // char_lf // char_lf )
end program main
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 |
Interface 2
INTERFACE EquidistancePoint_Hexahedron
MODULE PURE FUNCTION EquidistancePoint_Hexahedron2(p, q, r, xij) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: p
!! order in x direction
INTEGER(I4B), INTENT(IN) :: q
!! order in y direction
INTEGER(I4B), INTENT(IN) :: r
!! order in z direction
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! number of rows = 3
!! number of cols = 8
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates in $x_{iJ}$ format
END FUNCTION EquidistancePoint_Hexahedron2
END INTERFACE EquidistancePoint_Hexahedron
p,q,r
order in x, y, and z direction.
xij
xij is the nodal coordinates of Hexahedron. The number of rows in xij
are 3, and number of columns in xij
is 8.