Nek5000
SEM for Incompressible NS
|
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) |
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.
[out] | au | H u |
[in] | helm1 | coefficient of stif |
[in] | helm2 | coefficient of mass |
[in] | imesh | mesh index (v or t) |
[in] | isd | axi-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().
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).
[out] | x | solution vector |
[in] | f | residual vector |
[in] | h1 | coefficient of A (stiffness) |
[in] | h2 | coefficient of M (mass) |
[in] | mask | mask array |
[in] | mult | multiplicity array |
[in] | binv | inverse of mass matrix |
[in] | tin | input 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().
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().
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.
[in] | w | unused |
Definition at line 1101 of file hmholtz.F90.
References copy(), exitt(), and outmat2().
Referenced by hsmg_routines::hsmg_setup_fast1d().
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().
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().
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().
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().
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().