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 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE RECURSIVE PURE FUNCTION EquidistancePoint_Quadrangle(order, xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! Nodal coordinates of quadrangle
!! number of rows = 2
!! number of cols = 4
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates of interpolation points in $x_{iJ}$ format.
!! Number of rows in ans is equal to the 2
!! Number of columns in ans is equal to the number of points
END FUNCTION EquidistancePoint_Quadrangle
END INTERFACE
order
Order of Lagrange polynomials in x and y directions.
xij
Nodal coordinates of quadrangle, the number of rows in xij is 2, and the number of columns in xij is 4.
ans
Returns coordinates of interpolation points in format. Number of rows in the ans is equal to the 2. Number of columns in the ans is equal to the number of points
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
real( dfp ), allocatable :: x(:,:)
order=1
x = EquidistancePoint_Quadrangle( order=order )
call display( mdencode(TRANSPOSE(x)) , "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=2
x = EquidistancePoint_Quadrangle( order=order )
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
order=3
x = EquidistancePoint_Quadrangle( order=order )
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring(order)//")=" )
call blanklines(nol=2)
end program main
See results
xij (order=1)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
xij (order=2)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
0 | -1 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
-1 | 0 | 0 |
0 | 0 | 0 |
xij (order=3)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
-0.33333 | -1 | 0 |
0.33333 | -1 | 0 |
1 | -0.33333 | 0 |
1 | 0.33333 | 0 |
0.33333 | 1 | 0 |
-0.33333 | 1 | 0 |
-1 | 0.33333 | 0 |
-1 | -0.33333 | 0 |
-0.33333 | -0.33333 | 0 |
0.33333 | -0.33333 | 0 |
0.33333 | 0.33333 | 0 |
-0.33333 | 0.33333 | 0 |
Interface 2
- ܀ Interface
- ️܀ Example 1
- ܀ Example 2
- ܀ Example 3
- ↢
INTERFACE EquidistancePoint_Quadrangle
MODULE RECURSIVE PURE FUNCTION EquidistancePoint_Quadrangle2(p, q, &
& xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: p
!! order in x direction
INTEGER(I4B), INTENT(IN) :: q
!! order in y direction
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! Nodal coordinates of quadrangle
!! number of rows = 2 or 3
!! number of cols = 4
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! returned coordinates of interpolation points in $x_{iJ}$ format.
!! Number of rows in ans is equal to the 2
!! Number of columns in ans is equal to the number of points
END FUNCTION EquidistancePoint_Quadrangle2
END INTERFACE EquidistancePoint_Quadrangle
p, q
p and q are the order of Lagrange polynomials in x and y directions, respectively.
xij
Nodal coordinates of quadrangle, the number of rows in xij is 2, and the number of columns in xij is 4.
ans
Returns coordinates of interpolation points in format. Number of rows in the ans is equal to the 2. Number of columns in the ans is equal to the number of points
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, p, q, r
real( dfp ), allocatable :: x(:,:)
p=1; q=1
x = EquidistancePoint_Quadrangle( p=p, q=q )
call display( mdencode(TRANSPOSE(x)) , "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
p=2; q=2
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
p=3; q=3
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
end program main
See results
xij (order=1)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
xij (order=2)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
0 | -1 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
-1 | 0 | 0 |
0 | 0 | 0 |
xij (order=3)=
-1 | -1 | 0 |
1 | -1 | 0 |
1 | 1 | 0 |
-1 | 1 | 0 |
-0.33333 | -1 | 0 |
0.33333 | -1 | 0 |
1 | -0.33333 | 0 |
1 | 0.33333 | 0 |
0.33333 | 1 | 0 |
-0.33333 | 1 | 0 |
-1 | 0.33333 | 0 |
-1 | -0.33333 | 0 |
-0.33333 | -0.33333 | 0 |
0.33333 | -0.33333 | 0 |
0.33333 | 0.33333 | 0 |
-0.33333 | 0.33333 | 0 |
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, p, q, r
real( dfp ), allocatable :: x(:,:)
p=2; q=1
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
p=3; q=1
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
p=3; q=2
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
end program main
See results
xij (order=2, 1) =
-1 | -1 |
1 | -1 |
1 | 1 |
-1 | 1 |
0 | -1 |
0 | 1 |
xij (order=3, 1)=
-1 | -1 |
1 | -1 |
1 | 1 |
-1 | 1 |
-0.33333 | -1 |
0.33333 | -1 |
0.33333 | 1 |
-0.33333 | 1 |
xij (order=3, 2)=
-1 | -1 |
1 | -1 |
1 | 1 |
-1 | 1 |
-0.33333 | -1 |
0.33333 | -1 |
1 | 0 |
0.33333 | 1 |
-0.33333 | 1 |
-1 | 0 |
-0.33333 | 0 |
0.33333 | 0 |
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, p, q, r
real( dfp ), allocatable :: x(:,:)
p=3; q=1
x = EquidistancePoint_Quadrangle( p=p, q=q)
call display( mdencode(TRANSPOSE(x)), "xij (order="//tostring([p,q])//")=" )
call blanklines(nol=2)
end program main
See results
xij (order=2, 1) =
-1 | -1 |
1 | -1 |
1 | 1 |
-1 | 1 |
0 | -1 |
0 | 1 |