[Nek5000-users] Question on interp_v

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Aug 11 03:10:07 CDT 2017


Hi Jan,

good catch! Indeed there was a bug in interp_v. I fixed it. Please update to the latest NekExamples and try again.

Cheers,
Stefan

-----Original message-----
> From:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
> Sent: Friday 11th August 2017 2:37
> To: nek5000-users at lists.mcs.anl.gov
> Subject: [Nek5000-users] Question on interp_v
> 
> 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
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
> 


More information about the Nek5000-users mailing list