146    type(
cpr_t), 
intent(inout) :: cpr
 
  147    real(kind=
rp) :: l(0:
cpr%Xh%lx-1)
 
  148    real(kind=
rp) :: delta(
cpr%Xh%lx)
 
  149    integer :: i, kj, j, j2, kk
 
  151    associate(xh => 
cpr%Xh, v=> 
cpr%v, vt => 
cpr%vt, &
 
  152         vinv => 
cpr%vinv, vinvt => 
cpr%vinvt, w => 
cpr%w)
 
  160            l(j2) = ( (2*j2-1) * xh%zg(j,1) * l(j2-1) &
 
  161                 - (j2-1) * l(j2-2) ) / j2
 
  174         delta(i) = 2.0_rp / (2*(i-1)+1)
 
  177      delta(xh%lx) = 2.0_rp / (xh%lx-1)
 
  181         delta(i) = sqrt(1.0_rp / delta(i))
 
  186            v(i,j) = v(i,j) * delta(j) 
 
  191      call copy(vt, v, xh%lx * xh%lx)
 
  192      call trsp1(vt, xh%lx)
 
  208      call mxm(vt, xh%lx, w, xh%lx, vinv, xh%lx)
 
  211      call copy(vinvt, vinv, xh%lx * xh%lx)
 
  212      call trsp1(vinvt, xh%lx)
 
 
  265    type(
cpr_t), 
intent(inout) :: cpr
 
  266    type(coef_t), 
intent(inout) :: coef
 
  267    real(kind=rp) :: w2(
cpr%Xh%lx, 
cpr%Xh%lx, 
cpr%Xh%lx)
 
  268    real(kind=rp) :: w1(
cpr%Xh%lx, 
cpr%Xh%lx, 
cpr%Xh%lx)
 
  269    real(kind=rp) :: vsort(
cpr%Xh%lx * 
cpr%Xh%lx * 
cpr%Xh%lx)
 
  270    real(kind=rp) :: vtrunc(
cpr%Xh%lx, 
cpr%Xh%lx, 
cpr%Xh%lx)
 
  271    real(kind=rp) :: vtemp(
cpr%Xh%lx * 
cpr%Xh%lx * 
cpr%Xh%lx)
 
  272    real(kind=rp) :: errvec(
cpr%Xh%lx, 
cpr%Xh%lx, 
cpr%Xh%lx)
 
  273    real(kind=rp) :: fx(
cpr%Xh%lx, 
cpr%Xh%lx)
 
  274    real(kind=rp) :: fy(
cpr%Xh%lx, 
cpr%Xh%lx)
 
  275    real(kind=rp) :: fz(
cpr%Xh%lx, 
cpr%Xh%lx)
 
  276    real(kind=rp) :: l2norm, oldl2norm, targeterr
 
  277    integer :: isort(cpr%Xh%lx * cpr%Xh%lx * cpr%Xh%lx)
 
  278    integer :: i, j, k, e, nxyz, nelv
 
  279    integer :: kut, kutx, kuty, kutz, nx
 
  280    character(len=LOG_SIZE) :: log_buf
 
  291       call copy(vtemp, 
cpr%fldhat(1,1,1,e), nxyz)
 
  292       call copy(vtrunc, 
cpr%fldhat(1,1,1,e), nxyz)
 
  299       do while (l2norm .le. targeterr .and. kut .le. (
cpr%Xh%lx-1)*3)
 
  301          call copy(vtrunc, vtemp, nxyz)
 
  311          call copy(w2, vsort, nxyz)
 
  313          call mxm(fx, nx, w2, nx, w1, nx*nx)
 
  316             call mxm(w1(1,1,k), nx, fy, nx, w2(1,1,k), nx)
 
  319          call mxm (w2, nx*nx, fz, nx, vtemp, nx)
 
  323          call reord(vtemp, isort, nxyz)
 
  326          call sub3(errvec, 
cpr%fldhat(1,1,1,e), vtemp, nxyz)
 
  334       call copy(
cpr%fldhat(1,1,1,e), vtrunc, nxyz)
 
  341          write(log_buf, 
'(A)') &
 
  342               'Debugging info for e=50. Do not forget to delete' 
  343          call neko_log%message(log_buf)
 
  345          call reord(vsort,isort,nxyz)
 
  347          write(log_buf, 
'(A)') &
 
  349          call neko_log%message(log_buf)
 
  351          write(log_buf, 
'(A,E15.7)') &
 
  353          call neko_log%message(log_buf)
 
  354          write(log_buf, 
'(A)') &
 
  356          call neko_log%message(log_buf)
 
  358          write(log_buf, 
'(A,I5)') &
 
  360          call neko_log%message(log_buf)
 
  361          write(log_buf, 
'(A)') &
 
  362               'spectral coefficients' 
  363          call neko_log%message(log_buf)
 
  365             write(log_buf, 
'(A,E15.7,A,E15.7)') &
 
  366                  'org coeff:', vsort(i), 
' truncated coeff', &
 
  368             call neko_log%message(log_buf)
 
 
  405    integer, 
intent(in) :: lx
 
  406    integer, 
intent(in) :: kut
 
  407    real(kind=rp), 
intent(inout) :: fx(lx,lx)
 
  408    real(kind=rp), 
intent(inout) :: fy(lx,lx)
 
  409    real(kind=rp), 
intent(inout) :: fz(lx,lx)
 
  410    integer :: i, j, k, k0, kk, kutx, kuty, kutz
 
  418    if (kut .gt. 0 .and. kut .le. (lx-1)) 
then 
  423    if (kut .gt. (lx-1) .and. kut .le. (lx-1)*2) 
then 
  428    if (kut .gt. (lx-1)*2 .and. kut .le. (lx-1)*3) 
then 
 
  470    type(coef_t), 
intent(in) :: coef
 
  471    real(kind=rp) :: elemdata(coef%Xh%lx, coef%Xh%lx, coef%Xh%lx)
 
  472    real(kind=rp) :: vole, suma, l2e
 
  474    character(len=4) :: 
space 
  477    nxyz = coef%Xh%lx*coef%Xh%lx*coef%Xh%lx
 
  480       vole = vole+coef%B(i,1,1,e)
 
  485    if (
space .eq. 
'spec') 
then 
  487          suma = suma+elemdata(i,1,1)*elemdata(i,1,1)*coef%jac(i,1,1,e)
 
  490    if (
space .eq. 
'phys') 
then 
  492          suma = suma+elemdata(i,1,1)*elemdata(i,1,1)*coef%B(i,1,1,e)
 
  496    l2e = sqrt(suma)/sqrt(vole)
 
 
subroutine build_filter_tf(fx, fy, fz, kut, lx)
create filter transfer function
 
subroutine sortcoeff(vsort, v, isort, nxyz)
Sort the spectral coefficient in descending order array vsort. The original indices are stored in the...
 
subroutine, public mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product  for contiguously packed matrices A,B, and C.
 
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...