104    integer, 
intent(in) :: lxd
 
  105    type(
coef_t), 
intent(inout), 
target :: coef
 
  106    integer :: nel, n_GL, n
 
  108    call this%Xh_GL%init(
gl, lxd, lxd, lxd)
 
  109    this%Xh_GLL => coef%Xh
 
  110    this%coef_GLL => coef
 
  111    call this%GLL_to_GL%init(this%Xh_GL, this%Xh_GLL)
 
  113    call this%coef_GL%init(this%Xh_GL, coef%msh)
 
  116    n_gl = nel*this%Xh_GL%lxyz
 
  118    call this%GLL_to_GL%map(this%coef_GL%drdx, coef%drdx, nel, this%Xh_GL)
 
  119    call this%GLL_to_GL%map(this%coef_GL%dsdx, coef%dsdx, nel, this%Xh_GL)
 
  120    call this%GLL_to_GL%map(this%coef_GL%dtdx, coef%dtdx, nel, this%Xh_GL)
 
  121    call this%GLL_to_GL%map(this%coef_GL%drdy, coef%drdy, nel, this%Xh_GL)
 
  122    call this%GLL_to_GL%map(this%coef_GL%dsdy, coef%dsdy, nel, this%Xh_GL)
 
  123    call this%GLL_to_GL%map(this%coef_GL%dtdy, coef%dtdy, nel, this%Xh_GL)
 
  124    call this%GLL_to_GL%map(this%coef_GL%drdz, coef%drdz, nel, this%Xh_GL)
 
  125    call this%GLL_to_GL%map(this%coef_GL%dsdz, coef%dsdz, nel, this%Xh_GL)
 
  126    call this%GLL_to_GL%map(this%coef_GL%dtdz, coef%dtdz, nel, this%Xh_GL)
 
  130       allocate(this%temp(n_gl))
 
  131       allocate(this%tbf(n_gl))
 
  132       allocate(this%tx(n_gl))
 
  133       allocate(this%ty(n_gl))
 
  134       allocate(this%tz(n_gl))
 
  135       allocate(this%vr(n_gl))
 
  136       allocate(this%vs(n_gl))
 
  137       allocate(this%vt(n_gl))
 
 
  237    type(
space_t), 
intent(in) :: Xh
 
  238    type(
coef_t), 
intent(in) :: coef
 
  239    type(
field_t), 
intent(inout) :: vx, vy, vz
 
  240    type(
field_t), 
intent(inout) :: fx, fy, fz
 
  241    integer, 
