EquidistancePoint
This function returns the nodal coordinates of higher order triangle element
- the layout is always "VEFC"
- coordinates are distributed uniformly
- these coordinates can be used to construct lagrange polynomials
- the returned coordinates are in format.
- the node numbering is according to Gmsh convention, VEFC.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE RECURSIVE PURE FUNCTION EquidistancePoint_Triangle(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 = 3
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates in $x_{iJ}$ format
END FUNCTION EquidistancePoint_Triangle
END INTERFACE
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x(:,:)
"EquidistancePoint_Triangle"
Order less than or equal to 3.
order=1
x = EquidistancePoint_Triangle( order=order )
call display( TRANSPOSE(x), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=2
x = EquidistancePoint_Triangle( order=order )
call display( TRANSPOSE(x), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=3
x = EquidistancePoint_Triangle( order=order )
call display( TRANSPOSE(x), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
See results
xij (order=1)=
x1 | x2 | x3 |
---|---|---|
0.00000 | 0.00000 | 0.00000 |
1.00000 | 0.00000 | 0.00000 |
0.00000 | 1.00000 | 0.00000 |
xij (order=2)=
x1 | x2 | x3 |
---|---|---|
0.00000 | 0.00000 | 0.00000 |
1.00000 | 0.00000 | 0.00000 |
0.00000 | 1.00000 | 0.00000 |
0.50000 | 0.00000 | 0.00000 |
0.50000 | 0.50000 | 0.00000 |
0.00000 | 0.50000 | 0.00000 |
xij (order=3)=
x1 | x2 | x3 |
---|---|---|
0.00000 | 0.00000 | 0.00000 |
1.00000 | 0.00000 | 0.00000 |
0.00000 | 1.00000 | 0.00000 |
0.33333 | 0.00000 | 0.00000 |
0.66667 | 0.00000 | 0.00000 |
0.66667 | 0.33333 | 0.00000 |
0.33333 | 0.66667 | 0.00000 |
0.00000 | 0.66667 | 0.00000 |
0.00000 | 0.33333 | 0.00000 |
0.33333 | 0.33333 | 0.00000 |
"EquidistancePoint_Triangle"
Order greater than or equal to 4.
order=4
x = EquidistancePoint_Triangle( order=order )
call display( TRANSPOSE(x), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=5
x = EquidistancePoint_Triangle( order=order )
call display( TRANSPOSE(x), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
See results
xij (order=4)=
x1 | x2 | x3 |
---|---|---|
0.00000 | 0.00000 | 0.00000 |
1.00000 | 0.00000 | 0.00000 |
0.00000 | 1.00000 | 0.00000 |
0.25000 | 0.00000 | 0.00000 |
0.50000 | 0.00000 | 0.00000 |
0.75000 | 0.00000 | 0.00000 |
0.75000 | 0.25000 | 0.00000 |
0.50000 | 0.50000 | 0.00000 |
0.25000 | 0.75000 | 0.00000 |
0.00000 | 0.75000 | 0.00000 |
0.00000 | 0.50000 | 0.00000 |
0.00000 | 0.25000 | 0.00000 |
0.25000 | 0.25000 | 0.00000 |
0.50000 | 0.25000 | 0.00000 |
0.25000 | 0.50000 | 0.00000 |
xij (order=5)=
x1 | x2 | x3 |
---|---|---|
0.00000 | 0.00000 | 0.00000 |
1.00000 | 0.00000 | 0.00000 |
0.00000 | 1.00000 | 0.00000 |
0.20000 | 0.00000 | 0.00000 |
0.40000 | 0.00000 | 0.00000 |
0.60000 | 0.00000 | 0.00000 |
0.80000 | 0.00000 | 0.00000 |
0.80000 | 0.20000 | 0.00000 |
0.60000 | 0.40000 | 0.00000 |
0.40000 | 0.60000 | 0.00000 |
0.20000 | 0.80000 | 0.00000 |
0.00000 | 0.80000 | 0.00000 |
0.00000 | 0.60000 | 0.00000 |
0.00000 | 0.40000 | 0.00000 |
0.00000 | 0.20000 | 0.00000 |
0.20000 | 0.20000 | 0.00000 |
0.60000 | 0.20000 | 0.00000 |
0.20000 | 0.60000 | 0.00000 |
0.40000 | 0.20000 | 0.00000 |
0.40000 | 0.40000 | 0.00000 |
0.20000 | 0.40000 | 0.00000 |
end program main