EquidistancePoint_Line
This function returns the equidistance points on edge.
note
This routine returns the points in "VEFC" format, which means xij(:,1:2)
are the end points, and xij(:, 3:)
are the internal points.
Interface
- ܀ Interface 1
- Interface 2
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION EquidistancePoint_Line(order, xij) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order
REAL(DFP), INTENT(IN) :: xij(2)
!! coorindates of point 1 and point 2
REAL(DFP), ALLOCATABLE :: ans(:)
!! equidistance points
END FUNCTION EquidistancePoint_Line
END INTERFACE
xij
xij(1)
is 1D coordinate of point 1.xij(2)
is 1D coordinate of point 2.
INTERFACE
MODULE PURE FUNCTION EquidistancePoint_Line(order, xij) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! coordinates of point 1 and point 2 in $x_{iJ}$ format
!! number of rows = nsd
!! number of cols = 2
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! equidistance points in $x_{iJ}$ format
END FUNCTION EquidistancePoint_Line
END INTERFACE
xij
xij(:, 1)
are coordinates of point 1.xij(:, 2)
are coordinates of point 2.
ans
- If
xij
is present, then number of rows inans
is same as the number of rows inxij
, otherwise it is 1. - The rows in
ans
denote the spatial components. - The points are arranged in VEFC order.
This function returns the points including the end points.
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x1( : ), x2( : ), x(:,:), ans(:,:)
integer(i4b), allocatable :: degree(:,:)
x = EquidistancePoint_Line( order=1 )
call display( x, "x = " )
x = EquidistancePoint_Line( order=2 )
call display( x, "x = " )
x = EquidistancePoint_Line( order=3 )
call display( x, "x = " )
end program main
See results
results
x =
------------------
-1.00000 1.00000
x =
----------------------------
-1.00000 1.00000 0.00000
x =
--------------------------------------
-1.00000 1.00000 -0.33333 0.33333