[Nek5000-users] Compute the derivatives

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Jun 2 08:58:23 CDT 2010


dudxyz is somewhat dated and slow...

I recommend somthing like:

       parameter (lt=lx1*ly1*lz1*lelv)
       common /mygrad/ vxx(lt),vxy(lt),vxz(lt)
      $              , vyx(lt),vyy(lt),vyz(lt)
      $              , vzx(lt),vzy(lt),vzz(lt)

       call gradm1(vxx,vxy,vxz,vx)
       call gradm1(vyx,vyy,vyz,vy)
       call gradm1(vzx,vzy,vzz,vz)

Note that putting these arrays into a common block, as
shown, is a good idea for several reasons, one of which
is that it guarantees that the data will be byte-aligned 
with the cache line.  On some machines (e.g., BG/P) this
is crucial for proper functionality - for this reason we
don't mix variable types in a given common block.

If you subsequently wish to access elements of vxx etc.
on an element-by-element basis you can of course do something
like

       parameter (lt=lx1*ly1*lz1)
       common /mygrad/ vxx(lt,lelt),vxy(lt,lelt),vxz(lt,lelt)
       :
       :

Paul

On Wed, 2 Jun 2010, nek5000-users at lists.mcs.anl.gov wrote:

> Hi Nek's,
>
> I have a home-made global stability code, but in order to use it I first need 
> to compute the derivatives of my base flow: dUdX, dUdY, dVdX, dVdY.
> How could one compute these derivatives using Nek 5k and drop them along with 
> X Y U V in the blah.f**** file (or perhaps another .f**** file) ? I assume I 
> have to make use of the subroutine *dudxyz (du,u,rm1,sm1,tm1,jm1,imsh,isd)*, 
> but I'm not sure what to put as inputs.
>
> Regards,
> JC
>



More information about the Nek5000-users mailing list