QuadraturePoint
This routine returns the quadrature points on triangle.
note
For order less than or equal to 20, this function returns the minimum number of quadrature points. For order greater than 20 this routine returns Tensor Product based quadrature points.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE FUNCTION QuadraturePoint_Triangle(&
& order, &
& quadType, &
& refTriangle, &
& xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order of integrand
INTEGER(I4B), INTENT(IN) :: quadType
!! quadrature point type
CHARACTER(*), INTENT(IN) :: refTriangle
!! Reference triangle
!! Biunit
!! Unit
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! nodal coordinates of triangle.
!! The number of rows in xij can be 2 or 3.
!! The number of columns in xij should be 3
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! Quadrature points
END FUNCTION QuadraturePoint_Triangle
END INTERFACE
xij
xij
contains nodal coordinates of triangle in xij format.- SIZE(xij,1) = nsd, and SIZE(xij,2)=3
- If xij is absent then unit triangle is assumed
quadType
quadType
is quadrature type, currently this variable is not used.
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order, quadType
real( dfp ), allocatable :: x(:,:), xij(:, :)
CHARACTER( 20 ) :: refTriangle
order=2
xij = RefTriangleCoord("UNIT")
quadType=Equidistance
refTriangle="UNIT"
x =QuadraturePoint_Triangle( &
& order=order, &
& quadType=quadType, &
& refTriangle=refTriangle)
call display( Mdencode(x), "xij (order="//tostring(order)//")=" // char_lf // char_lf )
end program main
See results
xij (order=2)=
1.11022E-16 | 5.55112E-17 | 0.5 | 0.25 | 1 | 0.5 |
0 | 0.5 | 0 | 0.5 | 0 | 0.5 |
2.77778E-02 | 5.55556E-02 | 0.11111 | 0.22222 | 2.77778E-02 | 5.55556E-02 |
Interface 2
INTERFACE QuadraturePoint_Triangle
MODULE FUNCTION QuadraturePoint_Triangle2(&
& nips, &
& quadType, &
& refTriangle, &
& xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: nips(1)
!! nips(1) .LE. 79, then we call
!! economical quadrature rules.
!! Otherwise, this routine will retport
!! error
INTEGER(I4B), INTENT(IN) :: quadType
!! quadrature point type,
!! currently this variable is not used
CHARACTER(*), INTENT(IN) :: refTriangle
!! Reference triangle
!! Biunit
!! Unit
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! nodal coordinates of triangle.
!! The number of rows in xij can be 2 or 3.
!! The number of columns in xij should be 3
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! Quadrature points
END FUNCTION QuadraturePoint_Triangle2
END INTERFACE QuadraturePoint_Triangle