[Nek5000-users] failed to write derivatives in one file
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Jul 10 13:05:07 CDT 2014
Dear all,
I tried to write all the velocity derivatives into one file, so I added some lines of code into the prepost.f, like
subroutine outpost3(v1,v2,v3
$,v4,v5,v6
$,v7,v8,v9
$,vp,vt,name3)
include 'SIZE'
include 'INPUT'
real v1(1),v2(1),v3(1),vp(1),vt(1)
real v4(1),v5(1),v6(1)
real v7(1),v8(1),v9(1)
character*3 name3
itmp=0
if (ifto) itmp=1
call outpost4(v1,v2,v3
$,v4,v5,v6
$,v7,v8,v9
$,vp,vt,itmp,name3)
return
end
c------------------------------------------
subroutine outpost4(v1,v2,v3
$,v4,v5,v6
$,v7,v8,v9
$,vp,vt,nfldt,name3)
character*3 name3
logical if_save(ldimt)
c
ntot1 = nx1*ny1*nz1*nelv
ntot1t = nx1*ny1*nz1*nelt
ntot2 = nx2*ny2*nz2*nelv
if(nfldt.gt.ldimt) then
write(6,*) 'ABORT: outpost data too large (nfldt>ldimt)!'
call exitt
endif
c store solution
call copy(w1,vxx,ntot1)
call copy(w2,vxy,ntot1)
call copy(w3,vxz,ntot1)
call copy(w4,vyx,ntot1)
call copy(w5,vyy,ntot1)
call copy(w6,vyz,ntot1)
call copy(w7,vzx,ntot1)
call copy(w8,vzy,ntot1)
call copy(w9,vzz,ntot1)
call copy(wp,pr,ntot2)
do i = 1,nfldt
call copy(wt(1,i),t(1,1,1,1,i),ntot1t)
enddo
c swap with data to dump
call copy(vxx,v1,ntot1)
call copy(vxy,v2,ntot1)
call copy(vxz,v3,ntot1)
call copy(vyx,v4,ntot1)
call copy(vyy,v6,ntot1)
call copy(vyz,v6,ntot1)
call copy(vzx,v7,ntot1)
call copy(vzy,v8,ntot1)
call copy(vzz,v9,ntot1)
call copy(pr,vp,ntot2)
do i = 1,nfldt
call copy(t(1,1,1,1,i),vt(1,i),ntot1t)
enddo
c dump data
if_save(1) = ifto
ifto = .false.
if(nfldt.gt.0) ifto = .true.
do i = 1,ldimt-1
if_save(i+1) = ifpsco(i)
ifpsco(i) = .false.
if(i+1.le.nfldt) ifpsco(i) = .true.
enddo
call prepost(.true.,name3)
ifto = if_save(1)
do i = 1,ldimt-1
ifpsco(i) = if_save(i+1)
enddo
c restore solution data
call copy(vxx,w1,ntot1)
call copy(vxy,w2,ntot1)
call copy(vxz,w3,ntot1)
call copy(vyx,w4,ntot1)
call copy(vyy,w5,ntot1)
call copy(vyz,w6,ntot1)
call copy(vzx,w7,ntot1)
call copy(vzy,w8,ntot1)
call copy(vzz,w9,ntot1)
call copy(pr,wp,ntot2)
do i = 1,nfldt
call copy(t(1,1,1,1,i),wt(1,i),ntot1t)
enddo
return
end
c---------------------------
in the userchk file,
..................
call gradm1(vxx,vxy,vxz,vx)
.....................
call outpost3(vxx,vxy,vxz
$,vyx,vyy,vyz
$,vzx,vzy,vzz
$,pr,t,'derivate')
...................
there are errors, like this:
/Users/wei/nek5_svn/trunk/nek/prepost.f:1998.34:
subroutine outpost3(v1,v2,v3
1
Error: Unexpected junk in formal argument list at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:1999.8:
$,v4,v5,v6
1
Error: Invalid character in name at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:2001.8:
$,vp,vt,name3)
1
Error: Invalid character in name at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:2017.72:
$,v7,v8,v9
1
Error: Syntax error in argument list at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:2018.8:
$,vp,vt,itmp,name3)
1
Error: Invalid character in name at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:2025.15:
$,v7,v8,v9
1
Error: Unexpected junk in formal argument list at (1)
/Users/wei/nek5_svn/trunk/nek/prepost.f:2026.8:
$,vp,vt,nfldt,name3)
1
Error: Invalid character in name at (1)
SIZE:5.72:
Included at /Users/wei/nek5_svn/trunk/nek/prepost.f:2003:
parameter (ldim=3)
1
SIZE:5.72:
Included at /Users/wei/nek5_svn/trunk/nek/prepost.f:2028:
parameter (ldim=3)
2
Error: Two main PROGRAMs at (1) and (2)
make: *** [obj/prepost.o] Error 1
so what should I do?
Thanks,
Wei
More information about the Nek5000-users
mailing list