EquidistancePoint
Returns the equidistance points on 1D/2D/3D elements.
The nodes are numbered as per the Gmsh convention.
Interface
- ܀ Interface
- ️܀ See example
- ️܀ See example
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION EquidistancePoint(order, xij, elemType) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
INTEGER(I4B), INTENT(IN) :: elemType
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION EquidistancePoint
END INTERFACE
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order, elemType
real(dfp), allocatable :: ans( :, : ), xij(:,:)
order=1; elemType=Line
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=2
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=3
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
end program main
See results
results
ans (order=1)=
------------------
-1.00000 1.00000
0.00000 0.00000
0.00000 0.00000
ans (order=2)=
----------------------------
-1.00000 1.00000 0.00000
0.00000 0.00000 0.00000
0.00000 0.00000 0.00000
ans (order=3)=
--------------------------------------
-1.00000 1.00000 -0.33333 0.33333
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order, elemType
real(dfp), allocatable :: ans( :, : ), xij(:,:)
order=1; elemType=Triangle
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=2
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=3
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
end program main
See results
results
ans (order=1)=
-------------------------
0.00000 1.00000 0.00000
0.00000 0.00000 1.00000
0.00000 0.00000 0.00000
ans (order=2)=
----------------------------------------------------
0.00000 1.00000 0.00000 0.50000 0.50000 0.00000
0.00000 0.00000 1.00000 0.00000 0.50000 0.50000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
ans (order=3)=
----------------------------------------------------------------------------------------
0.00000 1.00000 0.00000 0.33333 0.66667 0.66667 0.33333 0.00000 0.00000 0.33333
0.00000 0.00000 1.00000 0.00000 0.00000 0.33333 0.66667 0.66667 0.33333 0.33333
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order, elemType
real(dfp), allocatable :: ans( :, : ), xij(:,:)
order=1; elemType=Quadrangle
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=2
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=3
ans = EquidistancePoint(order=order, elemType=elemType)
call display( ans, "ans (order="//tostring(order)//")=" )
call blanklines(nol=2)
end program main
See results
results
ans (order=1)=
--------------------------------------
-1.00000 1.00000 1.00000 -1.00000
-1.00000 -1.00000 1.00000 1.00000
0.00000 0.00000 0.00000 0.00000
ans (order=2)=
----------------------------------------------------------------------------------------
-1.00000 1.00000 1.00000 -1.00000 0.00000 1.00000 0.00000 -1.00000 0.00000
-1.00000 -1.00000 1.00000 1.00000 -1.00000 0.00000 1.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
ans (order=3)=
--------------------------------------------------------------------------------------------------------------
------------------------------------------------
-1.00000 1.00000 1.00000 -1.00000 -0.33333 0.33333 1.00000 1.00000 0.33333 -0.33333 -1.00000
-1.00000 -0.33333 0.33333 0.33333 -0.33333
-1.00000 -1.00000 1.00000 1.00000 -1.00000 -1.00000 -0.33333 0.33333 1.00000 1.00000 0.33333
-0.33333 -0.33333 -0.33333 0.33333 0.33333
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000