[Nek5000-users] Question on interp_v
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Aug 10 17:36:41 CDT 2017
Hi all,
I recently got some results I didn’t quite understand from the interpolation subroutines. I set up a simplified minimal example that shows the problem.
I add the following to the hemi example usrchk:
REAL*8 my_xyz(ldim,100)
& ,my_uvw(ldim,100)
(…)
DO i=1,100
my_xyz(1,i)=xm1(i,1,1,1)
my_xyz(2,i)=ym1(i,1,1,1)
my_xyz(3,i)=zm1(i,1,1,1)
ENDDO
CALL interp_v(my_uvw,my_xyz,100)
DO i=1,100
WRITE(*,*) '-------------------------------'
WRITE(*,*) 'pos',my_xyz(1:3,i)
WRITE(*,*) 'vx',vx(i,1,1,1),my_uvw(1,i),
& vx(i,1,1,1)-my_uvw(1,i)
WRITE(*,*) 'vy',vy(i,1,1,1),my_uvw(2,i),
& vy(i,1,1,1)-my_uvw(2,i)
WRITE(*,*) 'vz',vz(i,1,1,1),my_uvw(3,i),
& vz(i,1,1,1)-my_uvw(3,i)
ENDDO
I would expect that interpolating on the grid points themselves returns the value of velocity there (plus perhaps some numerical error), but the results seem to be more or less random (only right order of magnitude). Am I using the subroutine wrong?
Jan
More information about the Nek5000-users
mailing list