intent(in) :: n
 
  242    real(kind=
rp), 
intent(in), 
optional :: dt
 
  244    real(kind=
rp), 
dimension(this%Xh_GL%lxyz) :: tx, ty, tz
 
  245    real(kind=
rp), 
dimension(this%Xh_GL%lxyz) :: tfx, tfy, tfz
 
  246    real(kind=
rp), 
dimension(this%Xh_GL%lxyz) :: vr, vs, vt
 
  247    real(kind=
rp), 
dimension(this%Xh_GLL%lxyz) :: tempx, tempy, tempz
 
  248    integer :: e, i, idx, nel, n_GL
 
  251    n_gl = nel * this%Xh_GL%lxyz
 
  254    associate(c_gl => this%coef_GL)
 
  256         call this%GLL_to_GL%map(this%tx, vx%x, nel, this%Xh_GL)
 
  257         call this%GLL_to_GL%map(this%ty, vy%x, nel, this%Xh_GL)
 
  258         call this%GLL_to_GL%map(this%tz, vz%x, nel, this%Xh_GL)
 
  260         call opgrad(this%vr, this%vs, this%vt, this%tx, c_gl)
 
  261         call device_vdot3(this%tbf_d, this%vr_d, this%vs_d, this%vt_d, &
 
  262              this%tx_d, this%ty_d, this%tz_d, n_gl)
 
  263         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  267         call opgrad(this%vr, this%vs, this%vt, this%ty, c_gl)
 
  268         call device_vdot3(this%tbf_d, this%vr_d, this%vs_d, this%vt_d, &
 
  269              this%tx_d, this%ty_d, this%tz_d, n_gl)
 
  270         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  273         call opgrad(this%vr, this%vs, this%vt, this%tz, c_gl)
 
  274         call device_vdot3(this%tbf_d, this%vr_d, this%vs_d, this%vt_d, &
 
  275              this%tx_d, this%ty_d, this%tz_d, n_gl)
 
  276         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  281         call this%GLL_to_GL%map(this%tx, vx%x, nel, this%Xh_GL)
 
  282         call this%GLL_to_GL%map(this%ty, vy%x, nel, this%Xh_GL)
 
  283         call this%GLL_to_GL%map(this%tz, vz%x, nel, this%Xh_GL)
 
  285         call opgrad(this%vr, this%vs, this%vt, this%tx, c_gl)
 
  286         call vdot3(this%tbf, this%vr, this%vs, this%vt, &
 
  287              this%tx, this%ty, this%tz, n_gl)
 
  288         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  289         call sub2(fx%x, this%temp, n)
 
  292         call opgrad(this%vr, this%vs, this%vt, this%ty, c_gl)
 
  293         call vdot3(this%tbf, this%vr, this%vs, this%vt, &
 
  294              this%tx, this%ty, this%tz, n_gl)
 
  295         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  296         call sub2(fy%x, this%temp, n)
 
  298         call opgrad(this%vr, this%vs, this%vt, this%tz, c_gl)
 
  299         call vdot3(this%tbf, this%vr, this%vs, this%vt, &
 
  300              this%tx, this%ty, this%tz, n_gl)
 
  301         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  302         call sub2(fz%x, this%temp, n)
 
  306         do e = 1, coef%msh%nelv
 
  307            call this%GLL_to_GL%map(tx, vx%x(1,1,1,e), 1, this%Xh_GL)
 
  308            call this%GLL_to_GL%map(ty, vy%x(1,1,1,e), 1, this%Xh_GL)
 
  309            call this%GLL_to_GL%map(tz, vz%x(1,1,1,e), 1, this%Xh_GL)
 
  311            call opgrad(vr, vs, vt, tx, c_gl, e, e)
 
  312            do i = 1, this%Xh_GL%lxyz
 
  313               tfx(i) = tx(i)*vr(i) + ty(i)*vs(i) + tz(i)*vt(i)
 
  316            call opgrad(vr, vs, vt, ty, c_gl, e, e)
 
  317            do i = 1, this%Xh_GL%lxyz
 
  318               tfy(i) = tx(i)*vr(i) + ty(i)*vs(i) + tz(i)*vt(i)
 
  321            call opgrad(vr, vs, vt, tz, c_gl, e, e)
 
  322            do i = 1, this%Xh_GL%lxyz
 
  323               tfz(i) = tx(i)*vr(i) + ty(i)*vs(i) + tz(i)*vt(i)
 
  326            call this%GLL_to_GL%map(tempx, tfx, 1, this%Xh_GLL)
 
  327            call this%GLL_to_GL%map(tempy, tfy, 1, this%Xh_GLL)
 
  328            call this%GLL_to_GL%map(tempz, tfz, 1, this%Xh_GLL)
 
  330            idx = (e-1)*this%Xh_GLL%lxyz+1
 
  331            do concurrent(i = 0:this%Xh_GLL%lxyz-1)
 
  332               fx%x(i+idx,1,1,1) = fx%x(i+idx,1,1,1) - tempx(i+1)
 
  333               fy%x(i+idx,1,1,1) = fy%x(i+idx,1,1,1) - tempy(i+1)
 
  334               fz%x(i+idx,1,1,1) = fz%x(i+idx,1,1,1) - tempz(i+1)
 
 
  357    type(field_t), 
intent(inout) :: vx, vy, vz
 
  358    type(field_t), 
intent(inout) :: s
 
  359    type(field_t), 
