[Nek5000-users] Computing a slice

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu May 15 08:55:27 CDT 2014


Hi Kamal,

In the hemi example there is a routine

subroutine interp_v(uvw,xyz,n)

that will interpolate the velocity at an arbitrary
set of points.  You could use that to interrogate
your planar slice.
An example calling sequence from userchk (say) would be:

      common /myjunk/ uvw(ldim,2),xyz(ldim,2)
      if (nid.eq.0) then ! load points on node 0
         n=2
         xyz(1,1) = 5.  ! x_1
         xyz(2,1) = 0.  ! y_1
         xyz(3,1) = 0.  ! z_1

         xyz(1,2) = 0.  ! x_2
         xyz(2,2) = 5.  ! y_2
         xyz(3,2) = 0.  ! z_2

      else
         n=0
      endif

      call interp_v(uvw,xyz,n)  ! All nodes must call this routine


Note that you can also have other processors supply points
but it is detrimental to have multiple processors supply
the _same_ interpolation points.   The following example
would be disastrous on anything over 1000 processors:

      xyz(1,1) = 5.  ! x_1
      xyz(2,1) = 0.  ! y_1
      xyz(3,1) = 0.  ! z_1
      xyz(1,2) = 0.  ! x_2
      xyz(2,2) = 5.  ! y_2
      xyz(3,2) = 0.  ! z_2      n=2                           ! BAD EXAMPLE
      call interp_v(uvw,xyz,n)      ! BAD EXAMPLE

This, however, is OK

      n=2
      if (nid.gt.0) n=0             ! Good example
      call interp_v(uvw,xyz,n)      ! Good example


If your list is really long  (i.e., > 10000, say) then it's
potentially worthwhile to split the points specification across
processors.  Again, that depends on the calling frequency, etc.

Paul



________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Thursday, May 15, 2014 3:19 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] Computing a slice

Hello Neks,

I would like to know If there is a sub-routine which will help me to
make a slice in x-y plane.
I am planning to compute the integral of the velocity distribution for
finding the centroid.

Thanks in advance,


Kamal.
_______________________________________________
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