4 use input, only : param
10 real(DP) :: x(nx1,ny1,nz1,nelv)
11 real(DP) :: y(nx1,ny1,nz1,nelv)
12 real(DP) :: z(nx1,ny1,nz1,nelv)
19 integer,
parameter(lxx=lx1*lx1)
21 common /ctmpf/ lr(2*lx1+4),ls(2*lx1+4),lt(2*lx1+4) &
22 , llr(lelt),lls(lelt),llt(lelt) &
23 , lmr(lelt),lms(lelt),lmt(lelt) &
24 , lrr(lelt),lrs(lelt),lrt(lelt)
25 real(DP) :: lr ,ls ,lt
26 real(DP) :: llr,lls,llt
27 real(DP) :: lmr,lms,lmt
28 real(DP) :: lrr,lrs,lrt
30 integer :: lbr,rbr,lbs,rbs,lbt,rbt,e
36 if (param(44) == 1)
then
37 write(*,*)
"Oops: param(44)"
51 if (wdsize == 8) eps = 1.e-14
54 call plane_space2(llr,lls,llt, 0,wxm2,x,y,z,n1,n2,nz0,nzn)
57 call
plane_space(lmr,lms,lmt, 1,n1,wxm2,x,y,z,n1,n2,nz0,nzn)
60 call plane_space2(lrr,lrs,lrt,n2,wxm2,x,y,z,n1,n2,nz0,nzn)
71 subroutine plane_space(lr,ls,lt,i1,i2,w,x,y,z,nx,nxn,nz0,nzn)
73 use size_m
, only : nelv
74 use input, only : if3d
77 integer :: nx, nz0, nxn, nzn, i1, i2
78 real(DP) :: w(*),lr(*),ls(*),lt(*)
79 real(DP) :: x(0:nxn,0:nxn,nz0:nzn,*)
80 real(DP) :: y(0:nxn,0:nxn,nz0:nzn,*)
81 real(DP) :: z(0:nxn,0:nxn,nz0:nzn,*)
82 real(DP) :: lr2,ls2,lt2
84 integer :: ny, nz, j1, k1, j2, k2, ie, k, j, i
85 real(DP) :: wsum, weight
107 lr2 = lr2 + weight / &
108 ( (x(i2,j,k,ie)-x(i1,j,k,ie))**2 &
109 + (y(i2,j,k,ie)-y(i1,j,k,ie))**2 &
110 + (z(i2,j,k,ie)-z(i1,j,k,ie))**2 )
115 lr(ie) = 1./sqrt(lr2)
126 ls2 = ls2 + weight / &
127 ( (x(i,j2,k,ie)-x(i,j1,k,ie))**2 &
128 + (y(i,j2,k,ie)-y(i,j1,k,ie))**2 &
129 + (z(i,j2,k,ie)-z(i,j1,k,ie))**2 )
134 ls(ie) = 1./sqrt(ls2)
145 lt2 = lt2 + weight / &
146 ( (x(i,j,k2,ie)-x(i,j,k1,ie))**2 &
147 + (y(i,j,k2,ie)-y(i,j,k1,ie))**2 &
148 + (z(i,j,k2,ie)-z(i,j,k1,ie))**2 )
153 lt(ie) = 1./sqrt(lt2)
163 lr2 = lr2 + weight / &
164 ( (x(i2,j,1,ie)-x(i1,j,1,ie))**2 &
165 + (y(i2,j,1,ie)-y(i1,j,1,ie))**2 )
169 lr(ie) = 1./sqrt(lr2)
178 ls2 = ls2 + weight / &
179 ( (x(i,j2,1,ie)-x(i,j1,1,ie))**2 &
180 + (y(i,j2,1,ie)-y(i,j1,1,ie))**2 )
184 ls(ie) = 1./sqrt(ls2)
193 use size_m
, only : ndim
194 use input, only : cbc
196 use topol, only : eface
197 use tstep, only : ifield
200 integer :: lbr,rbr,lbs,rbs,lbt,rbt,e,bsym
202 integer :: iface, ied, ibc, ierr
214 if (cbc(ied,e,ifield) ==
' ') ibc = 0
215 if (cbc(ied,e,ifield) ==
'E ') ibc = 0
216 if (cbc(ied,e,ifield) ==
'msi') ibc = 0
217 if (cbc(ied,e,ifield) ==
'MSI') ibc = 0
218 if (cbc(ied,e,ifield) ==
'P ') ibc = 0
219 if (cbc(ied,e,ifield) ==
'p ') ibc = 0
220 if (cbc(ied,e,ifield) ==
'O ') ibc = 1
221 if (cbc(ied,e,ifield) ==
'ON ') ibc = 1
222 if (cbc(ied,e,ifield) ==
'o ') ibc = 1
223 if (cbc(ied,e,ifield) ==
'on ') ibc = 1
224 if (cbc(ied,e,ifield) ==
'MS ') ibc = 1
225 if (cbc(ied,e,ifield) ==
'ms ') ibc = 1
226 if (cbc(ied,e,ifield) ==
'MM ') ibc = 1
227 if (cbc(ied,e,ifield) ==
'mm ') ibc = 1
228 if (cbc(ied,e,ifield) ==
'mv ') ibc = 2
229 if (cbc(ied,e,ifield) ==
'mvn') ibc = 2
230 if (cbc(ied,e,ifield) ==
'v ') ibc = 2
231 if (cbc(ied,e,ifield) ==
'V ') ibc = 2
232 if (cbc(ied,e,ifield) ==
'W ') ibc = 2
233 if (cbc(ied,e,ifield) ==
'SYM') ibc = bsym
234 if (cbc(ied,e,ifield) ==
'SL ') ibc = 2
235 if (cbc(ied,e,ifield) ==
'sl ') ibc = 2
236 if (cbc(ied,e,ifield) ==
'SHL') ibc = 2
237 if (cbc(ied,e,ifield) ==
'shl') ibc = 2
238 if (cbc(ied,e,ifield) ==
'A ') ibc = 2
239 if (cbc(ied,e,ifield) ==
'S ') ibc = 2
240 if (cbc(ied,e,ifield) ==
's ') ibc = 2
241 if (cbc(ied,e,ifield) ==
'J ') ibc = 0
242 if (cbc(ied,e,ifield) ==
'SP ') ibc = 0
246 if (ierr == -1)
write(6,1) ibc,ied,e,ifield,cbc(ied,e,ifield)
247 1
format(2i3,i8,i3,2x,a3,
' get_fast_bc_error')
251 if (ierr == -1) call
exitti(
'Error A get_fast_bc$',e)
261 if (ibc < 0) ierr =
lglel(e)
275 use size_m
, only : nx1
276 use semhat, only : ah, bh, ch, dh, zh, dph, jph, bgl, zgl, dgl, jgl, wh
281 call
generate_semhat(ah,bh,ch,dh,zh,dph,jph,bgl,zgl,dgl,jgl,nr,wh)
293 real(DP) :: bgl(1:n-1),jgl(1:n-1,0:n),dgl(1:n-1,0:n)
297 jgl(i,j)=bgl(i)*jgl(i,j)
302 dgl(i,j)=bgl(i)*dgl(i,j)
328 subroutine generate_semhat(a,b,c,d,z,dgll,jgll,bgl,zgl,dgl,jgl,n,w)
334 real(DP) :: a(0:n,0:n),b(0:n),c(0:n,0:n),d(0:n,0:n),z(0:n)
335 real(DP) :: dgll(0:n,1:n-1),jgll(0:n,1:n-1)
337 real(DP) :: bgl(1:n-1),zgl(1:n-1)
338 real(DP) :: dgl(1:n-1,0:n),jgl(1:n-1,0:n)
340 real(DP) :: w(0:(n+1)*2)
342 integer :: np, nm, n2
372 a(i,j) = a(i,j) + d(k,i)*b(k)*d(k,j)
378 call
zwgl(zgl,bgl,nm)
414 real(DP) :: xx, x(0:n),c(0:n,0:m)
416 integer :: i, j, k, mn
417 real(DP) :: c1, c2, c3, c4, c5
438 c(i,k) = c1*(k*c(i-1,k-1)-c5*c(i-1,k))/c2
440 c(i,0) = -c1*c5*c(i-1,0)/c2
442 c(j,k) = (c4*c(j,k)-k*c(j,k-1))/c3
444 c(j,0) = c4*c(j,0)/c3
455 use size_m
, only : lx1, ly1, lz1, lelv
456 use size_m
, only : nx1, nelv
457 use geom, only : xm1, ym1, zm1
458 use hsmg, only : llr, lrr, lmr, lls, lms, lrs, llt, lmt, lrt
459 use input, only : if3d
460 use wz_m, only : wxm1
463 real(DP),
allocatable :: l(:,:,:,:)
464 integer :: e, n2, nz0, nzn, nx, n, j, k
466 allocate(l(lx1, ly1, lz1, lelv))
476 call
plane_space(lmr,lms,lmt,0,n2,wxm1,xm1,ym1,zm1,nx,n2,nz0,nzn)
494 llr(e) = l(1,2,2,e)-lmr(e)
495 lrr(e) = l(n,2,2,e)-lmr(e)
496 lls(e) = l(2,1,2,e)-lms(e)
497 lrs(e) = l(2,n,2,e)-lms(e)
498 llt(e) = l(2,2,1,e)-lmt(e)
499 lrt(e) = l(2,2,n,e)-lmt(e)
516 llr(e) = l(1,2,1,e)-lmr(e)
517 lrr(e) = l(n,2,1,e)-lmr(e)
518 lls(e) = l(2,1,1,e)-lms(e)
519 lrs(e) = l(2,n,1,e)-lms(e)
544 real(DP) :: B(*),TEMP(*)
subroutine row_zero(a, m, n, e)
zero the eth row of a
subroutine dssum(u)
Direct stiffness sum.
subroutine get_fast_bc(lbr, rbr, lbs, rbs, lbt, rbt, e, bsym, ierr)
subroutine gen_fast_spacing()
Generate fast diagonalization matrices for each element.
Module containing data for HSMG.
subroutine do_semhat_weight(jgl, dgl, bgl, n)
re-weight jgl and dgl with bgl
Arrays for direct stiffness summation. cleaned.
subroutine fd_weights_full(xx, x, n, m, c)
This routine evaluates the derivative based on all points in the stencils. It is more memory efficien...
integer function lglel(iel)
subroutine swap_lengths()
subroutine load_semhat_weighted()
Note that this routine performs the following matrix multiplies after getting the matrices back from ...
subroutine generate_semhat(a, b, c, d, z, dgll, jgll, bgl, zgl, dgl, jgl, n, w)
Generate matrices for single element, 1D operators:
subroutine, public zwgll(Z, W, NP)
subroutine swap(b, ind, n, temp)
Reorder vector using temporary buffer.
subroutine plane_space(lr, ls, lt, i1, i2, w, x, y, z, nx, nxn, nz0, nzn)
Here, spacing is based on harmonic mean. pff 2/10/07.
subroutine exitti(stringi, idata)
subroutine, public zwgl(Z, W, NP)
Generate NP Gauss Legendre points (Z) and weights (W) associated with Jacobi polynomial P(N)(alpha=0...