intent(inout) :: fs
 
  360    type(space_t), 
intent(in) :: Xh
 
  361    type(coef_t), 
intent(in) :: coef
 
  362    integer, 
intent(in) :: n
 
  363    real(kind=rp), 
intent(in), 
optional :: dt
 
  365    real(kind=rp), 
dimension(this%Xh_GL%lxyz) :: vx_gl, vy_gl, vz_gl, s_gl
 
  366    real(kind=rp), 
dimension(this%Xh_GL%lxyz) :: dsdx, dsdy, dsdz
 
  367    real(kind=rp), 
dimension(this%Xh_GL%lxyz) :: f_gl
 
  368    integer :: e, i, idx, nel, n_GL
 
  369    real(kind=rp), 
dimension(this%Xh_GLL%lxyz) :: temp
 
  372    n_gl = nel * this%Xh_GL%lxyz
 
  374    associate(c_gl => this%coef_GL)
 
  375      if (neko_bcknd_device .eq. 1) 
then 
  378         call this%GLL_to_GL%map(this%tx, vx%x, nel, this%Xh_GL)
 
  379         call this%GLL_to_GL%map(this%ty, vy%x, nel, this%Xh_GL)
 
  380         call this%GLL_to_GL%map(this%tz, vz%x, nel, this%Xh_GL)
 
  383         call this%GLL_to_GL%map(this%temp, s%x, nel, this%Xh_GL)
 
  386         call opgrad(this%vr, this%vs, this%vt, this%temp, c_gl)
 
  389         call device_vdot3(this%tbf_d, this%vr_d, this%vs_d, this%vt_d, &
 
  390              this%tx_d, this%ty_d, this%tz_d, n_gl)
 
  393         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  396         call device_sub2(fs%x_d, this%temp_d, n)
 
  398      else if ((neko_bcknd_sx .eq. 1) .or. (neko_bcknd_xsmm .eq. 1)) 
then 
  401         call this%GLL_to_GL%map(this%tx, vx%x, nel, this%Xh_GL)
 
  402         call this%GLL_to_GL%map(this%ty, vy%x, nel, this%Xh_GL)
 
  403         call this%GLL_to_GL%map(this%tz, vz%x, nel, this%Xh_GL)
 
  406         call this%GLL_to_GL%map(this%temp, s%x, nel, this%Xh_GL)
 
  409         call opgrad(this%vr, this%vs, this%vt, this%temp, c_gl)
 
  412         call vdot3(this%tbf, this%vr, this%vs, this%vt, &
 
  413              this%tx, this%ty, this%tz, n_gl)
 
  416         call this%GLL_to_GL%map(this%temp, this%tbf, nel, this%Xh_GLL)
 
  419         call sub2(fs%x, this%temp, n)
 
  422         do e = 1, coef%msh%nelv
 
  424            call this%GLL_to_GL%map(vx_gl, vx%x(1,1,1,e), 1, this%Xh_GL)
 
  425            call this%GLL_to_GL%map(vy_gl, vy%x(1,1,1,e), 1, this%Xh_GL)
 
  426            call this%GLL_to_GL%map(vz_gl, vz%x(1,1,1,e), 1, this%Xh_GL)
 
  429            call this%GLL_to_GL%map(s_gl, s%x(1,1,1,e), 1, this%Xh_GL)
 
  432            call opgrad(dsdx, dsdy, dsdz, s_gl, c_gl, e, e)
 
  435            do i = 1, this%Xh_GL%lxyz
 
  436               f_gl(i) = vx_gl(i)*dsdx(i) + vy_gl(i)*dsdy(i) + vz_gl(i)*dsdz(i)
 
  440            call this%GLL_to_GL%map(temp, f_gl, 1, this%Xh_GLL)
 
  442            idx = (e-1)*this%Xh_GLL%lxyz + 1
 
  444            call sub2(fs%x(idx, 1, 1, 1), temp, this%Xh_GLL%lxyz)