Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
fasts.F90
Go to the documentation of this file.
1 !-----------------------------------------------------------------------
5 subroutine tensr3(v,nv,u,nu,A,Bt,Ct,w)
6  use kinds, only : dp
7  use size_m, only : nid
8  use input, only : if3d
9  implicit none
10 
11  integer :: nv, nu
12  real(DP) :: v(*),u(*)
13  real(DP) :: A(*),Bt(*),Ct(*)
14  real(DP) :: w(*)
15 
16  integer :: nuv, nvv, k, l, iz
17 
18  if (nu > nv) then
19  write(6,*) nid,nu,nv,' ERROR in tensr3. Contact P.Fischer.'
20  write(6,*) nid,nu,nv,' Memory problem.'
21  call exitt
22  endif
23 
24  if (if3d) then
25  nuv = nu*nv
26  nvv = nv*nv
27  call mxm(a,nv,u,nu,v,nu*nu)
28  k=1
29  l=1
30  do iz=1,nu
31  call mxm(v(k),nv,bt,nu,w(l),nv)
32  k=k+nuv
33  l=l+nvv
34  enddo
35  call mxm(w,nvv,ct,nu,v,nv)
36  else
37  call mxm(a,nv,u,nu,w,nu)
38  call mxm(w,nv,bt,nu,v,nv)
39  endif
40  return
41 end subroutine tensr3
42 
43 !-----------------------------------------------------------------------
Input parameters from preprocessors.
Definition: input_mod.F90:11
subroutine mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product C = A*B.
Definition: mxm_wrapper.F90:7
void exitt()
Definition: comm_mpi.F90:411
subroutine tensr3(v, nv, u, nu, A, Bt, Ct, w)
Tensor product application of v = (C x B x A) u . NOTE – the transpose of B & C must be input...
Definition: fasts.F90:5