deriv_N Subroutine

private subroutine deriv_N(x, y, mat_d)

Note

Function to provide the interpolation functions of a QU9 element, as well as its derivatives

It implements the details given in code ASTER r3.01.01.pdf doc

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in) :: x

abscissa between -1 and +1

real(kind=R8), intent(in) :: y

ordinate between -1 and +1

real(kind=R8), intent(out), dimension(1:9, 1:6) :: mat_d

array containing N, dN/di, d2N/di2


Called by

proc~~deriv_n~~CalledByGraph proc~deriv_n deriv_N proc~labelize_point labelize_point proc~labelize_point->proc~deriv_n proc~test_labelize_point test_labelize_point proc~test_labelize_point->proc~deriv_n proc~test_labelize_point->proc~labelize_point proc~label_surf_summits label_surf_summits proc~label_surf_summits->proc~labelize_point program~test_grad_curv test_grad_curv program~test_grad_curv->proc~test_labelize_point proc~test_label_surf_summits test_label_surf_summits program~test_grad_curv->proc~test_label_surf_summits proc~test_peaks_and_pits_curvatures test_peaks_and_pits_curvatures program~test_grad_curv->proc~test_peaks_and_pits_curvatures proc~peaks_and_pits_curvatures peaks_and_pits_curvatures proc~peaks_and_pits_curvatures->proc~label_surf_summits proc~test_label_surf_summits->proc~label_surf_summits proc~test_peaks_and_pits_curvatures->proc~peaks_and_pits_curvatures

Source Code

   subroutine deriv_N(x, y, mat_d)
   !================================================================================================
   !< @note Function to provide the interpolation functions of a QU9 element, as well as its derivatives
   !<
   !<  It implements the details given in code ASTER r3.01.01.pdf doc
   !<
   !<  @endnote
   !------------------------------------------------------------------------------------------------
   implicit none
   real(kind=R8), intent(in ) :: x                                !! *abscissa between -1 and +1*
   real(kind=R8), intent(in ) :: y                                !! *ordinate between -1 and +1*
   real(kind=R8), intent(out), dimension(1:9, 1:6) :: mat_d       !! *array containing N, dN/di, d2N/di2*

      real(kind=R8) :: xm1, xp1, xm12, xp12, umx2, dxm1, dxp1, xy
      real(kind=R8) :: ym1, yp1, ym12, yp12, umy2, dyp1, dym1

      xm1 = x - 1 ; xp1 = x + 1 ; xm12 = x - 1/2._R8 ; xp12 = x + 1/2._R8 ; umx2 = 1 - x**2 ; dxm1 = 2*x - 1 ; dxp1 = 2*x + 1 ; xy = x*y
      ym1 = y - 1 ; yp1 = y + 1 ; ym12 = y - 1/2._R8 ; yp12 = y + 1/2._R8 ; umy2 = 1 - y**2 ; dym1 = 2*y - 1 ; dyp1 = 2*y + 1

!     Nodes order:
!
!     4---7---3
!     |   |   |
!     8---9-- 6
!     |   |   |
!     1---5---2

!     mat_d(1:6, .) = [ N(1:9), dNdx(1:9), dNdy(1:9), d2Ndx2(1:9), d2Ndxdy(1:9), d2Ndy2(1:9) ]

      mat_d(1:9, 1) = [ xy*xm1*ym1/4  , &   ! 1
                        xy*xp1*ym1/4  , &   ! 2
                        xy*xp1*yp1/4  , &   ! 3
                        xy*xm1*yp1/4  , &   ! 4
                        y*umx2*ym1/2  , &   ! 5
                        x*umy2*xp1/2  , &   ! 6
                        y*umx2*yp1/2  , &   ! 7
                        x*umy2*xm1/2  , &   ! 8
                          umx2*umy2 ]       ! 9

      mat_d(1:9, 2) = [ dxm1*y*ym1/4  , &   ! 1
                        dxp1*y*ym1/4  , &   ! 2
                        dxp1*y*yp1/4  , &   ! 3
                        dxm1*y*yp1/4  , &   ! 4
                        -xy*ym1       , &   ! 5
                        dxp1*umy2/2   , &   ! 6
                        -xy*yp1       , &   ! 7
                        dxm1*umy2/2   , &   ! 8
                        -2*x*umy2 ]         ! 9

      mat_d(1:9, 3) = [ x*xm1*dym1/4  , &   ! 1
                        x*xp1*dym1/4  , &   ! 2
                        x*xp1*dyp1/4  , &   ! 3
                        x*xm1*dyp1/4  , &   ! 4
                         umx2*dym1/2  , &   ! 5
                        -xy*xp1       , &   ! 6
                         umx2*dyp1/2  , &   ! 7
                        -xy*xm1       , &   ! 8
                        -2*y*umx2 ]         ! 9

      mat_d(1:9, 4) = [ y*ym1/2       , &   ! 1
                        y*ym1/2       , &   ! 2
                        y*yp1/2       , &   ! 3
                        y*yp1/2       , &   ! 4
                        -y*ym1        , &   ! 5
                           umy2       , &   ! 6
                        -y*yp1        , &   ! 7
                           umy2       , &   ! 8
                        -2*umy2 ]           ! 9

      mat_d(1:9, 5) = [ xm12*ym12     , &   ! 1
                        xp12*ym12     , &   ! 2
                        xp12*yp12     , &   ! 3
                        xm12*yp12     , &   ! 4
                        -x*dym1       , &   ! 5
                        -y*dxp1       , &   ! 6
                        -x*dyp1       , &   ! 7
                        -y*dxm1       , &   ! 8
                        +4*xy ]             ! 9

      mat_d(1:9, 6) = [ x*xm1/2       , &   ! 1
                        x*xp1/2       , &   ! 2
                        x*xp1/2       , &   ! 3
                        x*xm1/2       , &   ! 4
                          +umx2       , &   ! 5
                        -x*xp1        , &   ! 6
                          +umx2       , &   ! 7
                        -x*xm1        , &   ! 8
                        -2*umx2 ]           ! 9

   return
   endsubroutine deriv_N