Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions/Subroutines
hmholtz.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine hmholtz (name, u, rhs, h1, h2, mask, mult, imsh, tli, maxit, isd)
 
subroutine axhelm (au, u, helm1, helm2, imesh, isd)
 Compute the (Helmholtz) matrix-vector product, AU = helm1*[A]u + helm2*[B]u, for NEL elements. More...
 
subroutine setfast (helm1, helm2, imesh)
 Set logicals for fast evaluation of A*x. More...
 
subroutine sfastax ()
 For undeformed elements, set up appropriate elemental matrices and geometric factors for fast evaluation of Ax. More...
 
subroutine setprec (dpcm1, helm1, helm2, imsh, isd)
 Generate diagonal preconditioner for the Helmholtz operator. More...
 
subroutine chktcg1 (tol, res, h1, h2, mask, mult, imesh, isd)
 Check that the tolerances are not too small for the CG-solver. Important when calling the CG-solver (Gauss-Lobatto mesh) with zero Neumann b.c. More...
 
subroutine cggo (x, f, h1, h2, mask, mult, imsh, tin, maxit, isd, binv, name)
 Solve the Helmholtz equation, H*U = RHS, using preconditioned conjugate gradient iteration. Preconditioner: diag(H). More...
 
real(dp) function vlsc32 (r, b, m, n)
 
subroutine set_fdm_prec_h1b (d, h1, h2, nel)
 
subroutine generalev (a, b, lam, n, w)
 Solve the generalized eigenvalue problem A x = lam B x. More...
 
subroutine outmat2 (a, m, n, k, name)
 

Function/Subroutine Documentation

subroutine axhelm ( real(dp), dimension (lx1,ly1,lz1,*), intent(out au,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  u,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  helm1,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  helm2,
integer, intent(in)  imesh,
integer, intent(in)  isd 
)

Compute the (Helmholtz) matrix-vector product, AU = helm1*[A]u + helm2*[B]u, for NEL elements.

Parameters
[out]auH u
[in]helm1coefficient of stif
[in]helm2coefficient of mass
[in]imeshmesh index (v or t)
[in]isdaxi-symmetric flag of sorts

Definition at line 79 of file hmholtz.F90.

References ctimer::dnekclock(), i, mxm(), and setfast().

Referenced by ax(), cdscal(), cggo(), chktcg1(), crespsp(), gammam1(), get_local_crs_galerkin(), helmholtz::hconj(), normsc(), ophx(), helmholtz::projh(), and wlaplacian().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine cggo ( real(dp), dimension(lx1*ly1*lz1,*), intent(out x,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  f,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  h1,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  h2,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  mask,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  mult,
integer, intent(in)  imsh,
real(dp), intent(in)  tin,
integer, intent(in)  maxit,
integer, intent(in)  isd,
real(dp), dimension(lx1*ly1*lz1,*), intent(in)  binv,
character(4)  name 
)

Solve the Helmholtz equation, H*U = RHS, using preconditioned conjugate gradient iteration. Preconditioner: diag(H).

Parameters
[out]xsolution vector
[in]fresidual vector
[in]h1coefficient of A (stiffness)
[in]h2coefficient of M (mass)
[in]maskmask array
[in]multmultiplicity array
[in]binvinverse of mass matrix
[in]tininput tolerance

Definition at line 744 of file hmholtz.F90.

References axhelm(), copy(), ctimer::dnekclock(), dssum(), gop(), hmh_gmres(), setfast(), setprec(), and sum().

Referenced by hmholtz(), and helmholtz::hmhzpf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine chktcg1 ( real(dp), intent(out tol,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  res,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  h1,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  h2,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  mask,
real(dp), dimension (lx1,ly1,lz1,*), intent(in)  mult,
integer, intent(in)  imesh,
integer, intent(in)  isd 
)

Check that the tolerances are not too small for the CG-solver. Important when calling the CG-solver (Gauss-Lobatto mesh) with zero Neumann b.c.

Definition at line 637 of file hmholtz.F90.

References axhelm(), and ctimer::dnekclock().

Referenced by hmh_gmres(), hmholtz(), and helmholtz::hmhzpf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine generalev ( real(dp), dimension(n,n), intent(inout)  a,
real(dp), dimension(n,n), intent(inout)  b,
real(dp), dimension(n), intent(out lam,
integer, intent(in)  n,
real(dp), dimension(n,n), intent(in)  w 
)

Solve the generalized eigenvalue problem A x = lam B x.

A – symm. B – symm., pos. definite

"SIZE" is included here only to deduce WDSIZE, the working precision, in bytes, so as to know whether dsygv or ssygv should be called.

Parameters
[in]wunused

Definition at line 1101 of file hmholtz.F90.

References copy(), exitt(), and outmat2().

Referenced by hsmg_routines::hsmg_setup_fast1d().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine hmholtz ( character(4)  name,
real(dp), dimension (lx1,ly1,lz1,*)  u,
real(dp), dimension (lx1,ly1,lz1,*)  rhs,
real(dp), dimension (lx1,ly1,lz1,*)  h1,
real(dp), dimension (lx1,ly1,lz1,*)  h2,
real(dp), dimension (lx1,ly1,lz1,*)  mask,
real(dp), dimension (lx1,ly1,lz1,*)  mult,
integer  imsh,
real(dp)  tli,
integer  maxit,
integer  isd 
)

Definition at line 2 of file hmholtz.F90.

References cggo(), chcopy(), chktcg1(), ctimer::dnekclock(), and dssum().

Referenced by helmholtz::hsolve().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine outmat2 ( real(dp), dimension(m,n a,
integer  m,
integer  n,
integer  k,
character(4)  name 
)

Definition at line 1150 of file hmholtz.F90.

Referenced by generalev().

+ Here is the caller graph for this function:

subroutine set_fdm_prec_h1b ( real(dp), dimension (nx1,ny1,nz1,1), intent(out d,
real(dp), dimension(nx1,ny1,nz1,1), intent(in)  h1,
real(dp), dimension(nx1,ny1,nz1,1), intent(in)  h2,
integer, intent(in)  nel 
)

Definition at line 989 of file hmholtz.F90.

subroutine setfast ( real(dp), dimension(nx1,ny1,nz1,*), intent(in)  helm1,
real(dp), dimension(nx1,ny1,nz1,*), intent(in)  helm2,
integer, intent(in)  imesh 
)

Set logicals for fast evaluation of A*x.

Definition at line 329 of file hmholtz.F90.

References ctimer::dnekclock().

Referenced by axhelm(), and cggo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine setprec ( real(dp), dimension (lx1,ly1,lz1,*), intent(out dpcm1,
real(dp), dimension(nx1,ny1,nz1,*), intent(in)  helm1,
real(dp), dimension(nx1,ny1,nz1,*), intent(in)  helm2,
integer, intent(in)  imsh,
integer, intent(in)  isd 
)

Generate diagonal preconditioner for the Helmholtz operator.

Definition at line 464 of file hmholtz.F90.

References ctimer::dnekclock(), dssum(), and mxm().

Referenced by cggo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

subroutine sfastax ( )

For undeformed elements, set up appropriate elemental matrices and geometric factors for fast evaluation of Ax.

Definition at line 387 of file hmholtz.F90.

Referenced by gengeom(), and geom_reset().

+ Here is the caller graph for this function:

real(dp) function vlsc32 ( real(dp), dimension(n), intent(in)  r,
real(dp), dimension(n), intent(in)  b,
real(dp), dimension(n), intent(in)  m,
integer, intent(in)  n 
)

Definition at line 974 of file hmholtz.F90.