Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
fdm_cpu.f90
Go to the documentation of this file.
1
2module fdm_cpu
3 use num_types, only : rp
5 implicit none
6 private
7
8 public :: fdm_do_fast_cpu
9
10contains
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 !$omp parallel do private(ie, i)
23 do ie = 1, nelv
24 call tnsr2d_el_cpu(e(1, ie), nl, r(1, ie), nl, s(1, 2, 1, ie), &
25 s(1, 1, 2, ie))
26 do i = 1, nn
27 r(i, ie) = d(i, ie) * e(i, ie)
28 end do
29 call tnsr2d_el_cpu(e(1, ie), nl, r(1, ie), nl, s(1, 1, 1, ie), &
30 s(1, 2, 2, ie))
31 end do
32 !$omp end parallel do
33 else
34 !$omp parallel do private(ie, i)
35 do ie = 1, nelv
36 call tnsr3d_el_cpu(e(1, ie), nl, r(1, ie), nl, &
37 s(1, 2, 1, ie), s(1, 1, 2, ie), s(1, 1, 3, ie))
38 do i = 1, nn
39 r(i, ie) = d(i, ie) * e(i, ie)
40 end do
41 call tnsr3d_el_cpu(e(1, ie), nl, r(1, ie), nl, &
42 s(1, 1, 1, ie), s(1, 2, 2, ie), s(1, 2, 3, ie))
43 end do
44 !$omp end parallel do
45 end if
46 end subroutine fdm_do_fast_cpu
47
48end 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)
subroutine, public tnsr3d_el_cpu(v, nv, u, nu, a, bt, ct)