11 use size_m
, only : nx1, ny1, nz1, ndim, nid
12 use eigen, only : eigae, eigge, eigga, eigaa, eigas, eiggs
13 use geom, only : xm1, ym1, zm1
14 use input, only : if3d, ifaxis, ifflow
15 use tstep, only : nelfld, ifield, pi, istep
19 real(DP) :: xmin, xmax, ymin, ymax, zmin, zmax
20 real(DP) :: xx, yy, zz, rxy, ryx, rxz, rzx, ryz, rzy, rmin
21 real(DP) :: xx2, yy2, zz2, xyzmin, xyzmax
22 real(DP) :: one, ratio
23 real(DP),
external :: glmin, glmax
25 ntot1=nx1*ny1*nz1*nelfld(ifield)
26 xmin = glmin(xm1,ntot1)
27 xmax = glmax(xm1,ntot1)
28 ymin = glmin(ym1,ntot1)
29 ymax = glmax(ym1,ntot1)
31 zmin = glmin(zm1,ntot1)
32 zmax = glmax(zm1,ntot1)
44 IF (ryx < rmin) rmin = ryx
50 IF (rxz < rmin) rmin = rxz
51 IF (rzx < rmin) rmin = rzx
52 IF (ryz < rmin) rmin = ryz
53 IF (rzy < rmin) rmin = rzy
60 IF (yy2 < xyzmin) xyzmin = yy2
64 IF (zz2 < xyzmin) xyzmin = zz2
72 IF (ndim == 2) eigaa = pi*pi*(xx2+yy2)/2.
73 IF (ndim == 3) eigaa = pi*pi*(xx2+yy2+zz2)/3.
74 IF (ifaxis) eigaa = .25*pi*pi*yy2
78 IF (nid == 0 .AND. istep <= 0)
THEN
80 WRITE (6,*)
'Estimated eigenvalues'
81 WRITE (6,*)
'EIGAA = ',eigaa
82 WRITE (6,*)
'EIGGA = ',eigga
84 WRITE (6,*)
'EIGAE = ',eigae
85 WRITE (6,*)
'EIGAS = ',eigas
86 WRITE (6,*)
'EIGGE = ',eigge
87 WRITE (6,*)
'EIGGS = ',eiggs
109 use size_m
, only : lx1, ly1, lz1, lelt, nx1, ny1, nz1, nelv, ndim
110 use eigen, only : ifaa, ifas, ifae, ifast, ifgs, ifge, ifgst, ifga, eigga
111 use input, only : ifstrs
112 use soln, only : vmult, v1mask, v2mask, v3mask
115 real(DP),
allocatable :: H1(:,:,:,:), H2(:,:,:,:)
118 real(DP) :: eigga1, eigga2, eigga3
120 allocate(h1(lx1,ly1,lz1,lelt), h2(lx1,ly1,lz1,lelt))
122 ntot1 = nx1*ny1*nz1*nelv
125 write(*,*)
"Oops: IFAA"
127 ntot1 = nx1*ny1*nz1*nelv
130 CALL alpham1(eigaa1,v1mask,vmult,h1,h2,1)
131 CALL alpham1(eigaa2,v2mask,vmult,h1,h2,2)
132 eigaa = min(eigaa1,eigaa2)
134 CALL alpham1(eigaa3,v3mask,vmult,h1,h2,3)
135 eigaa = min(eigaa,eigaa3)
137 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGAA = ',eigaa
142 write(*,*)
"Oops: IFAA"
147 CALL rzero(h2inv,ntot1)
148 CALL alpham2(eigas,h1,h2,h2inv,inloc)
149 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGAS = ',eigas
154 write(*,*)
"Oops: IFAE"
159 CALL rone(h2inv,ntot1)
160 CALL alpham2(eigae,h1,h2,h2inv,inloc)
161 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGAE = ',eigae
166 write(*,*)
"Oops: IFAST"
170 CALL invers2(h2inv,h2,ntot1)
171 CALL alpham2(eigast,h1,h2,h2inv,inloc)
172 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGAST = ',eigast
177 write(*,*)
"Oops: IFGS"
182 CALL rzero(h2inv,ntot1)
183 CALL gammam2(eiggs,h1,h2,h2inv,inloc)
184 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGGS = ',eiggs
189 write(*,*)
"Oops: IFGE"
194 CALL rone(h2inv,ntot1)
195 CALL gammam2(eigge,h1,h2,h2inv,inloc)
196 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGGE = ',eigge
201 write(*,*)
"Oops: IFGST"
205 CALL invers2(h2inv,h2,ntot1)
206 CALL gammam2(eiggst,h1,h2,h2inv,inloc)
207 IF (nid == 0 .AND. istep <= 0)
WRITE (6,*)
'EIGGST = ',eiggst
212 ntot1 = nx1*ny1*nz1*nelv
213 h1 = 1._dp; h2 = 0._dp
214 IF ( .NOT. ifstrs)
THEN
215 CALL
gammam1(eigga1,v1mask,vmult,h1,h2,1)
216 CALL
gammam1(eigga2,v2mask,vmult,h1,h2,2)
219 CALL
gammam1(eigga3,v3mask,vmult,h1,h2,3)
220 eigga = max(eigga1,eigga2,eigga3)
232 SUBROUTINE gammam1 (GAMMA,MASK,MULT,H1,H2,ISD)
234 use size_m
, only : lx1, ly1, lz1, lelt
235 use size_m
, only : nx1, ny1, nz1, nelt, nelv
236 use geom, only : binvm1
237 use tstep, only : imesh, nmxe, tolev
241 REAL(DP) :: MASK (lx1,ly1,lz1,*)
242 REAL(DP) :: MULT (lx1,ly1,lz1,*)
243 REAL(DP) :: H1 (lx1,ly1,lz1,*)
244 REAL(DP) :: H2 (lx1,ly1,lz1,*)
247 real(DP),
allocatable :: X1(:,:,:,:), Y1(:,:,:,:)
249 integer :: nel, nxyz1, ntot1
251 real(DP) :: evnew, rq, evold, crit, xx, xnorm
252 real(DP),
external :: glsc3
254 allocate(x1(lx1,ly1,lz1,lelt), y1(lx1,ly1,lz1,lelt))
257 IF (imesh == 1) nel = nelv
258 IF (imesh == 2) nel = nelt
263 if (isd == 1) CALL
startx1(x1,y1,mask,mult,nel)
267 CALL
axhelm(y1,x1,h1,h2,imesh,isd)
268 y1 = y1 * mask(:,:,:,1:nel)
270 rq = glsc3(x1,y1,mult,ntot1)
273 crit = abs((evnew-evold)/evnew)
280 IF (crit < tolev) goto 2000
282 xx = glsc3(x1,y1,mult,ntot1)
297 use size_m
, only : lx1, ly1, lz1, nx1, ny1, nz1
302 REAL(DP),
intent(out) :: X1 (lx1,ly1,lz1,nel)
303 REAL(DP) :: Y1 (lx1,ly1,lz1,nel)
304 REAL(DP),
intent(in) :: MASK (lx1,ly1,lz1,nel)
305 REAL(DP),
intent(in) :: MULT (lx1,ly1,lz1,nel)
308 real(DP) :: small, xx, xnorm
309 real(DP),
external :: glamax, glsc3
311 ntot1 = nx1*ny1*nz1*nel
312 CALL
copy(x1,bm1,ntot1)
316 small = 0.001*glamax(x1,ntot1)
323 xx = glsc3(x1,y1,mult,ntot1)
subroutine rand_fld_h1(x)
subroutine dssum(u)
Direct stiffness sum.
subroutine esteig
Estimate eigenvalues.
subroutine sethlm(h1, h2, intloc)
Set the variable property arrays H1 and H2 in the Helmholtz equation. (associated with variable IFIEL...
subroutine axhelm(au, u, helm1, helm2, imesh, isd)
Compute the (Helmholtz) matrix-vector product, AU = helm1*[A]u + helm2*[B]u, for NEL elements...
subroutine startx1(X1, Y1, MASK, MULT, NEL)
Compute startvector for finding an eigenvalue on mesh 1. Normalization: XT*B*X = 1.
subroutine eigenv
Compute the following eigenvalues:. EIGAA = minimum eigenvalue of the matrix A (=Laplacian) EIGAE = m...
subroutine gammam1(GAMMA, MASK, MULT, H1, H2, ISD)
Compute maximum eigenvalue of the discrete Helmholtz operator.