[Nek5000-users] distance function

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Apr 16 16:37:33 CDT 2013



Dear Neks,

I've just added two new functions to navier5.f that might
be of interest.

One is a low-pass cut-off filter.  Basically,

       ifld = 1
       call cut_off_filter(u,mx,ifld) ! mx=max saved mode

   will project any field u() onto a polynomial of degree mx-1
   (e.g., mx=2 would imply projecting u onto piecewise bilinear
   or trilinear in 2D or 3D).

   The supplemental argument ifld tells the filter to march over
   the number of elements associated with field "ifld" (e.g., ifld=1
   implies e=1,nelv;  ifld=2 implies e=1,nelt, which could be different
   in the case of conjugate heat transfer).

The second routine is a cheap (pseudo) distance function.

   .For those of you who have been using this function for the
    past few days in the .usr file please note that there was a
    minor bug in that version that is now fixed in the repo.

    Also, the interface to the repo-version is slightly different:

       call cheap_dist(d,ifld)

    returns an approximate distance function in the array d(),
    which is associated with field ifld, as above (i.e. ifld=1
    if you wish to march over e=1,nelv, etc.)

   .The reason this is a pseudo-distance function is that it actually
    returns the minimum tally of the distances that separate a chain
    of neighboring vertices.  If the chain is on a line normal to the
    wall then this is a true distrance, otherwise it's an approximation.
    The choice of this distance function over more precise variants
    was motivated by the fact that cheap_dist() will return the proper
    result when you have periodic boundary conditions, whereas other
    approaches do not readily meet this criterion.

    For many applications, cheap_dist is sufficient.

Please let me know if there are any issues with these routines.

Cheers, Paul



More information about the Nek5000-users mailing list