-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply breduce to reduce snapshot projection time (#217)
- Loading branch information
Showing
14 changed files
with
221 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
|
||
$MOR_DIR/bin/linkm | ||
USR="$USR ana.o aux.o conv.o dump.o ei.o filter.o lapack.o pod.o qoi.o rom.o read.o time.o const.o rk.o legacy.o tensor.o mpar.o riesz.o batch.o" makenek $1 | ||
USR="$USR ana.o aux.o conv.o dump.o ei.o filter.o lapack.o pod.o qoi.o rom.o read.o time.o const.o rk.o legacy.o tensor.o mpar.o riesz.o batch.o ip.o" makenek $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ subroutine breduce(a,n,m) | |
|
||
real a(n) | ||
|
||
if (m.le.0) return | ||
if (m.gt.lbat) m = lbat | ||
i=1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
c----------------------------------------------------------------------- | ||
subroutine iop(uu,u,imesh) | ||
|
||
include 'SIZE' | ||
include 'MASS' | ||
|
||
parameter (lt=lx1*ly1*lz1*lelt) | ||
|
||
real uu(lt,1),u(lt,1) | ||
|
||
if (imesh.eq.1) then | ||
n=lx1*ly1*lz1*nelv | ||
do idim=1,ndim | ||
call copy(uu(1,idim),u(1,idim),n) | ||
enddo | ||
else | ||
n=lx1*ly1*lz1*nelt | ||
call copy(uu,u,n) | ||
endif | ||
|
||
return | ||
end | ||
c----------------------------------------------------------------------- | ||
subroutine bop(bu,u,imesh) | ||
|
||
include 'SIZE' | ||
include 'MASS' | ||
|
||
parameter (lt=lx1*ly1*lz1*lelt) | ||
|
||
real bu(lt,1),u(lt,1) | ||
|
||
if (imesh.eq.1) then | ||
n=lx1*ly1*lz1*nelv | ||
do idim=1,ndim | ||
call col3(bu(1,idim),u(1,idim),bm1,n) | ||
enddo | ||
else | ||
n=lx1*ly1*lz1*nelt | ||
call col3(bu,u,bm1,n) | ||
endif | ||
|
||
return | ||
end | ||
c----------------------------------------------------------------------- | ||
subroutine aop(au,u,af,imesh) | ||
|
||
include 'SIZE' | ||
include 'LMOR' | ||
|
||
parameter (lt=lx1*ly1*lz1*lelt) | ||
|
||
common /morid/ ones(lx1*ly1*lz1*lelm),zeros(lx1*ly1*lz1*lelm) | ||
|
||
real au(lt,1),u(lt,1),af(1) | ||
|
||
if (imesh.eq.1) then | ||
do idim=1,ndim | ||
call axhelm(au(1,idim),u(1,idim),af,zeros,imesh,idim) | ||
enddo | ||
else | ||
call axhelm(au,u,af,zeros,imesh,1) | ||
endif | ||
|
||
return | ||
end | ||
c----------------------------------------------------------------------- | ||
subroutine hop(hu,u,af,bf,imesh) | ||
|
||
include 'SIZE' | ||
|
||
parameter (lt=lx1*ly1*lz1*lelt) | ||
|
||
real hu(lt,1),u(lt,1),af(1),bf(1) | ||
|
||
if (imesh.eq.1) then | ||
do idim=1,ndim | ||
call axhelm(hu(1,idim),u(1,idim),af,bf,imesh,idim) | ||
enddo | ||
else | ||
call axhelm(hu,u,af,bf,imesh,1) | ||
endif | ||
|
||
return | ||
end | ||
c----------------------------------------------------------------------- | ||
subroutine uip(res,u,v,nv,itype,mdim,nbat,wk,af,bf) | ||
|
||
! returns inner-product of u and v based on itype | ||
! res: inner-product results i.e., entries of |u(1)v(1,i)| | ||
! itype: 0 = discrete L2, 1 = L2, 2 = H10, 3 = H1 | ||
! mdim: 1 = thermal, ndim = velocity | ||
! nbat: number of elements in a batch for gop | ||
! wk: work array | ||
! af (itype.gt.1): property fields for aop | ||
! bf (itype.gt.2): property fields for hop | ||
|
||
include 'SIZE' | ||
include 'LMOR' | ||
|
||
parameter (lt=lx1*ly1*lz1*lelt) | ||
|
||
real res(nv),u(lt,1),v(lt,mdim,nv),wk(lt,ldim),af(lt),bf(lt) | ||
|
||
imesh=1 | ||
if (mdim.eq.1) imesh=2 | ||
|
||
if (imesh.eq.1) then | ||
n=lx1*ly1*lz1*nelv | ||
else | ||
n=lx1*ly1*lz1*nelt | ||
endif | ||
|
||
if (itype.eq.0) then | ||
call iop(wk,u,imesh) | ||
else if (itype.eq.1) then | ||
call bop(wk,u,imesh) | ||
else if (itype.eq.2) then | ||
call aop(wk,u,af,imesh) | ||
else if (itype.eq.3) then | ||
call hop(wk,u,af,bf,imesh) | ||
endif | ||
|
||
do j=1,nv | ||
res(j)=0. | ||
do idim=1,mdim | ||
res(j)=res(j)+vlsc2(wk(1,idim),v(1,idim,j),n) | ||
enddo | ||
enddo | ||
|
||
call breduce(res,nv,nbat) | ||
|
||
return | ||
end | ||
c----------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters