InterpolationPoint_Line
This routine returns the interplation points on the line.
Calling example :
ans = InterpolationPoint_Line(order, ipType, layout, xij)
ipType is interpolation point type, it can take following values:
Equidistance, uniformly/evenly distributed pointsGaussLegendre, Zeros of Legendre polynomials, all nodes are strictly inside the domain.GaussLegendreLobattoare zeros of Lobatto polynomials they always contain boundary pointsGaussChebyshevZeros of Chebyshev polynomials of first kind, all nodes are internalGaussChebyshevLobattothey contain boundary pointsGaussJacobiandGaussJacobiLobatto
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE InterpolationPoint_Line
MODULE FUNCTION InterpolationPoint_Line1(order, ipType, &
& layout, xij, alpha, beta, lambda) RESULT(ans)
!!
INTEGER(I4B), INTENT(IN) :: order
!! Order of interpolation
INTEGER(I4B), INTENT(IN) :: ipType
!! Interpolation point type
!! Equidistance, GaussLegendre, GaussLegendreLobatto, GaussChebyshev,
!! GaussChebyshevLobatto, GaussJacobi, GaussJacobiLobatto
CHARACTER(*), INTENT(IN) :: layout
!! "VEFC"
!! "INCREASING"
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! domain of interpolation
REAL(DFP), OPTIONAL, INTENT(IN) :: alpha
!! Jacobi parameter
REAL(DFP), OPTIONAL, INTENT(IN) :: beta
!! Jacobi parameter
REAL(DFP), OPTIONAL, INTENT(IN) :: lambda
!! Ultraspherical parameter
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! interpolation points in xij format
!! size(ans,1) = 1 (if xij not present) else size(xij,1)
!! size(ans,2) = order+1
END FUNCTION InterpolationPoint_Line1
END INTERFACE InterpolationPoint_Line
xijxij contains nodal coordinates of line in xij format.
- SIZE(xij,1) = nsd, and SIZE(xij,2)=2
- If xij is absent then [-1,1] is used
ansans contains the equidistance points. If xij is present, then the number of rows in xij is same as the number of rows in xij. Otherwise, ans has 1 row (for 1D).
layoutlayoutspecifies the arrangement of points. Following options are possible:layout=VEFCvertex, edge, face, cell, in this case first two points are boundary points, remaining (from 3 to n) are internal points in increasing order.layout=INCREASINGpoints are arranged in increasing order
program main
use easifemBase
implicit none
integer(i4b) :: order
real(dfp) :: x
real(dfp), allocatable :: xij(:,:), coeff(:,:), ans(:, :)
character( len = * ), parameter :: layout="VEFC"
integer(i4b) :: ipType
!! "INCREASING"
xij = zeros(1, 2, 1.0_DFP)
xij(1, :) = [0,1]
order = 4_I4B
iptype = Equidistance
ans = InterpolationPoint_Line(order=order, iptype=iptype, layout=layout, xij=xij)
call display(ans, "Equidistance: ")
iptype = GaussLegendre
ans = InterpolationPoint_Line(order=order, iptype=iptype, layout=layout, xij=xij)
call display(ans, "GaussLegendre: ")
iptype = GaussLegendreLobatto
ans = InterpolationPoint_Line(order=order, iptype=iptype, layout=layout, xij=xij)
call display(ans, "GaussLegendreLobatto: ")
iptype = GaussChebyshev
ans = InterpolationPoint_Line(order=order, iptype=iptype, layout=layout, xij=xij)
call display(ans, "GaussChebyshev: ")
iptype = GaussChebyshevLobatto
ans = InterpolationPoint_Line(order=order, iptype=iptype, layout=layout, xij=xij)
call display(ans, "GaussChebyshevLobatto: ")
end program main
Equidistance:
-------------------------------------------
0.00000 1.00000 0.25000 0.50000 0.75000
GaussLegendre:
------------------------------------------------
0.046910 0.230765 0.500000 0.769235 0.953090
GaussLegendreLobatto:
------------------------------------------------
-0.00000 1.00000 0.17267 0.50000 0.82733
GaussChebyshev:
------------------------------------------------
0.024472 0.206107 0.500000 0.793893 0.975528
GaussChebyshevLobatto:
-------------------------------------------
0.00000 1.00000 0.14645 0.50000 0.85355
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE InterpolationPoint_Line
MODULE FUNCTION InterpolationPoint_Line2(order, ipType, xij, &
& layout, alpha, beta, lambda) RESULT(ans)
!!
INTEGER(I4B), INTENT(IN) :: order
!! order of interpolation
INTEGER(I4B), INTENT(IN) :: ipType
!! Interpolation point type
!! Equidistance
!! GaussLegendre
!! GaussLegendreLobatto
!! GaussChebyshev,
!! GaussChebyshevLobatto
!! GaussJacobi
!! GaussJacobiLobatto
REAL(DFP), INTENT(IN) :: xij(2)
!! end points
CHARACTER(*), INTENT(IN) :: layout
!! "VEFC"
!! "INCREASING"
!! "DECREASING"
REAL(DFP), OPTIONAL, INTENT(IN) :: alpha
!! Jacobi parameter
REAL(DFP), OPTIONAL, INTENT(IN) :: beta
!! Jacobi parameter
REAL(DFP), OPTIONAL, INTENT(IN) :: lambda
!! Ultraspherical parameter
REAL(DFP), ALLOCATABLE :: ans(:)
!! one dimensional interpolation point
END FUNCTION InterpolationPoint_Line2
END INTERFACE InterpolationPoint_Line
xijxijcontains nodal coordinates of line in 1D.xij(1)contains 1D coordinates of starting point of line.xij(2)contains the 1D coordinates of ending point of line.
ansans contains the equidistance points. If xij is present, then the number of rows in xij is same as the number of rows in xij. Otherwise, ans has 1 row (for 1D).
layoutlayoutspecifies the arrangement of points. Following options are possible:layout=VEFCvertex, edge, face, cell, in this case first two points are boundary points, remaining (from 3 to n) are internal points in increasing order.layout=INCREASINGpoints are arranged in increasing order
See above example.