Neko  0.9.99
A portable framework for high-order spectral element flow simulations
fdm_cpu.f90
Go to the documentation of this file.
1 
2 module fdm_cpu
3  use num_types, only : rp
4  use tensor_cpu
5  implicit none
6  private
7 
8  public :: fdm_do_fast_cpu
9 
10 contains
11 
12  subroutine fdm_do_fast_cpu(e, r, s, d, nl, ldim, nelv)
13  integer, intent(in) :: nl, nelv, ldim
14  real(kind=rp), intent(inout) :: e(nl**ldim, nelv)
15  real(kind=rp), intent(inout) :: r(nl**ldim, nelv)
16  real(kind=rp), intent(inout) :: s(nl*nl,2,ldim, nelv)
17  real(kind=rp), intent(inout) :: d(nl**ldim, nelv)
18  integer :: ie, nn, i
19 
20  nn = nl**ldim
21  if(.not. ldim .eq. 3) then
22  do ie = 1, nelv
23  call tnsr2d_el_cpu(e(1,ie), nl, r(1,ie), nl, s(1,2,1,ie), s(1,1,2,ie))
24  do i = 1, nn
25  r(i,ie) = d(i,ie) * e(i,ie)
26  end do
27  call tnsr2d_el_cpu(e(1,ie), nl, r(1,ie), nl, s(1,1,1,ie), s(1,2,2,ie))
28  end do
29  else
30  do ie = 1, nelv
31  call tnsr3d_el_cpu(e(1,ie), nl, r(1,ie), nl, &
32  s(1,2,1,ie), s(1,1,2,ie), s(1,1,3,ie))
33  do i = 1, nn
34  r(i,ie) = d(i,ie) * e(i,ie)
35  end do
36  call tnsr3d_el_cpu(e(1,ie), nl, r(1,ie), nl, &
37  s(1,1,1,ie), s(1,2,2,ie), s(1,2,3,ie))
38  end do
39  end if
40  end subroutine fdm_do_fast_cpu
41 
42 end module fdm_cpu
Fast Diagonalization.
Definition: fdm_cpu.f90:2
subroutine, public fdm_do_fast_cpu(e, r, s, d, nl, ldim, nelv)
Definition: fdm_cpu.f90:13
integer, parameter, public rp
Global precision used in computations.
Definition: num_types.f90:12
subroutine, public tnsr2d_el_cpu(v, nv, u, nu, A, Bt)
Definition: tensor_cpu.f90:12
subroutine, public tnsr3d_el_cpu(v, nv, u, nu, A, Bt, Ct)
Definition: tensor_cpu.f90:23